PayPal NVP:购物车项目金额的总数与订单金额不匹配

时间:2017-11-18 16:57:52

标签: php paypal

我正在使用PayPal NVP API设置参考交易。我的问题是向数字产品增加税额。我收到了错误

The totals of the cart item amounts do not match order amounts

没有我的税额,我没有错误..这收费成功。

$post = [
            'METHOD' => 'DoReferenceTransaction',
            'REFERENCEID' => $billingId,
            'PAYMENTACTION' => 'SALE',
            'AMT' =>  sprintf("%.2f", $plan->total),
            'CURRENCYCODE' => 'USD',
        ];

一旦我尝试添加TAXAMT,我就收到了上述错误。

$post = [
            'METHOD' => 'DoReferenceTransaction',
            'REFERENCEID' => $billingId,
            'PAYMENTACTION' => 'SALE',
            'AMT' =>  sprintf("%.2f", $plan->total),
            'TAXAMT' => sprintf("%.2f", $plan->taxAmount),
            'CURRENCYCODE' => 'USD',
        ];

我已经确认$plan->taxAmount是有效号码(3.25)。

0 个答案:

没有答案