我正在使用我的页面上来自Paypal的最新REST API。但是我无法在Paypal上隐藏运送信息。我不想向我的客户提供更改Paypal地址的选项。
payment: function(data, actions) {
return actions.payment.create({
transactions: [{
amount: {
total: '<? print(number_format($got_daten["bestellwert"],2,".","")); ?>',
currency: 'EUR',
details: {
subtotal: '<? print(number_format($got_daten["bestellwert_slim"],2,".","")); ?>',
shipping: '<? print(number_format($got_daten["orderVersandkosten"],2,".","")); ?>'
}
},
description: 'Krusenhof Etteln - Onlinebestellung',
custom: 'Bestellung: <? print($got_daten["orderID"]); ?>',
}],
note_to_payer: 'Rufen Sie uns an bei Fragen! Ihr Krusenhof Etteln'
});
},
如何添加隐藏选项(不发货)?
所有文档都是针对旧版本的,不再可用。
谢谢 标记
答案 0 :(得分:0)
您可以使用Payment Experience API进行操作。看一下example here。它显示正在使用no_shipping。
curl -v -X \
POST https://api.sandbox.paypal.com/v1/payment-experience/web-profiles/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
-d '{
"name": "ebayProfile",
"presentation":
{
"logo_image": "https://www.paypal.com"
},
"input_fields":
{
"no_shipping": 1,
"address_override": 1
},
"flow_config":
{
"landing_page_type": "billing",
"bank_txn_pending_url": "https://www.paypal.com"
}
}'