Paypal 贝宝智能按钮/订单V2 API发货价值

Paypal 贝宝智能按钮/订单V2 API发货价值,paypal,paypal-sandbox,Paypal,Paypal Sandbox,是否可以向PayPal收银台添加定制的运费,如物品 这里有一些带有静态值的示例代码供参考 var paypalAmount = {"value":"78.95","breakdown":{"item_total":{"currency_code":"USD","value":"78.95"}}}; var paypalItems = [

是否可以向PayPal收银台添加定制的运费,如物品

这里有一些带有静态值的示例代码供参考

var paypalAmount = {"value":"78.95","breakdown":{"item_total":{"currency_code":"USD","value":"78.95"}}};

var paypalItems = [{"name":"sample item","unit_amount":{"currency_code":"USD","value":"39.95"},"quantity":"1","category":"PHYSICAL_GOODS"},{"name":"sample item2","unit_amount":{"currency_code":"USD","value":"39.00"},"quantity":"1","category":"PHYSICAL_GOODS"}];

  createOrder: function(data, actions) {
            return actions.order.create({
                purchase_units: [{
                    amount: paypalAmount,
                    items: paypalItems
                }],
                headers: {
                    'content-type': 'application/json'
                },
            });
        }

您传递的细分对象的数量,该对象采用装运参数,如下所述: