In our application users can pay product amount in multiple payments(I am using Authorize.net). Now when I try to refund using our application I got following error message “Refund Failed. A duplicate transaction has been submitted”. Can you please let us know how to handle this situation?
Our Application code is in C# and .Net SDK is used.
Demo Scenario: Total Product Amount: $2000
1st payment paid on 15-December-2017=$500 (Sample Transaction ID from authorize.net: 40009683949)
2nd payment paid on 31-December-2017=$500 (Sample Transaction ID from authorize.net: 40009683950)
3rd payment paid on 10-January-2018=$500 (Sample Transaction ID from authorize.net: 40009683951)
4th payment paid on 15-January-2018=$500 (Sample Transaction ID from authorize.net: 40009683952)
While initiating refund process I have created loop and passing “Transaction Id”(different at each request) and “Amount”. First Transactions refunds successfully but other gives me “Refund Failed. A duplicate transaction has been submitted” error.
I have found an article on authorize.net for this issue: https://support.authorize.net/authkb/index?page=content&id=A425&actp=search&viewlocale=en_US&searchi...
According to this article I have to send extra parameter: "x_duplicate_window" with the request. I have tried but my code is not working(There is no sample code available in authorize .net)
Here is my Code:
var x_duplicate_window_Setting = new settingType { settingName = "x_duplicate_window", settingValue = "-1" }; settingType[] extraOptions = { x_duplicate_window_Setting }; var transactionRequest = new transactionRequestType { transactionType = transactionTypeEnum.refundTransaction.ToString(),
// refund type
payment = paymentType,
amount = TransactionAmount,
refTransId = TransactionID,
transactionSettings = extraOptions };
Error Message: Refund Failed. Setting Name 'x_duplicate_window' is invalid for this method.
Anyone know how to solve this issue??