Fixed bug in Mage_Usa_Model_Shipping_Carrier_Ups->_doShipmentRequestRest() #4046
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (*)
The _doShipmentRequest method has a mistake in parsing the JSON response from UPS. Each successful response has a ShipmentResponse object under the root object.
Related Pull Requests
N/A
Fixed Issues (if relevant)
Should I make an issue first for this kind of thing?
Manual testing scenarios (*)
Do anything that requires getting shipping labels from UPS
Questions or comments
The Magento2 code for UPS has this right. When I implemented the OpenMage version, my brain just skipped over the ShipmentResponse key- probably because it looks so similar to the next key, "ShipmentResults". Here's the Magento2 part for reference:
We've been running this in production after encountering errors with generating shipping labels.
Contribution checklist (*)