I use the following code to create Paypal buttons: paypal.Buttons({
style: {
shape: 'rect',
color: 'gold',
layout: 'vertical',
label: 'paypal',
},
createOrder: function(data, actions) {
return actions.order.create({
payer: {
name: {
given_name: 'Jeroen',
surname: 'not neccesary '
},
email_address: 'e@mail.com'
},
purchase_units: [{
description: 'Your taroscope reading',
amount: {
value: '62.00',
currency_code: 'USD'
}
}],
application_context : {
brand_name: 'Taroscope',
shipping_preference: 'NO_SHIPPING',
return_url: 'https://divinefulness.info/th/ret.php?id=998',
cancel_url: 'https://divinefulness.info/th/ret.php?id=998'
}
});
}
,onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
,onCancel: function(data) {
alert('so sorry you cancelled');
}
}).render('#pbc'); I set Phone number of customer off in Paypal settings. Yet, still the phone number is required. I tried to enter a dummy phone number, by adding: , phone: {
country_code: '31',
national_number: '+<removed>
} and experimented with differences in country_code and national_number, but all to no avail. Also the return_url and cancel_url do not work. Please advise.
... View more