NO_SHIPPING Positioning in the code?

SteveStuartDJ
Contributor
Contributor

Here is the bit of code I found here by @MTS_Jennifer.
I'm using this code to stop PayPal asking the buyer for their address on the pay form as mine is Digital Downloads only.

******************
"application_context": {
shipping_preference: "NO_SHIPPING",
},

******************

I've put it in my PayPal Standard buyer's page like this:

BEFORE

createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{"description": blah blah

 

AFTER
createOrder: function(data, actions) {
return actions.order.create({

"application_context": {
shipping_preference: "NO_SHIPPING",
},
purchase_units: [{"description": blah blah

 

Is this the correct place to put this please?
It works OK, but I want to do it right.

 

Thanks for any help, Steve

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.