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

Re: DPM - Custom Receipt Page

What is on this SIM.aspx page?

 

I think all you need is  set x_Relay_response to false to use the authorize.net default receipt page.

Highlighted
Contributor
Posts: 20
Registered: ‎11-06-2012

Re: DPM - Custom Receipt Page

The SIM.aspx page has all the logic to mark payments as received, etc in our application. I have to have that logic. There is nothing showing on the screen for that page however. Can I just display the receipt on that page? Any downside to that? will it work? What about if the client refreshest that page? Will it trigger the logic again...yes...?

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

Re: DPM - Custom Receipt Page

I assume you are saving the response(Request.Form) on the SIM.aspx page to the Database. Just pass a unique random key to the reciept.aspx and read the data back from the database.

p.s. don't use response.redirect(), instead use a javascript redirect so the URL will change to your website.

Highlighted
Contributor
Posts: 20
Registered: ‎11-06-2012

Re: DPM - Custom Receipt Page

We are not saving the form itself. We have most of the transaction information that we saved prior to submitting the card information. I guess we can just pull that back to show. What is the advantage of saving the form itself?

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

Re: DPM - Custom Receipt Page

Not saving the form, just the response (e.g. Request.Form["x_response_code"]), you don't save the transactionID and/or authorization code?

Highlighted
Contributor
Posts: 20
Registered: ‎11-06-2012

Re: DPM - Custom Receipt Page

Yes, we are saving the Request["x_trans_id"]. We could save the auth code also. Then I guess we should just pull our info from the database? and if we need anything else from the response that we are not currently saving we will have to save it. Thanks for all the help.

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

Re: DPM - Custom Receipt Page

Or you can just pass it on the URL, if you have no reason to save those other info.

Highlighted
Contributor
Posts: 20
Registered: ‎11-06-2012

Re: DPM - Custom Receipt Page

Okay that will work too. Is there a specific way you recommend to do the javascript redirect? or just the basic?

 

<script type="text/javascript">
<!--
window.location = "http://www.google.com/"
//-->
</script>
Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: DPM - Custom Receipt Page

That would work if you don't need to pass any url param

 

If you want to add something to the url do something like this on the page_load.

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