PayPal API:购物车商品总金额与订单金额不符 [英] PayPal API: The totals of the cart item amounts do not match order amounts

查看:32
本文介绍了PayPal API:购物车商品总金额与订单金额不符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多关于这个错误的帖子,但它们都不适用于我.我真的不明白为什么金额不匹配.我有与 AMT0 * QTY0 匹配的 ITEMAMT.AMT 匹配 ITEMAMT + SHIPPINGAMT.我一遍又一遍地检查文档,它确实应该以这种方式工作.当我完全删除它的运输时它会起作用......

There are a lot of posts about this error, but they all not apply on me. I really don't understand why the amounts wouldn't match. I have ITEMAMT which matches AMT0 * QTY0. And AMT matches ITEMAMT + SHIPPINGAMT. I checked the docs over and over and it really should work this way. It works when I totally remove the shipping out of it...

结帐网址中的 AMT 也是 73.9.

The AMT in the checkout url is 73.9 too.

我真的希望有人熟悉这个非常令人困惑的错误,并且知道我做错了什么......

I really hope someone is familiar with this very confusing error, and knows what I am doing wrong...

提前致谢

Array
(
    [TIMESTAMP] => 2013-01-24T22:56:09Z
    [CORRELATIONID] =>
    [ACK] => Failure
    [VERSION] => 62.0
    [BUILD] => 4181146
    [L_ERRORCODE0] => 10413
    [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
    [L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts.
    [L_SEVERITYCODE0] => Error
)
Array
(
    [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
    [L_PAYMENTREQUEST_0_NAME0] => XXXX
    [L_PAYMENTREQUEST_0_NUMBER0] => 30533
    [L_PAYMENTREQUEST_0_DESC0] => XXXX
    [L_PAYMENTREQUEST_0_AMT0] => 30.95
    [L_PAYMENTREQUEST_0_QTY0] => 2
    [PAYMENTREQUEST_0_ITEMAMT] => 61.9
    [PAYMENTREQUEST_0_TAXAMT] => 0
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 12
    [PAYMENTREQUEST_0_INSURANCEAMT] => 0
    [PAYMENTREQUEST_0_AMT] => 73.9
    [PAYMENTREQUEST_0_CURRENCYCODE] => USD
    [REQCONFIRMSHIPPING] => 1
    [PAYMENTREQUEST_0_SHIPTOSTREET] => XXXX
    [PAYMENTREQUEST_0_SHIPTOCITY] => XXXX
    [PAYMENTREQUEST_0_SHIPTOSTATE] => XX
    [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => XX
    [PAYMENTREQUEST_0_SHIPTOZIP] => XXXXXX
    [PAYMENTREQUEST_0_SHIPTOPHONENUM] => XXXXXXXX
)

推荐答案

我的问题的答案可能对路过的大多数人没有帮助.但是我的一个项目包含 &在描述 (L_PAYMENTREQUEST_0_DESC0) 中.'&'转义了通过 CURL 传递的数据.这造成了错误(完全关闭).请记住,当您输入任何包含 & 的字符时,也会发生这种情况.当 URL 被编码时,例如é 将变成 é

The answer to my question is probably not helpful to most of you passing by. But one of my items contained an & in the description (L_PAYMENTREQUEST_0_DESC0). '&' escaped the data passed through with CURL. And that created the error (which is totally off). Remember that this will also happen when you put in any characters that will contain an & when the URL is being encoded e.g. é will become é

我很抱歉从我的第一篇文章中删除了项目描述,但由于有关金额的错误消息,我不知道这与此有关.

I apologize for removing the item description from my first post, but i had no idea this had something to do with it, due to the error message about amounts.

这篇关于PayPal API:购物车商品总金额与订单金额不符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆