发送折扣是setexpresscheckout api的订单项

时间:2013-10-23 10:19:22

标签: paypal

我是paypal.how的新用户,可以在以下代码中使用折扣。

'&CURRENCYCODE='.urlencode($PayPalCurrencyCode).
                    '&PAYMENTACTION=Sale'.
                    '&ALLOWNOTE=1'.
                    '&PAYMENTREQUEST_0_CURRENCYCODE='.urlencode($PayPalCurrencyCode).
                    '&PAYMENTREQUEST_0_SHIPPINGAMT='.urlencode($shipping_total).
                    '&PAYMENTREQUEST_0_AMT='.urlencode($cart_total).
                    '&PAYMENTREQUEST_0_ITEMAMT='.urlencode($item_total).
                    '&PAYMENTREQUEST_0_SHIPPINGDISCAMT='.urlencode($discount_total).

                    $products_str.

                    '&AMT='.urlencode($item_total).
                    '&RETURNURL='.urlencode($PayPalReturnURL ).
                    '&CANCELURL='.urlencode($PayPalCancelURL);

如何编写SetExpressCheckout_API付款折扣。

它的工作没有折扣。所以我不知道如何在这里写折扣

请帮帮我

1 个答案:

答案 0 :(得分:0)

您可以通过在L_PAYMENTREQUEST_0_AMT0参数中设置负数来指定折扣作为订单项。 例如;

RETURNURL:  http://url
CANCELURL:  http://url
PAYMENTREQUEST_0_AMT:   100.00
paymentrequest_0_currencycode:  USD
PAYMENTREQUEST_0_ITEMAMT:   70.00
PAYMENTREQUEST_0_SHIPPINGAMT:   15.00
PAYMENTREQUEST_0_HANDLINGAMT:   10.00
PAYMENTREQUEST_0_TAXAMT:    5.00
PAYMENTREQUEST_0_DESC:  Description
paymentrequest_0_paymentaction: Sale
L_PAYMENTREQUEST_0_NAME0:   Test article
L_PAYMENTREQUEST_0_DESC0:   Description
L_PAYMENTREQUEST_0_AMT0:    70.00
L_PAYMENTREQUEST_0_NUMBER0: 123456
L_PAYMENTREQUEST_0_QTY0:    1
L_PAYMENTREQUEST_0_TAXAMT0: 5.00

请参阅here