cancel
Showing results for 
Search instead for 
Did you mean: 

DPM vs SIM

I understand that DPM gives user a wider flexibility of using our own Payment, relay url and Receipt form. Where as in SIM, we use Authorize.net's hosted payment form and receipt form.

 

Is there any possibility of using hosted payment form but use relay url and receipt form using DPM? The reason for this is our project requirement mandates to use hosted payment form and have full control of receipt form. I have tried using this way with sandbox account, but could not get relay url working even though transaction got approved.

smartk1977
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions
if (referrer.substr(0,7)=="http://") referrer = referrer.substr(7);
      if (referrer.substr(0,8)=="https://") referrer = referrer.substr(8);
      if (referrer && referrer.indexOf(document.location.hostname) != 0) {

Not 100% sure, but that look like you try to compare the when the request is from, and since it from authorize.net and not your site, it failed.

View solution in original post

10 REPLIES 10

Both SIM/DPM use relay url and receipt form.

The only different is the hosted payment form.

 

read the basics and trouble shooting

http://community.developer.authorize.net/t5/The-Authorize-Net-Developer-Blog/Relay-Response-Basics-a...

 

Look at doc

http://developer.authorize.net/api/dpm/

http://developer.authorize.net/api/sim/

RaynorC1emen7
Expert

Thanks for the links, now I am clear. However, when I give the following html tags exactly as mentioned in sample code of SIM authorize.net + relay url, my transaction is getting approved but the relay url is not being called. I just see blank page with url "https://test.authorize.net/gateway/transact.dll". I have also added "relayurl" in Merchant account under Response/Receipt URLs of   Default Relay Response URL. I am not really sure what I am missing.

 

<FORM NAME='formName' ID='formID' ACTION='https://test.authorize.net/gateway/transact.dll' METHOD='POST'>
      <INPUT TYPE='HIDDEN' NAME='x_login' VALUE='djljk'>
      <INPUT TYPE='HIDDEN' NAME='x_fp_sequence' VALUE='111'>
      <INPUT TYPE='HIDDEN' NAME='x_fp_timestamp' VALUE='222'>
      <INPUT TYPE='HIDDEN' NAME='x_fp_hash' VALUE='dfhdkfhd'>
      <INPUT TYPE='HIDDEN' NAME='x_version' VALUE='3.1'>
      <INPUT TYPE='HIDDEN' NAME='x_method' VALUE='CC'>
      <INPUT TYPE='HIDDEN' NAME='x_type' VALUE='AUTH_ONLY'>
      <INPUT TYPE='TEXT' NAME='x_amount' VALUE='77'>
      <INPUT TYPE='HIDDEN' NAME='x_show_form' VALUE='payment_form'>
      <INPUT TYPE='HIDDEN' NAME='x_test_request' VALUE='FALSE'> 
      <input type='hidden' name='x_relay_url' value='relayurl' />
      <input type='hidden' name='x_relay_response' value='TRUE' />

      <INPUT TYPE='SUBMIT' NAME='submit_button' VALUE='Submit' CLASS='null'>
    </FORM>

Are you getting an error? the receipt page?

No I am just getting a blank page with url staying at "https://test.authorize.net/gateway/transact.dll" when I give correct credit card information. I have double checked sandbox merchant account to see approved transactions. This is simple SIM App, but not at all sure what I am missing.

 

On the other hand, when I ran another application using DPM and custom payment form, everything works fine.

 

Can you please confirm whether it is mandatory to set relay url in merchant account for SIM? The reason is when I set this url manually, DPM stopped working.

 

 

That how it what it relay the response of your relay response URL, the url stay at authorize.net unless you do a javascript to redirect it to your site

 

On the other hand, when I ran another application using DPM and custom payment form, everything works fine.

Can you please confirm whether it is mandatory to set relay url in merchant account for SIM? The reason is when I set this url manually, DPM stopped working.

 

So DPM and SIM have different relay URL, you have to check your url page to see what the different are.

You can either setup multiple relay url(one for DPM and one for SIM), or not set it at all.

 

Thanks for clear explanation. This means a lot for novice users of authorize.net. Ok, to make it simple, I have just created only one application (web project in java) with following pages where both sim/dpm payment forms use other pages.

 

     a) sim payment form

     b) dpm payment form

     c) relay page (uses java script to redirect to receipt page)

     d) receipt page

 

DPM page works perfectly fine with custom payment form by showing receipt page at end. SIM page takes to blank page with url "https://test.authorize.net/gateway/transact.dll". In both cases transactions are approved. Currently, I did not set any redirect/receipt urls in merchant interface.

 

Please guide me with your insights.

How are you redirecting the screen. Sound like it failed.

Can you look in the browser page source on the "blank" relay page? or run a http network monitor like Fiddler to see if there an error?

I am using javascript to redirect and the following page source of relay url clearly says that transaction is approved,but not going to receipt page. Just to let you know I copied receipt url from the below text and could access that page on browser. Also, this relay url works fine when I use dpm page. This must be some redirection problem. By any chance do I need to change any settings to use sim in merchant account?

 

 

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Helper</title>
    </head>
    <body>
        
            
     
    </body>
</html>


<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Payment Gateway Relay URL</title>
    </head>
    <body>
        
   <script type="text/javascript">    
      var referrer = document.referrer;
      if (referrer.substr(0,7)=="http://") referrer = referrer.substr(7);
      if (referrer.substr(0,8)=="https://") referrer = referrer.substr(8);
      if (referrer && referrer.indexOf(document.location.hostname) != 0) {

      
            
        // Use Javascript to redirect the page to the receipt redirect url.
        // If Javascript is not available, then the <meta> refresh tag will handle the redirect. 
        document.location = "http://abc/def/receipt.jsp?x_invoice_num=&x_response_code=1&x_response_reason_code=1&x_response_reason_text=This+transaction+has+been+approved.&x_trans_id=2228334517";
      }
    
    </script>
    
    <noscript>
        <meta http-equiv="refresh" content="0;url=http://abc/def/receipt.jsp?x_invoice_num=&x_response_code=1&x_response_reason_code=1&x_response_reason_text=This+transaction+has+been+approved.&x_trans_id=2228334517">
    </noscript>
    
    </body>
</html>
 
if (referrer.substr(0,7)=="http://") referrer = referrer.substr(7);
      if (referrer.substr(0,8)=="https://") referrer = referrer.substr(8);
      if (referrer && referrer.indexOf(document.location.hostname) != 0) {

Not 100% sure, but that look like you try to compare the when the request is from, and since it from authorize.net and not your site, it failed.