简体   繁体   English

Authorize.Net In-Person SDK:无法退还信用卡交易; 改为收取新交易费用

[英]Authorize.Net In-Person SDK: Unable to refund a credit card transaction; charges a new transaction instead

The Authorize.Net In-Person SDK in Windows C# documentation is spotty and their Customer Support Team gives contradictory information. Windows C# 中的 Authorize.Net In-Person SDK 文档参差不齐,他们的客户支持团队提供了相互矛盾的信息。

I succeeded in Voiding a credit card transaction by bypassing the SDK altogether.通过完全绕过 SDK,我成功地取消了信用卡交易。 However, I have not succeeded in implementing the Refund functionality.但是,我还没有成功实现退款功能。

I have tried very many things that were suggested by different members of their Customer Support Team, and am hesitant to spend more time before first ascertaining whether anyone has ever successfully used this library.我已经尝试了他们客户支持团队的不同成员建议的很多东西,并且在首先确定是否有人成功使用过这个库之前犹豫是否要花更多时间。

I first charged the card with the function "startEMVTransaction".我首先使用 function“startEMVTransaction”向卡收费。 When I was not able to Refund the charge, it was suggested that I charge the card using the following commands:当我无法退还费用时,建议我使用以下命令对卡进行收费:

  1. processCardInBackground进程卡在后台
  2. startQuickChipTransaction启动QuickChipTransaction

However, whenever I have tried to refund a transaction (regardless of the way the transaction was charged) the response from the SDK was that the transaction was successful.但是,每当我尝试退还交易(无论交易的收费方式如何)时,SDK 的响应是交易成功。 However, instead of a refund, the card was charged anew.但是,该卡没有退款,而是重新收费。 Below is a snippet from the code in case you are curious.如果您好奇,下面是代码片段。

I generated the createTransactionRequest instance as follows:我生成了 createTransactionRequest 实例,如下所示:

   transactionRequestType transaction = new transactionRequestType()
    {
      transactionType = transactionTypeEnum.refundTransaction.ToString(),
      amount = <amount to refund expressed as Decimal>,
      refTransId = "<ID of transaction to refund>",

      retail = new transRetailInfoType()
      {
        deviceType = "5",     // "5" PC-based terminal
        marketType = "2",     // retail transactions submitted with track data
      },
    };
    transaction.terminalNumber = this.terminalID;
    createTransactionRequest request = new createTransactionRequest()
    {
      transactionRequest = transaction
    };
    request.merchantAuthentication = new merchantAuthenticationType()
    {
      Item = this.sessionToken,
      mobileDeviceId = this.deviceID,
      ItemElementName = ItemChoiceType.sessionToken
    };

And I invoked the method startQuickChipTransaction as follows:我调用了 startQuickChipTransaction 方法,如下所示:

this.launcher.startQuickChipTransaction(request, SDKTransactionType.REFUND, this)

AuthorizeNet Customer Service responded yesterday. AuthorizeNet 客服昨天回复了。 They have now implemented the functionality, and sample code is available on https://github.com/AuthorizeNet/sample-code-csharp/blob/master/PaymentTransactions/RefundTransaction.cs .他们现在已经实现了该功能,示例代码在https://github.com/AuthorizeNet/sample-code-csharp/blob/master/PaymentTransactions/RefundTransaction.cs上可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM