Skip to content
New issue

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

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

Already on GitHub? # to your account

Fixed ship-to address for UPS REST shipment API #4047

Merged

Conversation

ragnese
Copy link
Contributor

@ragnese ragnese commented Jun 19, 2024

Description (*)

When a shipment is a "return", only the "ShipFrom" needs to change from the store owner to the customer. The "ShipTo" will already be the store owner and does not need to be changed.

Related Pull Requests

N/A

Fixed Issues (if relevant)

N/A

Manual testing scenarios (*)

Create a return shipment and try to get labels.

Questions or comments

This is kind of funny, actually. If you look at the XML version of the code that creates the request object, you can see that the XML code does not REPLACE the "ShipFrom" and "ShipTo" when it's a return shipment--it actually ADDS another "ShipTo" node, which is ignored by UPS. Since UPS only looks at the first "ShipTo" node, the old XML code worked even though it was wrong. The REST code tried to mirror what the XML code does, but actually replaces the node instead of adding more.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added the Component: Usa Relates to Mage_Usa label Jun 19, 2024
@fballiano
Copy link
Contributor

how do you create a return shipping label? I know only how to generate a normal shipping label, but I see know that the PDF is broken for me, it doesn't open.

@fballiano
Copy link
Contributor

@ragnese?

@fballiano fballiano changed the title Fix ship-to address for UPS REST shipment API Fixed ship-to address for UPS REST shipment API Jul 2, 2024
@fballiano fballiano merged commit 5610151 into OpenMage:main Jul 2, 2024
17 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Component: Usa Relates to Mage_Usa
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants