PayPal(NVP API)如何为订单打折



例如,这是我的请求参数,订单总数为270.00,如果我想使用优惠券($10.00)来折扣此订单,则订单总数必须是260.00,但是现在,我在此api(https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/)中找不到任何关于折扣AMT参数的信息,我忽略了它?

Array(        
    [PAYMENTREQUEST_0_CURRENCYCODE] => USD
    [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
    [PAYMENTREQUEST_0_AMT] => 270.00
    **[some parameter? DISCOUNT_AMT ?] => 10.00 // have this parameter ??**
    [PAYMENTREQUEST_0_ITEMAMT] => 219.00
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 39.00
    [PAYMENTREQUEST_0_HANDLINGAMT] => 12.00
    [L_PAYMENTREQUEST_0_AMT0] => 219.00
    [L_PAYMENTREQUEST_0_QTY0] => 1
    [L_PAYMENTREQUEST_0_NAME0] => Goods title
    [L_PAYMENTREQUEST_0_DESC0] => Goods description
);

对不起,我的英语不好,谢谢你的朋友。

您需要将折扣添加为具有负值的附加行项目,然后相应地调整 ITEMAMT 和 AMT。

Array(        
[PAYMENTREQUEST_0_CURRENCYCODE] => USD
[PAYMENTREQUEST_0_PAYMENTACTION] => Sale
[PAYMENTREQUEST_0_AMT] => 260.00
[PAYMENTREQUEST_0_ITEMAMT] => 209.00
[PAYMENTREQUEST_0_SHIPPINGAMT] => 39.00
[PAYMENTREQUEST_0_HANDLINGAMT] => 12.00
[L_PAYMENTREQUEST_0_AMT0] => 219.00
[L_PAYMENTREQUEST_0_QTY0] => 1
[L_PAYMENTREQUEST_0_NAME0] => Goods title
[L_PAYMENTREQUEST_0_DESC0] => Goods description
[L_PAYMENTREQUEST_0_AMT1] => -10.00
[L_PAYMENTREQUEST_0_QTY1] => 1
[L_PAYMENTREQUEST_0_NAME1] => Discount
[L_PAYMENTREQUEST_0_DESC1] => Coupon Code ABC123

);

相关内容

  • 没有找到相关文章

最新更新