从贝宝快递结帐中删除送货地址
Posted
技术标签:
【中文标题】从贝宝快递结帐中删除送货地址【英文标题】:Remove shipping address from paypal express checkout 【发布时间】:2019-02-11 11:14:39 【问题描述】:我在我的网站上使用快速结帐。我想在完成交易时禁用它的送货地址。我在按钮上使用脚本。我正在使用的一段代码就是这个。
paypal.Button.render(
env: 'production', // sandbox | production
client:
sandbox: 'mykey',
production: 'mykey'
,
// Show the buyer a 'Pay Now' button in the checkout flow
commit: true,
// payment() is called when the button is clicked
payment: function(data, actions)
// Make a call to the REST api to create the payment
return actions.payment.create(
payment:
transactions: [
amount: total: '5.00', currency: 'EUR'
]
);
,
// onAuthorize() is called when the buyer approves the payment
onAuthorize: function(data, actions)
// Make a call to the REST api to execute the payment
return actions.payment.execute().then(function()
window.location = "address";
);
, '#paypal-button-container');
非常感谢您的帮助。谢谢
【问题讨论】:
【参考方案1】:如果您仍在寻找解决方案,可以通过添加以下行来禁用发货地址:
experience:
input_fields:
no_shipping: 1
所以你的代码需要这样调整:
...
// Make a call to the REST api to create the payment
return actions.payment.create(
payment:
transactions: [
amount: total: '5.00', currency: 'EUR'
],
experience:
input_fields:
no_shipping: 1
);
...
【讨论】:
以上是关于从贝宝快递结帐中删除送货地址的主要内容,如果未能解决你的问题,请参考以下文章