Reply
Highlighted
Contributor
Posts: 13
Registered: ‎05-08-2015

DPM/SIM Error Page not Redirecting

I am using the DPM method for a payment form on a clients website,

 

I am sending it the x_relay_url paremeter and setting the x_relay_always to true, and if the payement is sucessful (i.e the card number is right etc..) everything works as expected, i get all the POST data and the page reditrects using the javascript as per the documentation (http://www.authorize.net/support/SIM_guide.pdf ) - page 104.

 

However issues occur when the payment is unsuccessful, i am just left on the authorize page with a white page and the error message in black text, ideally i would want the page to redirect also or at least have some control over the look of the page.

 

Any help would be appreciated,

 

Tom

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

Re: DPM/SIM Error Page not Redirecting

What is the error message said?

On you relay response page did you have any logic before the javascript?

Highlighted
Contributor
Posts: 13
Registered: ‎05-08-2015

Re: DPM/SIM Error Page not Redirecting

The erorr message is relating to the issue with the card for example "Card Number Is Wrong".

 

Yes I do, although surely it needs to be there incase of a successful order?

 

Tom

Highlighted
Contributor
Posts: 18
Registered: ‎08-27-2013

Re: DPM/SIM Error Page not Redirecting

That is odd. I can confirm for you that we get the redirect for all responses, successful or not.

Are you doing *anything* different if the response is an error?

 

Highlighted
Contributor
Posts: 13
Registered: ‎05-08-2015

Re: DPM/SIM Error Page not Redirecting

If my relay script picks up an error, it should redirect to an error page (i base this off the x_response_code), and if successful i go to a success page. 

Highlighted
Contributor
Posts: 18
Registered: ‎08-27-2013

Re: DPM/SIM Error Page not Redirecting

Well, FWIW, we don't do anything different. When we receive the DPM POST from authorize.net, all we do is log the result and return this:

 

<html>
<head>
  <noscript>
    <meta http-equiv="refresh" content="0;url=<%= $url_with_token %>" />
  </noscript>
</head>
<body onload="document.forms[0].submit();">
  <form method="post" action="<%= $url %>">
    <input type="hidden" name="token" value="<%= $token %>" />
  </form>
  Please wait, processing...
</body>
</html>

The $url points back to the status result page on our site. There, we show either the success or error message, depending on the previously stored result.