2013-05-06 221 views
2

我在貝寶快遞新手,和函數返回錯誤10413. 客戶看到這個賬單:PayPal快速錯誤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之內將商品價格不含稅?

回答

0

10413 API響應意味着ItemTotal,ShippingTotal,HandlingTotal和TaxTotal不會合計到提交的OrderTotal的值。有關此計算的規則,請參閱貝寶集成指南。

只需快速查看您提供的內容,就不會出現您正確添加總計的情況。看起來像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 
+0

首先感謝PP_MTS_Chad,但如果您看到賬單,客戶不支付156,他支付129.58€不是156€這些是含稅的物品數量。也許我沒有解釋清楚。 – monchyrcg 2013-05-07 07:14:06

+0

如果您想讓買家支付129.58,您需要調整折扣金額。 – 2013-05-07 17:53:12

4

我發現這個問題,只需一個減號第一折扣金額

&PAYMENTREQUEST_0_SHIPDISCAMT=-31.20 

感謝所有。