gpt4 book ai didi

PayPal Rest API 错误总和不相加但确实如此

转载 作者:太空宇宙 更新时间:2023-11-03 15:58:45 25 4
gpt4 key购买 nike

我正在使用 PayPal Rest API(Java SDK),当我提交执行付款时(即在重定向之前)我收到错误:

  Excetpion e [{
"field": "transactions[0]",
"issue": "Item amount must add up to specified amount subtotal (or total if amount details not specified)"
}]]]

但是数字如下(从我的调试日志中复制)并加起来,特别是所有项目(只有一个)的价格恰好是小计

[[ tranaction t total 24.57]]
[[ tranaction t subtotal 19.8]]
[[ tranaction t tax 3.92]]
[[tranaction t shipping 0.85]]
[[tranaction t item[0] price 19.8]]

有人知道上面有什么吗?干杯汤姆

最佳答案

原因是我的价格低于价格,然后 Paypal 将价格解释为每件商品而不是 2 件商品的总和。适应然后工作

"item_list": {
"items": [
{
"name": "PRODUCT_6",
"quantity": "2",
"price": "19.8",
"currency": "EUR"
}
]
}

关于PayPal Rest API 错误总和不相加但确实如此,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38958493/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com