cancel
Showing results for 
Search instead for 
Did you mean: 

Get TransactionID and if payment was success

After a user fills out my credit card payment form, they are redirected to https://secure2.authorize.net/gateway/transact.dll to pay. If it goes through, I want to get the transaction id and the success notice that they paid.

 

Something like this for the status (gives an error, not sure how to get this)

 

string status = AuthorizeNet.TransactionStatus.ToString();

 

And something like this for TransactionID (TransactionId does not exist in API... this is just dummy code to show what I want)

 

int transId = AuthorizeNet.TransactionId;

And then how do I tie this altogether to make sure I get these submitted values AFTER the form is submitted? I'm using asp.net and c#.

3ddfan
Member
6 REPLIES 6

Are you using their github API?

you can look at their test code here

https://github.com/AuthorizeNet/sdk-dotnet/tree/master/AuthorizeNETtest/Api/Controllers/SampleTest

 

Or if you are using SIM or AIM, read the doc

http://developer.authorize.net/api/upgrade_guide/

 

RaynorC1emen7
Expert

Thanks, I am using SIM. Isn't there a quick way to do it instead of having to write an entire class to get the transaction info? I want to get the info right after the form is submitted rather than generating a report on a seperate page.

SIM use relay response, read the SIM doc. It bascially a form post back to your relay response url

I checked out the sample code. Looks like an ID is needed, which I cannot give. I need to dynamically get the ID as my form submits.

 

https://github.com/AuthorizeNet/sample-code-csharp/blob/master/TransactionReporting/GetTransactionDe...

 

  // unique batch id
            string batchId = "4551107";

^ How can I get a batchId when Authorize.Net is autogenerating one when the user hits submit?

Hello @3ddfan

 

Reading the thread, it appears you are trying to use our SDK with our payment form (SIM).  Our SDKs currently only support the Authorize.Net API and do not support SIM.

 

Richard