Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem to track multiple packages in production mode - single one works #29

Open
Flaschenzug opened this issue Sep 3, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@Flaschenzug
Copy link

Still working on the tracking, but another problem - so I thought it might be better to open a new issu.

I try to check more than one tracking ID at the same time (see the request at the end of this post)
If I only track one ID, it works.

[pieceStatus] => -1000
[pieceStatusDesc] => Ein technischer Fehler ist aufgetreten! Bitte kontaktieren Sie den Support!

Another problem or something that I am missing?
I know that in sandbox mode only one package is possible, but I am in production mode.

print_r($pieces); -> 
Array
(
    [0] => ChristophSchaeffer\Dhl\BusinessShipping\Resource\Tracking\PieceData Object
        (
            [pieceCode] => 00340434492098429236
            [zipCode] => 
            [internationalShipment] => 
        )

    [1] => ChristophSchaeffer\Dhl\BusinessShipping\Resource\Tracking\PieceData Object
        (
            [pieceCode] => 00340434492098429229
            [zipCode] => 
            [internationalShipment] => 
        )

    [2] => ChristophSchaeffer\Dhl\BusinessShipping\Resource\Tracking\PieceData Object
        (
            [pieceCode] => 00340434492098429205
            [zipCode] => 
            [internationalShipment] => 
        )
)
@christoph-schaeffer
Copy link
Owner

I haven't really tested checking multiple shipment numbers, but i think this should work... have you tried looking at the xml again? does it look weird or different than what you see in the dhl api doku?

You could try to open a ticket at entwickler.dhl.de again as the error message says

the dhl documentation also says that its possible to check multiple shipments with getPieceDetail. You just have to put them in the same field as the single one and seperate them with a semicolon.

But my lib doesn't support that yet and expects only a single shipment. For now im not really planning to implement that aswell, however im definetly open for pull requests for that feature

@Flaschenzug
Copy link
Author

Flaschenzug commented Sep 3, 2022

[rawRequest] => <?xml version="1.0" encoding="UTF-8"?><data request="get-status-for-public-user" appname="REMOVED" password="REMOVED" language-code="de"><data piece-code="00340434492098429243"></data><data piece-code="00340434492098429236"></data></data>

You could try to open a ticket at entwickler.dhl.de again as the error message says

I will do that.

@Flaschenzug
Copy link
Author

DHL Support told me, that it is working like this:

<?xml version="1.0" encoding="UTF-8" ?><data appname="zt*****" password=***********" request="get-status-for-public-user" language-code="de"><data piece-code="358944658984;00340434299870737684" international-shipment="false"></data></data>

That would be like you wrote, id's separated with a semicolon.

@christoph-schaeffer
Copy link
Owner

Allright. I guess the implementation i did in the lib is wrong for that then. Does it work if you just seperate it with semicolons?

@christoph-schaeffer christoph-schaeffer added the bug Something isn't working label Sep 15, 2022
@Flaschenzug
Copy link
Author

Sorry, I wasn't able to modify the code, so that it returns the rawRequest in only one tag with the semicolons.
If you let me know how i can modify that, I am glad to test it for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants