Salamek / PplMyApi

Professional Parcel Logistic MyApi PHP client implementation with PDF and ZPL label generator
GNU Lesser General Public License v3.0
27 stars 34 forks source link

Product::EXPORT_PACKAGE_COD not working #53

Closed infinity-commerce closed 3 years ago

infinity-commerce commented 3 years ago

Hi,

i trying to send a EXPORT package with DOB in the same way "createPackages" for CZ Privat and CZ Business with DOB.

The problem is that the reply message is NULL without error but the package was not created.

Can someone check this or test is if he has the same?

Thank you Dominik

infinity-commerce commented 3 years ago

The PPL guy ask me for the request i send in xml. Is there a way to get this?

Salamek commented 3 years ago

@infinity-commerce You will need to modify your PplMyApi installation source to enable trace and dump data you need.

First edit $this->soap = new \SoapClient($this->wsdl); on line: https://github.com/Salamek/PplMyApi/blob/cc12f21e850a5352f3b1997a7d51eb508ab2c284/src/Api.php#L134

to look like this (to enable trace in SoapClient.):

$this->soap = new \SoapClient($this->wsdl, ['trace' => 1]);

And then add echo "REQUEST:\n" . htmlentities($this->soap->__getLastRequest()) . PHP_EOL; on this line

https://github.com/Salamek/PplMyApi/blob/cc12f21e850a5352f3b1997a7d51eb508ab2c284/src/Api.php#L488

To print out Soap request made by that call

infinity-commerce commented 3 years ago

Thank you that works for me

infinity-commerce commented 3 years ago

in /src/Enum/Product.php https://github.com/Salamek/PplMyApi/blob/30e8634f0ef09bb15a73f08c75c96c124359c986/src/Enum/Product.php#L15 https://github.com/Salamek/PplMyApi/blob/30e8634f0ef09bb15a73f08c75c96c124359c986/src/Enum/Product.php#L16

need to be:

    const EXPORT_PACKAGE = 36;
    const EXPORT_PACKAGE_COD = 37;
Salamek commented 3 years ago

@infinity-commerce those are

const PPL_PARCEL_CONNECT = 36;
const PPL_PARCEL_CONNECT_COD = 37;

Did PPL changed their Product names/numbers? or did you just got confused and used wrong product name?

infinity-commerce commented 3 years ago

Dont knwo he sends me a list of test series "Export product" and "Export product - cash on delivery"

Salamek commented 3 years ago

Well that is just great... could you please ask your "PPL guy" for full official Product name => id table PDF or something? So i can close this issue with clear conscience? THX

infinity-commerce commented 3 years ago

You can close it. In klient.ppl.cz it is PPL_PARCEL_CONNECT but support calls it simple "Export"