Quantcast
Channel: Active questions tagged paypal - Stack Overflow
Viewing all articles
Browse latest Browse all 603

How to Turn off shipping with new PayPal JavaScript SDK

$
0
0

I'm playing around with the new PayPal Javascript SDK buttons here https://developer.paypal.com/docs/checkout/reference/customize-sdk

Our app sells digital goods and doesn't require a shipping address. Is there any way to turn that off?

// render paypal buttonspaypal.Buttons({    createOrder: function (data, actions) {        // Set up the transaction        return actions.order.create({            purchase_units: [{                amount: {                    value: $scope.total                }            }],            application_context: {                shipping_preference: "NO_SHIPPING"            }        });    },    onApprove: function (data, actions) {        // Capture the funds from the transaction        return actions.order.capture().then(function (details) {            // Show a success message to your buyer            alert('Transaction completed by '+ details.payer.name.given_name +' order ID: '+ data.orderID);        });    }}).render('#paypal-button-container');

Viewing all articles
Browse latest Browse all 603

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>