【问题标题】:Wirecard refund requestWirecard 退款申请
【发布时间】: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


    【解决方案1】:

    付款和退款请求都存在一系列错误:

    • 付款请求需要有 "transaction-type" : "purchase" 而不是 "transaction-type" : "auto-sale"
    • 退款请求应具有 "transaction-type" : "refund-purchase" 而不是 "transaction-type" : "refund-request"
    • 还应通过以下网址发送退款请求:“https://api-test.wirecard.com/engine/rest/payments/”

    (来自线卡支持回答)

    【讨论】:

      猜你喜欢
      • 2020-11-17
      • 2018-02-26
      • 1970-01-01
      • 1970-01-01
      • 2014-05-28
      • 2022-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多