Orders API V2 - Formatting shipping address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am currently upgrading from an implementation that used PHP and checkout.js to the Javascript SDK and Orders API V2. In the previous implementation I used paypal-response-wrapper.php (which I think I got from github) that provided a function getAddress() that returned the shipping address in the correct format for label printing taking into account each countries address formatting rules.
I have looked for something similar for the Orders V2 response but without success. As this must be a common requirement has anyone found something that could save me re-inventing the wheel? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have updated the original code to match the Orders API V2 response. It seems to work OK for me but no guarantees.
paypal-response-wrapper-v2.php

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Sandbox account collect billing and shipping address in Sandbox Environment
- Error payment in PayPal Payments Standard
- Why does PayPal make it difficult to send an item to a different shipping address from billing? in PayPal Upgrade Community
- How do I change shipping preference in Paypal? in REST APIs
- Compliance violation. flag based on the account origin ? in Sandbox Environment