- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my checkout flow, I am redirecting to a confirmation page where I would like to show the buyer name and address. Is there any way to get that information and insert it via javascript? I just need to know how to get the info in my PayPal checkout function in javascript. Thanks
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I finally got this figured out by studying the docs and some help from JackieDaytona. As for the buyer address, I got that (and the full name as well) by going into this:
details.purchase_units[0].shipping
Then, as I am using vanilla Javascript, I created this:
var buyerInfo = [details.purchase_units[0].shipping.name.full_name, details.purchase_units[0].shipping.address.address_line_1, details.purchase_units[0].shipping.address.admin_area_2, details.purchase_units[0].shipping.address.admin_area_1, details.purchase_units[0].shipping.address.postal_code, details.id];
And then I added it to sessionStorage and went from there. This way I was able to get the full name with one line and it was the only place I could find an address.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I finally got this figured out by studying the docs and some help from JackieDaytona. As for the buyer address, I got that (and the full name as well) by going into this:
details.purchase_units[0].shipping
Then, as I am using vanilla Javascript, I created this:
var buyerInfo = [details.purchase_units[0].shipping.name.full_name, details.purchase_units[0].shipping.address.address_line_1, details.purchase_units[0].shipping.address.admin_area_2, details.purchase_units[0].shipping.address.admin_area_1, details.purchase_units[0].shipping.address.postal_code, details.id];
And then I added it to sessionStorage and went from there. This way I was able to get the full name with one line and it was the only place I could find an address.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- Paypal transaction is missing the Order details in REST APIs
- Javascript API returning weasley_content_missing_en_AU_compliance.sanctions in SDKs
- invoice api doesn't accept bearer token in REST APIs
- How do I edit a Buy Now, Smart Button that was created in November of 2022? in PayPal Payments Standard