gpt4 book ai didi

paypal - 在生产中处理 paypal 付款时出错

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

我们使用 paypal 的 SOAP API 来处理支付,沙盒支付处理工作正常但在生产中失败并出现以下响应。我不理解 transactions.amount.details 字段

要求:

{"transactions": [
{
"description": "",
"amount": {
"total": "1.00",
"currency": "USD",
"details": null
}
}
],
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card": {
"type": "visa",
"last_name": "xxxxx",
"first_name": "xxxx",
"expire_year": "xxxx",
"expire_month": "xx",
"cvv2": "701",
"number": "xxxxxxxxxxxxxxx",
"billing_address": {
"state": "CA",
"postal_code": "94704",
"phone": null,
"line2": null,
"line1": "xxxxxxxxxxx",
"country_code": "xx",
"city": "xxxxxxxx"
}
}
}
]
},
"intent": "sale"}

响应:

"status": 400,
"duration_time": 113,
"body": {
"message": "Invalid request - see details",
"information_link": "https://developer.paypal.com/docs/api/#VALIDATION_ERROR",
"details": [
{
"field": "transactions.amount.details",
"issue": "This field name is not defined for this resource type"
}
],
"name": "VALIDATION_ERROR",
"debug_id": "251e5ad7494cf"
},
"additional_properties": {},
"header": {
"Content-Length": "289",
"Content-Language": "*",
"CORRELATION-ID": "251e5ad7494cf",
"Date": "Tue, 20 Sep 2016 09:25:17 GMT",
"Connection": "close",
"Paypal-Debug-Id": "251e5ad7494cf",
"PROXY_SERVER_INFO": "host=dcg12javapapi9720.dcg12.slc.paypalinc.com;threadId=329",
"Content-Type": "application/json"
}

最佳答案

它期望一个对象将金额逐项列为小计、运费等,如概述here .

例子:

"amount": {
"total": "7.47",
"currency": "USD",
"details": {
"subtotal": "7.41",
"tax": "0.03",
"shipping": "0.03"
}
}

关于paypal - 在生产中处理 paypal 付款时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39669831/

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