douxiegan6468
2016-07-13 09:38
浏览 49
已采纳

购物车项目金额的总数与订单金额paypal快速结账不匹配

I have read other posts on the very same subject but I didn't get solution. Below code is working code and I have used this code multiple times but don't know what I am doing wrong right now,

Below is $padata:

METHOD=SetExpressCheckout
RETURNURL=My return link
CANCELURL=My cancel link
PAYMENTREQUEST_0_PAYMENTACTION=SALE
L_PAYMENTREQUEST_0_NAME0=Vancouver
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_AMT0=1799.00
L_PAYMENTREQUEST_0_NAME1=Ottawa
L_PAYMENTREQUEST_0_QTY1=1
L_PAYMENTREQUEST_0_AMT1=1799.00
L_PAYMENTREQUEST_0_NAME2=Calgary
L_PAYMENTREQUEST_0_QTY2=1
L_PAYMENTREQUEST_0_AMT2=1799.00
L_PAYMENTREQUEST_0_NAME3=YoloMD+Verify+Facility
L_PAYMENTREQUEST_0_QTY3=1
L_PAYMENTREQUEST_0_AMT3=599.00
NOSHIPPING=1
PAYMENTREQUEST_0_ITEMAMT=5996.00
PAYMENTREQUEST_0_TAXAMT=0
PAYMENTREQUEST_0_SHIPPINGAMT=0
PAYMENTREQUEST_0_HANDLINGAMT=0
PAYMENTREQUEST_0_SHIPDISCAMT=2398.40
PAYMENTREQUEST_0_INSURANCEAMT=0
PAYMENTREQUEST_0_AMT=3597.60
PAYMENTREQUEST_0_CURRENCYCODE=USD
LOCALECODE=GB
LOGOIMG=My logo
CARTBORDERCOLOR=1761a9
ALLOWNOTE=1

Calling Method -

$paypal->PPHttpPost('SetExpressCheckout', $padata, $PayPalApiUsername, $PayPalApiPassword, $PayPalApiSignature, $PayPalMode);

Response Received

Array
(
    [TIMESTAMP] => 2016%2d07%2d13T09%3a22%3a38Z
    [CORRELATIONID] => 879b5f075c7c1
    [ACK] => Failure
    [VERSION] => 109%2e0
    [BUILD] => 23255924
    [L_ERRORCODE0] => 10413
    [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument%2e See additional error messages for details%2e
    [L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts%2e
    [L_SEVERITYCODE0] => Error
)

图片转代码服务由CSDN问答提供 功能建议

我已阅读同一主题的其他帖子,但我没有得到解决方案。 下面的代码是工作代码,我多次使用这段代码,但现在不知道我做错了什么,

下面是$ padata: <预> <代码> METHOD = SetExpressCheckout RETURNURL =我的返回链路 CANCELURL =我的取消链接 PAYMENTREQUEST_0_PAYMENTACTION = SALE L_PAYMENTREQUEST_0_NAME0 =温哥华 L_PAYMENTREQUEST_0_QTY0 = 1 L_PAYMENTREQUEST_0_AMT0 = 1799.00 L_PAYMENTREQUEST_0_NAME1 =渥太华 L_PAYMENTREQUEST_0_QTY1 = 1 L_PAYMENTREQUEST_0_AMT1 = 1799.00 \ nL_PAYMENTREQUEST_0_NAME2 =卡尔加里 L_PAYMENTREQUEST_0_QTY2 = 1 L_PAYMENTREQUEST_0_AMT2 = 1799.00 L_PAYMENTREQUEST_0_NAME3 = YoloMD +验证+设施 L_PAYMENTREQUEST_0_QTY3 = 1 L_PAYMENTREQUEST_0_AMT3 = 599.00 NOSHIPPING = 1 PAYMENTREQUEST_0_ITEMAMT = 5996.00 PAYMENTREQUEST_0_TAXAMT = 0 PAYMENTREQUEST_0_SHIPPINGAMT = 0 PAYMENTREQUEST_0_HANDLINGAMT = 0 PAYMENTREQUEST_0_SHIPDISCAMT = 2398.40 PAYMENTREQUEST_0_INSURANCEAMT = 0 PAYMENTREQUEST_0_AMT = 3597.60 PAYMENTREQUEST_0_CURRENCYCODE = USD LOCALECODE = GB LOGOIMG =我的徽标 CARTBORDERCOLOR = 1761a9 ALLOWNOTE = 1

呼叫方法 -

  $ paypal-&gt; PPHttpPost  ('SetExpressCheckout',$ padata,$ PayPalApiUsername,$ PayPalApiPassword,$ PayPalApiSignature,$ PayPalMode); 
   
 
 

收到回复

  Array 
(
 [TIMESTAMP] =&gt;  2016%2d07%2d13T09%3a22%3a38Z 
 [CORRELATIONID] =&gt;  879b5f075c7c1 
 [ACK] =&gt; 失败
 [VERSION] =&gt;  109%2e0 
 [BUILD] =&gt;  23255924 
 [L_ERRORCODE0] =&gt;  10413 
 [L_SHORTMESSAGE0] =&gt; 由于参数无效而拒绝交易%2e有关详细信息,请参阅其他错误消息%2e 
 [L_LONGMESSAGE0] =&gt; 购物车项目金额的总数与订单金额不匹配%2e 
 [L_SEVERITYCODE0] =&gt; 错误
)
   
 
  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douji6667 2016-07-18 07:05
    已采纳

    The PAYMENTREQUEST_0_SHIPDISCAMT should be specified as a negative number. For example: PAYMENTREQUEST_0_SHIPDISCAMT=-2398.40

    More detailed introduction, please check here.

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题