[英]Authorize.Net In-Person SDK: Unable to refund a credit card transaction; charges a new transaction instead
Windows C# 中的 Authorize.Net In-Person SDK 文档参差不齐,他们的客户支持团队提供了相互矛盾的信息。
通过完全绕过 SDK,我成功地取消了信用卡交易。 但是,我还没有成功实现退款功能。
我已经尝试了他们客户支持团队的不同成员建议的很多东西,并且在首先确定是否有人成功使用过这个库之前犹豫是否要花更多时间。
我首先使用 function“startEMVTransaction”向卡收费。 当我无法退还费用时,建议我使用以下命令对卡进行收费:
但是,每当我尝试退还交易(无论交易的收费方式如何)时,SDK 的响应是交易成功。 但是,该卡没有退款,而是重新收费。 如果您好奇,下面是代码片段。
我生成了 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
};
我调用了 startQuickChipTransaction 方法,如下所示:
this.launcher.startQuickChipTransaction(request, SDKTransactionType.REFUND, this)
AuthorizeNet 客服昨天回复了。 他们现在已经实现了该功能,示例代码在https://github.com/AuthorizeNet/sample-code-csharp/blob/master/PaymentTransactions/RefundTransaction.cs上可用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.