I'm using the PayPal API to handle PayPal-payments in my eCommerce-system.
v1/oauth2/token
v1/payments/payment
v1/payments/payment/-ID-/execute/
After step #2 I refer the user to the PayPal-page to login and confirm the payment. The user gets the own shipping address displayed. But I want to override this address with the address the user entered in the checkout of my online-shop.
I tried to set the payer_info -> shipping_address with shipping address object. No errors from paypal but the shipping address is the same.
https://developer.paypal.com/webapps/developer/docs/api/#shippingaddress-object
This is a US Merchant solution only. Take a look at this Paypal Developer Documentation here.
When is comes to Paypal you almost always can override settings you just need to dig into the documentation and find the right combination. What I think you need is found in the second choice down:
Use the address_override variable. / See Overriding Addresses Stored With PayPal.
I'm in class at the moment so I can help more later if you need but for us to really help you out we need to see code samples of what your already attempting.
EDIT
So do what your already doing sounds right, just add the override commands where appropriate.
Please add your code if your still having trouble.
Define a 'shipping_address'
https://developer.paypal.com/docs/api/#shippingaddress-object
Add the 'shipping_address' to your 'item_list'
https://developer.paypal.com/docs/api/#itemlist-object
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With