简体   繁体   English

使用Authorize.Net退款

[英]Refund using Authorize.Net

I try to refund a transaction on Authorize.Net, but when i apply the information on the samples, fails in how to refund the transaction. 我尝试在Authorize.Net上退款,但是当我在样本中应用信息时,如何退款就失败了。

I found this old question: How do you refund a transaction in Authorize.net? 我发现了这个古老的问题: 如何在Authorize.net中退还交易? and I try adapt my problem and emulate it. 然后尝试调整并模拟我的问题。

In the AIM samples, only we found the method 'Void'. 在AIM样本中,只有我们找到了“无效”方法。

I looking for into the web-reference with the assembly explorer and I found CustomerGateway with a Refund Method. 我通过程序集浏览器寻找Web参考,并找到了具有退款方式的CustomerGateway。 This is the part of code: 这是代码的一部分:

var reReques = new CustomerGateway(LogidId, TransactionKey, ServiceMode.Test);
eReques.Refund("31246194", "28261347", "2228103445", 1.00M);

And Fails again, I didn't find how to settle the transaction and the visual studio say that is "obsolete Method". 再次失败,我没有找到如何解决交易的信息,而视觉工作室则说这是“过时的方法”。

Into another samples, mentioned createTransaction Request(); 在另一个示例中,提到了createTransaction Request();。 and said that the value transaction type is changed to "refundTransaction": 并说将有价交易类型更改为“ refundTransaction”:

var dum= new createTransactionRequest();
dum.transactionRequest.transactionType = "refundTransaction";

but is does not works either. 但是也不起作用。

You need to wait until your transaction status change into "Settled Successfully", then use the next snippet of code 您需要等到交易状态更改为“已成功结算”,然后使用下一个代码段

var reReques = new CustomerGateway(LogidId, TransactionKey, ServiceMode.Test);
var z = reReques.Refund(ProdileId, PaymentProfileId, TransactionId, amount); 

Be sure to use the last snippet of code because if you don´t use it, the refund won´t be approve. 请确保使用最后一个代码段,因为如果您不使用它,退款将不被批准。

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

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