Paypal Express错误10413

时间:2013-05-06 11:18:30

标签: paypal

我是PayPal express的新手,函数返回错误10413。 客户看到这个账单:

1.Item   Price: 77€
2.Item 2 Price:79€

Subtotal: 128.93€ (without tax)
Shipping: 3.95€ (without tax)
TAX:      27.83€(Item's tax + shipping's tax)
Discount: -31.2€

Total to pay:   129.58€

在CallShortcutExpressCheckout中我做了这个字符串:

&PAYMENTREQUEST_0_AMT=129.58
&PAYMENTREQUEST_0_PAYMENTACTION=Sale
&RETURNURL=http://example.com/FinalizarPedido
&CANCELURL=http://example.com/DetalleCarrito
&PAYMENTREQUEST_0_CURRENCYCODE=EUR
&INVOICEID=63f958d2dc0c08ae6d71059ff90eae22
&L_PAYMENTREQUEST_0_NAME0=Item
&L_PAYMENTREQUEST_0_AMT0=77.00
&L_PAYMENTREQUEST_0_QTY0=1
&L_PAYMENTREQUEST_0_NAME1=Item 2
&L_PAYMENTREQUEST_0_AMT1=79.00
&L_PAYMENTREQUEST_0_QTY1=1
&PAYMENTREQUEST_0_AMT=129.58
&PAYMENTREQUEST_0_TAXAMT=27.83
&PAYMENTREQUEST_0_ITEMAMT=156
&PAYMENTREQUEST_0_SHIPPINGAMT=3.95
&PAYMENTREQUEST_0_SHIPDISCAMT=31.20
SetExpressCheckout

错误在哪里?也许我要在&L_PAYMENTREQUEST_0_AMT0中免税项目价格?

2 个答案:

答案 0 :(得分:4)

我发现了问题,首先只需要一个减号的折扣金额

&PAYMENTREQUEST_0_SHIPDISCAMT=-31.20

谢谢大家。

答案 1 :(得分:0)

10413 API响应意味着ItemTotal,ShippingTotal,HandlingTotal和TaxTotal不会累计提交的OrderTotal的值。有关此计算的规则,请参阅PayPal集成指南。

只是快速查看您提供的内容,您似乎没有正确添加总数。看起来像PAYMENTREQUEST_0_ITEMAMT = 156应该是PAYMENTREQUEST_0_ITEMAMT = 156.58。以下是我刚刚提交的请求,它已经过了。

API请求:

USER=xxxxxxxxx   
PWD=xxxxxxxxx   
SIGNATURE=xxxxxxxxx   
METHOD=SetExpressCheckout   
VERSION=98.0   
RETURNURL=https://www.ccaples.com/index.php/api-s/paypal-nvp/nvp-quick-test   
CANCELURL=https://www.ccaples.com/index.php/api-s/paypal-nvp/nvp-quick-test   
PAYMENTREQUEST_0_CURRENCYCODE=EUR   
INVOICEID=63f958d2dc0c08ae6d71059ff90eae22   
L_PAYMENTREQUEST_0_NAME0=Item   
L_PAYMENTREQUEST_0_AMT0=77.00   
L_PAYMENTREQUEST_0_QTY0=1   
L_PAYMENTREQUEST_0_NAME1=Item 2   
L_PAYMENTREQUEST_0_AMT1=79.00   
L_PAYMENTREQUEST_0_QTY1=1   
PAYMENTREQUEST_0_ITEMAMT=156.00   
PAYMENTREQUEST_0_AMT=156.58   
PAYMENTREQUEST_0_TAXAMT=27.83   
PAYMENTREQUEST_0_SHIPPINGAMT=3.95   
PAYMENTREQUEST_0_SHIPDISCAMT=-31.20 

API响应:

TOKEN=EC-6FP13377V8467513R  
TIMESTAMP=2013-05-06T14:05:04Z  
CORRELATIONID=8f418e8a77fec  
ACK=Success  
VERSION=98.0  
BUILD=5817241