Salamek/PplMyApi

Can't create Package

Closed this issue · 6 comments

Hello, I encountered such a problem, I want to create a package and do everything according to your documentation, but the package does not meet (at least it does not appear on https://klient.ppl.cz/zasilka.aspx), the server is responding (Code : "0", ITEMKEY: "40950942614", Message: null). Tell me what am I doing wrong !? Thank you in advance

    $recipient = $this->getRecipient();
    $sender = $this->getSender();
    $weight = 0.5;
    $packageSeriesNumberId = 942614;
    $packageNumberInfo = new PackageNumberInfo($packageSeriesNumberId, 
               Product::PPL_PARCEL_CZ_BUSINESS_COD, Depo::CODE_09);
    $packageNumber = Tools::generatePackageNumber($packageNumberInfo);


    $package = new Package($packageNumber, Product::PPL_PARCEL_CZ_PRIVATE, 
               $weight, null, Depo::CODE_09, $recipient, $sender);

    try
    {
        dump($this->ppl->createPackages([$package]));
    }
    catch (\Exception $e)
    {
        echo $e->getMessage() . PHP_EOL;
    }

@Dmytro12344 packages send via MyApi do not appear in https://klient.ppl.cz/zasilka.aspx!
Check package tracking for it, viz https://www.ppl.cz/main2.aspx?cls=Package&idSearch=40950942614

@Dmytro12344 i think this is resolved, right ? Closing...

Is there any way to save it here https://klient.ppl.cz/zasilka.aspx ??

@Dmytro12344 NO, that is not configurable from our side. Yes, it is idiotic but that is how ppl implemented it for some weird reason. Ask your PPL contact why their IT and software sux so much... (well it is still better than czech post)

Thank you so much for such quick answers.

@Dmytro12344 you're welcome