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

ISSUE : DOMDocument::createElement(): Argument #2 ($value) must be of type string, Ups\Entity\Shipper given #340

Closed
TuhiranDevbhuti opened this issue Mar 29, 2022 · 2 comments

Comments

@TuhiranDevbhuti
Copy link

TuhiranDevbhuti commented Mar 29, 2022

Hello @Rud5G @thijsw @okj579 @MPiccinato @JREAM

I 'm facing a issue in the shipping class
"DOMDocument::createElement(): Argument #2 ($value) must be of type string, Ups\Entity\Shipper given"
under gabrielbull\ups-api\src\Shipping.php
$shipperNode->appendChild($xml->createElement('ShipperNumber', $shipment->getShipper()->getShipperNumber()))
Shipper-given
;

@okj579
Copy link
Contributor

okj579 commented Mar 29, 2022

Hi @TuhiranDevbhuti, how are you setting ShipperNumber? It looks like it contains an object instead of a string.

@TuhiranDevbhuti
Copy link
Author

TuhiranDevbhuti commented Mar 30, 2022

Hello @okj579
I'm using exactly the same code shipping API
https://github.com/gabrielbull/php-ups-api#shipping-class-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants