cancel
Showing results for 
Search instead for 
Did you mean: 

AuthorizeNET DPM relayresponse URL won't redirect

I am coding to the AuthorizeNet DPM API. 

The issue is I have is I am trying to put security into the DPM relay response script on my server for security reasons to do a checksum on the hash and other information coming back from AuthorizeNet to verify the response is legit.  My program does a response.redirect to an error page if it is not legit. 

 

I'm not sure how, but the AuthorizeNet is simply "ignoring" my redirect from the server to the error page and only showing the page as if it is authentic when it has clearly failed several tests.  Any ideas on "how" it is doing this and how to make it stop?

spastic
Contributor
10 REPLIES 10

only showing the page as if it is authentic when it has clearly failed several tests.??? How do you know if it failed?

RaynorC1emen7
Expert

Ok, the problem appears to be that I can't show the master page and that is what is causing the issue.  The masterpage has to be a virtual path, ie.

 

MasterPageFile="~/Site.Master"

 

It can't find the virtual path.  I have also tried just Site.Master.

I looked at that solution.  Not following you.

I see that I have to hardcode a lot of the url's for the images.  However, a master page cannot be hardcoded, the directory has to be virtual.

 

So in that reply, you are saying...use a page that has no "real display".  Save the data and then use a javascript redirect to a real page that has images and the master page?  I had issues with a redirect...because the redirect still has the same problems.  So I tried that already and it didn't work.

I had issues with a redirect...because the redirect still has the same problems.  So I tried that already and it didn't work.

If it fail with a javascript redirect, that mean your page is not working at all.

My page works fine....just the images and style sheet don't show up.

 

Can you give me a code example of a Javascript redirect...even pseudo code.   I simply am not following you.  Why do I even need Javascript??  I can do a response.redirect which would have the same effect as Javascript.  I'm in asp.net.

 

When I do that, it does not "escape" me from the problem.  The response.redirect is executed still "within" the domain of AuthorizeNet (as would be a javascript redirect)....so the graphics and other issues still have the same problems.  Are you waiting a certain time sufficient enough for AuthorizeNet to show the page and then the redirect happens "away" from AuthorizeNET?

 

 

<script language=”javascript” type=”text/javascript”>window.location.href='somewebsite';</script>

 

a response.redirect is process on the server, so it will stay in the authorize.net, while a javascript redirect is process on the user web browser, it will be like they type in the url on the address bar.

 

ahh...so you are saying using the AuthorizeNet relay to provide the server response at the low level, then redirect once the user sees it, to immediately go to a working graphics page.  I'll try it...that sounds like the solution.

Well it works 90%.

When it redirects, authorizenet throws this text into my page for some reason.  I am able to test with and without authorizeNet using a flag, so this is 100% an authorizenet artifact.

 

â„¢

 Ok, looking deeper, it seems to that text relates to this html, the little TM...messes it up.

 

<sup><font face="Arial" size="6">™</font></sup>