amazon payfort capture 操作错误:“不允许操作:CAPTURE”

问题描述

我已经开始使用“Amazon payfort 支付服务”,但我遇到了一些问题。 我正在尝试根据 Api example 获取交易信息,但总是收到错误“不允许操作:CAPTURE” 这是我的 curl 请求:

curl -H "Content-type: application/json" -XPOST -d '{   "command": "CAPTURE","access_code": "Xw************","merchant_identifier": "51*****","merchant_reference": "ORDR.90342","amount": 350100,"currency": "SAR","language": "en","fort_id": "169996200001495787","signature": "942b11d7e204d433913383ca68fa03eb0c5eca34cec6c44f8e6869d4fcea795c" }' 'https://sbpaymentservices.payfort.com/FortAPI/paymentApi'

这是服务器响应:

{"response_code":"00034","amount":"350100","signature":"650003b1b6c8243a7ef7daec851a69cb0795212a92c6acc30b283d960c521224","merchant_identifier":"51*****","access_code":"X****************","language":"en","fort_id":"169996200001495787","command":"CAPTURE","response_message":"Operation not allowed : CAPTURE","merchant_reference":"ORDR.90342","currency":"SAR","status":"00"}

解决方法

问题是购买请求,而不是捕获操作。 我将命令从 PURCHASE 更改为 AUTHORIZATION,现在捕获请求成功运行。谢谢大家。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...