I need to find a way to customize the PayPal page that appears to the User which is starting a Transaction in order to give him a better experience. In particular I would like the PayPal page translated in the language of the User.
Asked
Active
Viewed 105 times
2 Answers
1
First of all you need an access-token in order to be able to leverage the REST Api. You will find details in How to retrieve PayPal REST Api access-token using node. Once you have the access-token you can do the following:
request.post({
uri: "https://api.sandbox.paypal.com/v1/payment-experience/web-profiles",
headers: {
"Content-Type": "application/json",
"Authorization": "bearer " + access_token
},
json: {
"name": "English language",
"presentation": {
"locale_code": "US"
},
}
},
function(error, response, body) {
console.log(body);
});
If the request is successful You'll get something like the following:
{ id: 'XP-ABCD-YDEF-GHIL-5MNO' }
Now to reach your goal You have to add the "experience_profile_id" parameter to your payment object with the value obtained above.