cancel
Showing results for 
Search instead for 
Did you mean: 

SIM with Asp.Net Webforms and Silent Post

Hello,

 

Here is what I am rtying to achieve and have no clues...

 

1. The user comes to our website and browse some artcile titles.

2. If they wish they can purchase the article. 

3. This is where the user is sent to authorize.net

4. After payment, we would like to save the transaction Id for the user in our database and redirect the user so that he/she can access the article.

 

Any step-by-step instructions would be greatly appreciated.

 

Thanks!

mrathi
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Do you have any example of javascript redirect code?

This is c#

string _jscript = "<script type=\"text/javascript\">window.location = 'http://www.yourwebsite.com?invoice="+ "12345"+"';</script>";
ClientScript.RegisterClientScriptBlock("".GetType(), "s", _jscript);

 Also, can I send some additional parameters to Authorize.net that will be returned as well, so that I know where to redierct the user after successful payment?

Yes you can send as many merchant defined fields as you like, just make sure it is not the same fields name(they all start with x_) from authorize.net.

View solution in original post

10 REPLIES 10

First pick an API Choose an API

Sign up for a test account

Then read up on the documentation of that API and try the sample code

 

Also, you might not need silent post.  There relay response for SIM, DPM. And AIM is a direct code behind call, so you will have the response from the webrequest call.

RaynorC1emen7
Expert

Thanks. I already have a test account. I also have the VB.Net version of the sample code for SIM. However, I am not sure how to come back to my webpage after the payment is processed and how to redirect my user to access the article.

 

You can use the relay response. Once it relay response, you can then redirect the user to the whatever page(success/declined).

Relay Response Basics and Troubleshooting

Thanks again. Based on all my reading on this site, it says that the relay reponse will just display the form fields on the Authorize.Net page. How can I save the transaction ID on my server and then redirect a user to a completely new site? And like I said, when I tried the relay response, it did show the form of my webpage on Authorize.Net and taht is all.

 

Thanks for your help here. I appreciate it.

How can I save the transaction ID on my server and then redirect a user to a completely new site? And like I said, when I tried the relay response, it did show the form of my webpage on Authorize.Net and taht is all.

 

You say it show the from of your webpage on authorize.net, that mean the info is post back to your webpage, which you can save the transactionID and all the other info that post back.

On your webpage, do a javascript redirect to the next page you want to go to so it will leave the authorize.net url.

 

 

 

Do you have any example of javascript redirect code? Also, can I send some additional parameters to Authorize.net that will be returned as well, so that I know where to redierct the user after successful payment? Once again thanks!

Do you have any example of javascript redirect code?

This is c#

string _jscript = "<script type=\"text/javascript\">window.location = 'http://www.yourwebsite.com?invoice="+ "12345"+"';</script>";
ClientScript.RegisterClientScriptBlock("".GetType(), "s", _jscript);

 Also, can I send some additional parameters to Authorize.net that will be returned as well, so that I know where to redierct the user after successful payment?

Yes you can send as many merchant defined fields as you like, just make sure it is not the same fields name(they all start with x_) from authorize.net.

Thanks for all your help. However, I am not sure where do I define fields? Do I just add any field name, ex. articleid, context and then add values to it? And on the relay page, just retrieve the values for those two fields?

I am not sure where do I define fields? Do I just add any field name, ex. articleid, context and then add values to it?

You just need to pass it with the post to the SIM. (where you post the x_loginID, x_fp_hash, etc).

 

And on the relay page, just retrieve the values for those two fields?

It will post back to the relay page, just check the Request.Form for the values. 

You can see what being post back by add this to the valid relay url and set the SIM to use it.

https://developer.authorize.net/tools/paramdump/index.php