Can't get full shipping address from Paypal checkout buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm following the instructions here, in the sandbox,
<removed>
And I'm looking to get the buyer's shipping address in the onApprove function, after capturing the payment
return actions.order.capture().then(function(orderdets) {
console.log('order details ', orderDetails)
}
This only returns the country code. I've also tried the onShippingChange callback, and although it returns more, it doesn't return the full address, missing line 1 and line 2.
I found this link which looked similar to my issue:
<removed>
But whether I do authorize or capture, I can't get the full shipping address. Is there some information on how to figure where to ship the order?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got to the bottom of it, in case anyone else is stuck
The full shipping address isn't in the 'payer' field in the order object. It's in the 'shipping' field in each object of the 'purchase_units' array
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Using Paypal Smart Buttons for checkout sometimes fails with Debit/ Credit Cards Form in Braintree Client-side Integration (JS, iOS, Android SDKs)
- Express Checkout with Bigcommerce in PayPal Payments Standard
- Customising Paypal Checkout Button in PayPal Payments Standard
- How do I update shipping in the popup when using onShippingAddressChange() in REST APIs
- Add Others data in SDKs