Reply
Member
Posts: 4
Registered: ‎11-02-2011

CIM Refund - null transaction id

I am using the CIM library to issue refunds.  I am doing this though Authorize.NET's C# SDK Refund method.  While developing with a test account in test mode, I have noticed if I pass a NULL transactionId, the transaction successfully refunds. 

 

Is this by design and more importantly will this same behavior work live?  If don't need to track transactionId's to issue refunds, it would simply my implementation.

 

On a side note, I stumbled across this because the SDK is misleading.  While the ICustomerGateway interface displays the refund method signature as:

 

IGatewayResponse Refund(string profileID, string paymentProfileId, string approvalCode, string transactionId, decimal amount);

 

It is implemented in the CustomerGateway class as:

 

public IGatewayResponse Refund(string profileID, string paymentProfileId, string transactionId, string approvalCode, decimal amount)

 

Notice that the transactionId and approvalCode parameters are switched (approvalCode also isn't even used).

 

Thanks for any feedback. - Zach

Posts: 1,609
Topics: 15
Kudos: 209
Solutions: 121
Registered: ‎06-23-2011

Re: CIM Refund - null transaction id

Test mode doesn't always work the same way as live mode. Why use test mode on a sandbox account, given that sandbox is already essentially 100% testing anyway? That having been said - there's no logical reason why passing a null would work properly. The function has to know what transaction to refund for it to issue the refund. You should store the transaction ID's locally in your database, or you're going to make things a lot more difficult for yourself in the long run. Unless refunds are a rare occurrence and you can live with logging into your Authorize.net control panel and issuing them that way.

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: CIM Refund - null transaction id

Null transactionID is a unlinked refund. I think it enabled by default on test account, but need to apply for it on a live account. Like TJPride said, there is no reason to run anything on test mode for a test account.

Member
Posts: 4
Registered: ‎11-02-2011

Re: CIM Refund - null transaction id

RaynorC1emen7 - thanks for the info.

 

-Zach

Posts: 1,609
Topics: 15
Kudos: 209
Solutions: 121
Registered: ‎06-23-2011

Re: CIM Refund - null transaction id

Heh, nuts. Good catch.