我正在https://developer.paypal.com/docs/checkout/reference/customize-sdk
处使用新的PayPal Javascript SDK按钮我们的应用程序出售数字商品,不需要送货地址。有什么办法可以关闭它吗?
// render paypal buttons
paypal.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');