简体   繁体   English

发送自适应贝宝付款中每件商品的运输详细信息

[英]Send details of Shipping per item in Adaptive Paypal Payments

I have a requirement where I have to add shipping costs per item not per order of a particular supplier. 我有一个要求,我必须增加每个项目的运输成本,而不是特定供应商的每个订单的运输成本。

For example, if a buyer purchases three products of a supplier, each product has different shipping costs. 例如,如果买方购买了供应商的三种产品,则每种产品的运输成本都不同。 The receiver option to add shipping details in invoice data I found is 在我发现的发票数据中添加运送详细信息的接收方选项是

receiverOptions[x].invoiceData.totalShipping

that means I have to sum up all the shipping costs and assign it. 这意味着我必须总结所有运输费用并分配。 But I want to show shipping costs per product. 但我想显示每种产品的运输成本。 I'm accessing the api using NVP . 我正在使用NVP访问api。 Is there a chance I can achieve this? 我有机会实现这一目标吗?

You could put the shipping items as actual items in the order instead of using the single shipping field. 您可以将装运项目作为实际项目放入订单中,而不使用单个装运字段。

With Adaptive Payments, you make your call to Pay using CREATE, and then you would follow that up with SetPaymentOptions to include details like order items prior to redirecting the user to PayPal. 使用Adaptive Payments时,您可以使用CREATE调用Pay,然后使用SetPaymentOptions进行后续操作,以在将用户重定向到PayPal之前包括诸如订单项之类的详细信息。

If you're splitting the payment up between multiple receivers then you can specify the individual shipping amounts in each payment within SetPaymentsOptions. 如果要在多个接收方之间分配付款,则可以在SetPaymentsOptions中的每个付款中指定单独的发货金额。 Each payment in the transaction can have its own items, shipping, tax, etc. 交易中的每笔付款都可以有自己的商品,运费,税金等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM