在我的例子中:我处理了支付,支付成功了,但不知何故,我的内部API失败了,因为我存储了支付详细信息或分类帐。现在我想退还给客户。所以我找到了这个端点"pts/v2/payments/{id}/refunds",在这里我在查询参数中传递paymentId,在主体中传递订单信息。但他们的反应是
{"submitTimeUtc":"2020-08-18T07:26:18Z","status":"INVALID_REQUEST","reason":"INVALID_DATA","message":"Declined - One or more fields in the request contains invalid data"}我从这里也尝试了https://developer.cybersource.com/api-reference-assets/index.html#payments_refund同样的事情。
它做了一些奇怪的事情,它先是创建付款,然后再退款。请告诉我这个API的流程和需要做的事情。
发布于 2020-08-26 00:13:52
我不确定您使用的是什么语言,也看不到您的代码,但我自己也遇到了同样的问题。我不使用SimpleAuthorizationInternet()函数来检索付款的详细信息,只需根据需要传入ID即可。
因此,不是:
SimpleAuthorizationInternet.userCapture = true;
PtsV2PaymentsPost201Response paymentResponse = SimpleAuthorizationInternet.run();
String id = paymentResponse.getId();..。不要调用函数并删除行:
SimpleAuthorizationInternet.userCapture = true;
PtsV2PaymentsPost201Response paymentResponse = SimpleAuthorizationInternet.run();。。如果您有支付ID,只需在函数中直接使用:
String id = '123456789321654987'更好的做法是,将其传递到函数调用中,并使用该var代替上面的硬编码字符串。
https://stackoverflow.com/questions/63464206
复制相似问题