我有下面的代码从贝宝获取令牌,但不知何故贝宝不断向我发送一个错误,说购物车项目的总数与订单金额不匹配。我在这里做错了什么?
<ebl:PaymentDetails>
<ebl:OrderTotal currencyID="USD">21.70</ebl:OrderTotal>
<ebl:TaxTotal currencyID="USD">1.70</ebl:TaxTotal>
<ebl:ButtonSource>PayPal_SDK</ebl:ButtonSource>
<ebl:PaymentDetailsItem>
<ebl:Name>Product A</ebl:Name>
<ebl:Quantity>1</ebl:Quantity>
<ebl:Tax currencyID="USD">1.70</ebl:Tax>
<ebl:Amount currencyID="USD">20.00</ebl:Amount>
</ebl:PaymentDetailsItem>
</ebl:PaymentDetails>
如果我将税款和金额结合起来,它会按预期工作(参见下面的示例)。我想分开税,以便用户知道他们为产品支付了多少税。
<ebl:PaymentDetails>
<ebl:OrderTotal currencyID="USD">21.70</ebl:OrderTotal>
<ebl:ButtonSource>PayPal_SDK</ebl:ButtonSource>
<ebl:PaymentDetailsItem>
<ebl:Name>Product A</ebl:Name>
<ebl:Quantity>1</ebl:Quantity>
<ebl:Amount currencyID="USD">21.70</ebl:Amount>
</ebl:PaymentDetailsItem>
</ebl:PaymentDetails>