Working with the PayPal API and using the Name-Value Pair Interface PHP source codes from SDKs and Downloads: Simplify Integrations with Downloads and SDKs.
My quest
To solve for this from current (2019) web client .JS, add the application_context
block to the request body.
Below is an example for createSubscription()
call; and I'm thinking this will work with createOrder()
as well
paypal.Buttons({
createSubscription: function (data, actions) {
return actions.subscription.create({
'plan_id' : 'P-123',
'application_context': {
'shipping_preference': 'NO_SHIPPING'
}
});
},
onApprove: function (data, actions) {
// ...
}
})
.render('#paypal-button-container');
Thanks to the example code here:
Here's where the field enums are listed: