【发布时间】:2021-01-20 06:30:44
【问题描述】:
我正在尝试集成有线卡付款,但在退款交易中遇到了问题。
使用测试用户名“70000-APILUHN-CARD”和密码“8mhwavKVb91T”,我创建了支付处理,并且可以看到它是成功的。但是当涉及到退款时,我得到 “405 方法不允许” 结果。
所以付款请求如下所示:
POST https://wpp-test.wirecard.com/api/payment/register
使用 auth 标头,包括编码的用户名/密码、内容类型标头和正文:
{
"payment" :
{
"merchant-account-id" :
{
"value" : merchantId
},
"request-id" : generatedRequestId,
"transaction-type" : "auto-sale",
"requested-amount" :
{
"value" : 1,
"currency" : "EUR"
},
"payment-methods" :
{
"payment-method" :
[
{"name" : "creditcard"}
]
}
},
"options" :
{
"mode" : "seamless",
"frame-ancestor" : ancestorURL
}
}
验证后我可以检查该交易是否成功完成并且一切正常,所以我尝试使用相同的标题提出退款请求:
POST https://api-test.wirecard.com/engine/rest/merchants/{merchantId}/payments/{transactionId}
和身体:
{
"payment":{
"merchant-account-id":{
"value":merchantId
},
"request-id":generatedRequestId,
"requested-amount":{
"value":1,
"currency":"EUR"
},
"payment-methods":{
"payment-method":[
{
"name":"creditcard"
}
]
},
"card-token":{
"token-id":"4819253888096002"
},
"card":{
"expiration-month":"1",
"expiration-year":"2023",
"card-type":"visa"
},
"parent-transaction-id": parentTransactionId,
"transaction-type":"refund-request"
},
"options":{
"mode":"seamless",
"frame-ancestor":ancestorURL
}
}
所有关于卡/卡令牌/等的数据都是从交易状态请求中获得的。
我的退款申请中是否有任何错误,或者我应该执行一些额外的步骤?
【问题讨论】:
标签: rest integration payment-processing wirecard