cancel
Showing results for 
Search instead for 
Did you mean: 

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

tomvance1
Contributor
5 REPLIES 5

What is the error message said?

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

RaynorC1emen7
Expert

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

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?

 

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. 

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.