zooglash
zooglash

Reputation: 1775

How do you set the payer's country in PayPal Adaptive Payments?

I'm using PayPal Adaptive Payments with their "embedded flow".

When sending the Pay request, I'm passing the payer's IP address in the clientDetails.ipAddress field, as well as the X-PAYPAL-DEVICE-IPADDRESS header. Additionally I send the payer's country in the SetPaymentOptions request under the institutionCustomer.countryCode field (although I'm not sure what is the purpose of the institutionCustomer).

And yet, when the payer is asked to enter his address PayPal always displays United States as the default country.

Does anyone know how to make PayPal display the correct country by default?

Upvotes: 1

Views: 926

Answers (2)

Vimalnath
Vimalnath

Reputation: 6463

Alternatively,you can also use something like this: https://www.paypal.com/country_code/cgi-bin/webscr?cmd=_ap-payment&paykey=AP-47T233XXXXXXB

Upvotes: 0

zooglash
zooglash

Reputation: 1775

Finally got the solution from a PayPal developer.

When redirecting the user to the embedded flow, add a country.x parameter to the URL, for example:

https://www.paypal.com/webapps/adaptivepayment/flow/pay?paykey=........&country.x=FR

Allegedly you can also pass a locale.x parameter, e.g. locale.x=he_IL

Upvotes: 3

Related Questions