简体   繁体   中英

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.

I found this old question: How do you refund a transaction in Authorize.net? and I try adapt my problem and emulate it.

In the AIM samples, only we found the method 'Void'.

I looking for into the web-reference with the assembly explorer and I found CustomerGateway with a Refund Method. 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(); and said that the value transaction type is changed to "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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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