<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can't get DPM to work in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/20186#M11077</link>
    <description>&lt;PRE&gt;form  page below named:
direct_post.php	


		  &amp;lt;?php
require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK
$url = "&lt;A target="_blank" href="http://mysite.com/direct_post.php"&gt;http://mysite.com/direct_post.php&lt;/A&gt;";
$api_login_id = 'myloginidiscorrect';
$transaction_key = 'transactionkeyiscorrect';
$md5_setting = 'myloginidiscorrect''; // Your MD5 Setting
$amount = "0.19";
AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);
?&amp;gt;

and than this page.

AuthorizeNetDPM.php

I changed the sandbox url from test to secure.

I put my login id for my $md5_setting = 'loginid'

&amp;lt;?php
/**
 * Demonstrates the Direct Post Method.
 *
 * To implement the Direct Post Method you need to implement 3 steps:
 *
 * Step 1: Add necessary hidden fields to your checkout form and make your form is set to post to AuthorizeNet.
 *
 * Step 2: Receive a response from AuthorizeNet, do your business logic, and return
 *         a relay response snippet with a url to redirect the customer to.
 *
 * Step 3: Show a receipt page to your customer.
 *
 * This class is more for demonstration purposes than actual production use.
 *
 *
 * @package    AuthorizeNet
 * @subpackage AuthorizeNetDPM
 */

/**
 * A class that demonstrates the DPM method.
 *
 * @package    AuthorizeNet
 * @subpackage AuthorizeNetDPM
 */
class AuthorizeNetDPM extends AuthorizeNetSIM_Form
{

    const LIVE_URL = '&lt;A target="_blank" href="https://secure.authorize.net/gateway/transact.dll';"&gt;https://secure.authorize.net/gateway/transact.dll';&lt;/A&gt;
    const SANDBOX_URL = '&lt;A target="_blank" href="https://secure.authorize.net/gateway/transact.dll';"&gt;https://secure.authorize.net/gateway/transact.dll';&lt;/A&gt;

    /**
     * Implements all 3 steps of the Direct Post Method for demonstration
     * purposes.
     */
    public static function directPostDemo($url, $api_login_id, $transaction_key, $amount = "0.00", $md5_setting = "myloginid")
    {
        
        // Step 1: Show checkout form to customer.
        if (!count($_POST) &amp;amp;&amp;amp; !count($_GET))
        {
            $fp_sequence = time(); // Any sequential number like an invoice number.
            echo AuthorizeNetDPM::getCreditCardForm($amount, $fp_sequence, $url, $api_login_id, $transaction_key);
        }
        // Step 2: Handle AuthorizeNet Transaction Result &amp;amp; return snippet.
        elseif (count($_POST)) 
        {
            $response = new AuthorizeNetSIM($api_login_id, $md5_setting);
            if ($response-&amp;gt;isAuthorizeNet()) 
            {
                if ($response-&amp;gt;approved) 
                {
                    // Do your processing here.
                    $redirect_url = $url . '?response_code=1&amp;amp;transaction_id=' . $response-&amp;gt;transaction_id; 
                }
                else
                {
                    // Redirect to error page.
                    $redirect_url = $url . '?response_code='.$response-&amp;gt;response_code . '&amp;amp;response_reason_text=' . $response-&amp;gt;response_reason_text;
                }
                // Send the Javascript back to AuthorizeNet, which will redirect user back to your site.
                echo AuthorizeNetDPM::getRelayResponseSnippet($redirect_url);
            }
            else
            {
                echo "Error -- not AuthorizeNet. Check your MD5 Setting.";
            }
        }
        // Step 3: Show receipt page to customer.
        elseif (!count($_POST) &amp;amp;&amp;amp; count($_GET))
        {
            if ($_GET['response_code'] == 1)
            {
                echo "Thank you for your purchase! Transaction id: " . htmlentities($_GET['transaction_id']);
            }
            else
            {
              echo "Sorry, an error occurred: " . htmlentities($_GET['response_reason_text']);
            }
        }
    }
    
    /**
     * A snippet to send to AuthorizeNet to redirect the user back to the
     * merchant's server. Use this on your relay response page.
     *
     * @param string $redirect_url Where to redirect the user.
     *
     * @return string
     */
    public static function getRelayResponseSnippet($redirect_url)
    {
        return "&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;script language=\"javascript\"&amp;gt;
                &amp;lt;!--
                window.location=\"{$redirect_url}\";
                //--&amp;gt;
                &amp;lt;/script&amp;gt;
                &amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;noscript&amp;gt;&amp;lt;meta http-equiv=\"refresh\" content=\"1;url={$redirect_url}\"&amp;gt;&amp;lt;/noscript&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;";
    }
    
    /**
     * Generate a sample form for use in a demo Direct Post implementation.
     *
     * @param string $amount                   Amount of the transaction.
     * @param string $fp_sequence              Sequential number(ie. Invoice #)
     * @param string $relay_response_url       The Relay Response URL
     * @param string $api_login_id             Your API Login ID
     * @param string $transaction_key          Your API Tran Key.
     * @param bool   $test_mode                Use the sandbox?
     * @param bool   $prefill                  Prefill sample values(for test purposes).
     *
     * @return string
     */
    public static function getCreditCardForm($amount, $fp_sequence, $relay_response_url, $api_login_id, $transaction_key, $test_mode = true, $prefill = true)
    {
        $time = time();
        $fp = self::getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $time);
        $sim = new AuthorizeNetSIM_Form(
            array(
            'x_amount'        =&amp;gt; $amount,
            'x_fp_sequence'   =&amp;gt; $fp_sequence,
            'x_fp_hash'       =&amp;gt; $fp,
            'x_fp_timestamp'  =&amp;gt; $time,
            'x_relay_response'=&amp;gt; "TRUE",
            'x_relay_url'     =&amp;gt; $relay_response_url,
            'x_login'         =&amp;gt; $api_login_id,
            )
        );
        $hidden_fields = $sim-&amp;gt;getHiddenFieldString();
        $post_url = ($test_mode ? self::SANDBOX_URL : self::LIVE_URL);
        
        $form = '
        &amp;lt;style&amp;gt;
        fieldset {
            overflow: auto;
            border: 0;
            margin: 0;
            padding: 0; }

        fieldset div {
            float: left; }

        fieldset.centered div {
            text-align: center; }

        label {
            color: #183b55;
            display: block;
            margin-bottom: 5px; }

        label img {
            display: block;
            margin-bottom: 5px; }

        input.text {
            border: 1px solid #bfbab4;
            margin: 0 4px 8px 0;
            padding: 6px;
            color: #1e1e1e;
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
            border-radius: 5px;
            -webkit-box-shadow: inset 0px 5px 5px #eee;
            -moz-box-shadow: inset 0px 5px 5px #eee;
            box-shadow: inset 0px 5px 5px #eee; }
        .submit {
            display: block;
            background-color: #76b2d7;
            border: 1px solid #766056;
            color: #3a2014;
            margin: 13px 0;
            padding: 8px 16px;
            -webkit-border-radius: 12px;
            -moz-border-radius: 12px;
            border-radius: 12px;
            font-size: 14px;
            -webkit-box-shadow: inset 3px -3px 3px rgba(0,0,0,.5), inset 0 3px 3px rgba(255,255,255,.5), inset -3px 0 3px rgba(255,255,255,.75);
            -moz-box-shadow: inset 3px -3px 3px rgba(0,0,0,.5), inset 0 3px 3px rgba(255,255,255,.5), inset -3px 0 3px rgba(255,255,255,.75);
            box-shadow: inset 3px -3px 3px rgba(0,0,0,.5), inset 0 3px 3px rgba(255,255,255,.5), inset -3px 0 3px rgba(255,255,255,.75); }
        &amp;lt;/style&amp;gt;
        &amp;lt;form method="post" action="'.$post_url.'"&amp;gt;
                '.$hidden_fields.'
            &amp;lt;fieldset&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;Credit Card Number&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="15" name="x_card_num" value="'.($prefill ? '6011000000000012' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;Exp.&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="4" name="x_exp_date" value="'.($prefill ? '04/17' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;CCV&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="4" name="x_card_code" value="'.($prefill ? '782' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/fieldset&amp;gt;
            &amp;lt;fieldset&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;First Name&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="15" name="x_first_name" value="'.($prefill ? 'John' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;Last Name&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="14" name="x_last_name" value="'.($prefill ? 'Doe' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/fieldset&amp;gt;
            &amp;lt;fieldset&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;Address&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="26" name="x_address" value="'.($prefill ? '123 Main Street' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;City&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="15" name="x_city" value="'.($prefill ? 'Boston' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/fieldset&amp;gt;
            &amp;lt;fieldset&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;State&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="4" name="x_state" value="'.($prefill ? 'MA' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;Zip Code&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="9" name="x_zip" value="'.($prefill ? '02142' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
                &amp;lt;div&amp;gt;
                    &amp;lt;label&amp;gt;Country&amp;lt;/label&amp;gt;
                    &amp;lt;input type="text" class="text" size="22" name="x_country" value="'.($prefill ? 'US' : '').'"&amp;gt;&amp;lt;/input&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/fieldset&amp;gt;
            &amp;lt;input type="submit" value="BUY" class="submit buy"&amp;gt;
        &amp;lt;/form&amp;gt;';
        return $form;
    }

}


That's all the changes I've made.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2011 20:26:07 GMT</pubDate>
    <dc:creator>Hello0</dc:creator>
    <dc:date>2011-12-16T20:26:07Z</dc:date>
    <item>
      <title>Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8396#M5733</link>
      <description>&lt;P&gt;I have tried the SIM method an have gotten it to work. Now I am trying the DPM and I can not get it to work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am testing with the Coffee store example and have followed all the instructions and configured the config,php.&lt;/P&gt;&lt;P&gt;When I get to the checkout_form.php and press Buy I get this message:&lt;/P&gt;&lt;P&gt;3,2,13,The merchant login ID or password is invalid or the account is inactive.,,P,0,,,2.18,,auth_capture,,,,,,,,,,,,,,,,,,,,,,,,,,9F76D49A5960CCB8226C471FBB9C8277,,,,,,,,,,,,,,Bank Account,,,,,,,,,,,,,,,,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know my login ID and password are correct because I used them in the SIM method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help - Sam&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2010 15:24:26 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8396#M5733</guid>
      <dc:creator>SamLaundon</dc:creator>
      <dc:date>2010-12-08T15:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8436#M5752</link>
      <description>&lt;P&gt;Hello? Can some please reply to my question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you - Sam&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2010 13:41:31 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8436#M5752</guid>
      <dc:creator>SamLaundon</dc:creator>
      <dc:date>2010-12-09T13:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8450#M5758</link>
      <description>&lt;P&gt;where are you posting too - test or live - and what API keys are you using - test or live?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;___________________________________&lt;BR /&gt;&amp;lt;-- Kudos is always welcome....&lt;BR /&gt;TSdotNet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2010 15:22:57 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8450#M5758</guid>
      <dc:creator>TSdotNet</dc:creator>
      <dc:date>2010-12-09T15:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8476#M5770</link>
      <description>&lt;P&gt;I am positng to LIve (what do I have to change to make the post live?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And my API keys are also live.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2010 19:42:58 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8476#M5770</guid>
      <dc:creator>SamLaundon</dc:creator>
      <dc:date>2010-12-09T19:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8478#M5771</link>
      <description>&lt;P&gt;You want to change the configuration to post against this url:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://secure.authorize.net/gateway/transact.dll" target="_blank" rel="nofollow"&gt;https://secure.authorize.net/gateway/transact.dll&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe the SDK is setup to point to the test server by default.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2010 20:04:10 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8478#M5771</guid>
      <dc:creator>micduncan86</dc:creator>
      <dc:date>2010-12-09T20:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8498#M5781</link>
      <description>&lt;P&gt;Do you know what file in the SDK I should change from test to secure? There is no place in the config.php to change the settings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As many have stateted before, very poor documentation on DPM. There should be some explaination about the difference between test and live.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2010 13:52:33 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8498#M5781</guid>
      <dc:creator>SamLaundon</dc:creator>
      <dc:date>2010-12-10T13:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8500#M5782</link>
      <description>&lt;P&gt;I think is In the checkout_form.php&lt;/P&gt;&lt;P&gt;&amp;lt;form method="post" action="&amp;lt;?php echo AuthorizeNetDPM::SANDBOX_URL?&amp;gt;"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;change that to&lt;/P&gt;&lt;P&gt;&amp;lt;form method="post" action="&amp;lt;?php echo AuthorizeNetDPM::LIVE_URL?&amp;gt;"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2010 14:29:23 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8500#M5782</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2010-12-10T14:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8502#M5783</link>
      <description>&lt;P&gt;Thank you, but that did not work. Still get the same error.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2010 14:50:37 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8502#M5783</guid>
      <dc:creator>SamLaundon</dc:creator>
      <dc:date>2010-12-10T14:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8506#M5785</link>
      <description>&lt;P&gt;Just want ot make sure.&lt;/P&gt;&lt;P&gt;On the config.php&lt;/P&gt;&lt;P&gt;You added your AUTHORIZENET_API_LOGIN_ID, AUTHORIZENET_API_LOGIN_ID,&lt;/P&gt;&lt;P&gt;change this to false point to live for AIM define("AUTHORIZENET_SANDBOX",false);&lt;/P&gt;&lt;P&gt;comment out $METHOD_TO_USE = "AIM";&lt;/P&gt;&lt;P&gt;uncomment out $METHOD_TO_USE = "DIRECT_POST";&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2010 15:48:50 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8506#M5785</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2010-12-10T15:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8512#M5788</link>
      <description>&lt;P&gt;I had everything set correctly except "comment out @METHOD_TO_USE = "AIM":&lt;/P&gt;&lt;P&gt;I commented this out, but still get the same error code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for trying - Sam&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2010 16:49:59 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8512#M5788</guid>
      <dc:creator>SamLaundon</dc:creator>
      <dc:date>2010-12-10T16:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8514#M5789</link>
      <description>&lt;P&gt;I don't know what else to change.&lt;/P&gt;&lt;P&gt;Can you post the browser page source when you are on the checkout_form.php page?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2010 17:11:02 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/8514#M5789</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2010-12-10T17:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18620#M10317</link>
      <description>&lt;P&gt;This is exactly my problem as well. I get a similar error message. I have a payment page on our site with a form. That form has its action set to my version of checkout_form.php with my custom fields added. When I run it the John Doe test page appears and if I click Buy I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3,2,13,The merchant login ID or password is invalid or the account is inactive.,,P,0,,,0.00,,auth_capture,,,,,,,,,,,,,,,,,,,,,,,,,,F68A9C87C1E1472521704EF38C21F647,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As must be apparent this is all new to me. I am also very eager to solve this dilemma. Thanks in advance for any help you can give.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chad&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2011 19:19:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18620#M10317</guid>
      <dc:creator>chad</dc:creator>
      <dc:date>2011-11-05T19:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18622#M10318</link>
      <description>&lt;P&gt;Just flinging this out, would this code work on a custom checkout_form page?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;?php 
$api_login_id = 'xxxxxxx'; // API Login
$transaction_key = 'xxxxxxxxx'; // Transaction key
echo '&amp;lt;form action="&lt;A href="https://secure.authorize.net/gateway/transact.dll" target="_blank"&gt;https://secure.authorize.net/gateway/transact.dll&lt;/A&gt;" method="post"&amp;gt;';
echo '&amp;lt;p&amp;gt;Name: &amp;lt;input type="text" size="20" name="name" /&amp;gt;&amp;lt;/p&amp;gt;';
echo '&amp;lt;p&amp;gt;Item: &amp;lt;input type="text" size="20" name="name" /&amp;gt;&amp;lt;/p&amp;gt;';
echo '&amp;lt;p&amp;gt;Amount: &amp;lt;input type="text" size="20" name="name" /&amp;gt;&amp;lt;/p&amp;gt;';
echo '&amp;lt;/form&amp;gt;';
?&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2011 21:22:17 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18622#M10318</guid>
      <dc:creator>chad</dc:creator>
      <dc:date>2011-11-07T21:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18624#M10319</link>
      <description>&lt;P&gt;Delete the post with your LoginID and TransactionKey. Never ever show it. Better yet, regen the TransactionKey.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Look at &lt;A href="http://developer.authorize.net/guides/DPM/java.htm" target="_blank"&gt;http://developer.authorize.net/guides/DPM/java.htm&lt;/A&gt; for the list of fields to send. And post to the secure.authorize.net site for you production implementation.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2011 21:36:05 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18624#M10319</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-11-05T21:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18626#M10320</link>
      <description>&lt;P&gt;FYI, I keep telling people this, but apparently it's a well-kept secret - you can output code in blocks instead of using a million print statements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php 
print &amp;lt;&amp;lt;&amp;lt;BLOCK
&amp;lt;form action="&lt;A href="https://secure.authorize.net/gateway/transact.dll" target="_blank"&gt;https://secure.authorize.net/gateway/transact.dll&lt;/A&gt;" method="post"&amp;gt;
&amp;lt;p&amp;gt;Name: &amp;lt;input type="text" size="20" name="name" /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Item: &amp;lt;input type="text" size="20" name="name" /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Amount: &amp;lt;input type="text" size="20" name="name" /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/form&amp;gt;
BLOCK;
?&amp;gt;&lt;/PRE&gt;&lt;P&gt;Also, I'm not sure what you were trying to do there, but it clearly isn't going to work. Even as a form, since you named all the fields the same thing. Look at the DPM code sample, and also go into your SDK in the lib folder and open the file AuthorizeNetDPM.php. There's a function in there called getCreditCardForm() which will show you more the sort of thing you need to be displaying.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2011 23:11:46 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18626#M10320</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-11-05T23:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18630#M10321</link>
      <description>&lt;P&gt;Yes, studid damned me! Thank you for pointing out the obvious folly. I sure wish my brain had done so first.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2011 23:58:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18630#M10321</guid>
      <dc:creator>chad</dc:creator>
      <dc:date>2011-11-05T23:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18632#M10322</link>
      <description>&lt;P&gt;Okay, I am both stupid and tweaked, a perilous combination to say the least. Let's set it right. I want to know if this is the kind of stucture I need to make the DPM option work using a custom made form. Just want to ask if this code is going in the right direction. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php 
$api_login_id = 'xxxxxxx'; // API Login
$transaction_key = 'xxxxxxx'; // Transaction key
echo '&amp;lt;form action="&lt;A href="https://secure.authorize.net/gateway/transact.dll" target="_blank"&gt;https://secure.authorize.net/gateway/transact.dll&lt;/A&gt;" method="post"&amp;gt;';
echo '&amp;lt;p&amp;gt;Name: &amp;lt;input type="text" size="20" name="name" /&amp;gt;&amp;lt;/p&amp;gt;';
echo '&amp;lt;p&amp;gt;Item: &amp;lt;input type="text" size="20" name="item" /&amp;gt;&amp;lt;/p&amp;gt;';
echo '&amp;lt;p&amp;gt;Amount: &amp;lt;input type="text" size="20" name="amount" /&amp;gt;&amp;lt;/p&amp;gt;';
echo '&amp;lt;button type="submit"&amp;gt;Submit&amp;lt;/button&amp;gt;';
echo '&amp;lt;/form&amp;gt;';
?&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2011 00:08:45 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18632#M10322</guid>
      <dc:creator>chad</dc:creator>
      <dc:date>2011-11-06T00:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18636#M10324</link>
      <description>&lt;P&gt;If you want to generate the entire form yourself, you're missing the credit card fields. DPM involves having the form on your site, but submitting it to a secure Authorize.net URL, so the data never actually goes through your server. As I said before, look in the PHP SDK, in the folder called lib, for a file called AuthorizeNetDPM.php. Look about halfway through and you'll see a function called getCreditCardForm. This is more like the HTML you should be using. If you just want to implement and move on, the code sample supplied by Authorize.net says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK
$url = "&lt;A href="http://YOUR_DOMAIN.com/direct_post.php" target="_blank"&gt;http://YOUR_DOMAIN.com/direct_post.php&lt;/A&gt;";
$api_login_id = 'YOUR_API_LOGIN_ID';
$transaction_key = 'YOUR_TRANSACTION_KEY';
$md5_setting = 'YOUR_API_LOGIN_ID'; // Your MD5 Setting
$amount = "5.99";
AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);&lt;/PRE&gt;&lt;P&gt;This calls directPostDemo(), which in turn calls getCreditCardForm(), which as I said is a good example of where to start. I'm afraid that while I'm fairly good with PHP and HTML, I haven't implemented DPM myself yet, so I can't just paste you three chunks of code and tell you to copy me - you have to be willing to do some digging and work it out yourself.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2011 04:31:21 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18636#M10324</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-11-06T04:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18648#M10330</link>
      <description>&lt;P&gt;Since the API Login and Transaction Key can only be processed unseen the only way to do it would seem to be like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;form name="payments" action="checkout_form.php" method="post"&amp;gt;
&amp;lt;p&amp;gt;Payer Name: &amp;lt;input type="text" size="20" name="name" /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Email: &amp;lt;input type="text" name="email" size="20" /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Phone: &amp;lt;input type="text" name="phone" size="20" /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Payment Description:&amp;lt;br /&amp;gt;
&amp;lt;textarea cols="18" rows="3" name="desc"&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Amount: &amp;lt;input type="text" name="amount" size="20" /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;button type="submit"&amp;gt;Make Payment&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Create a custom form with action="checkout_form.php"and then do this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php require_once 'php/anet_php_sdk/AuthorizeNet.php'; // The SDK
$relay_response_url = "&lt;A href="http://my_site.com/relay_response.php" target="_blank"&gt;http://my_site.com/relay_response.php&lt;/A&gt;"; 

$api_login_id = 'xxxxxx'; // API Login
$transaction_key = 'xxxxxx'; // Transaction key

// Custom fields
$payer = $_POST["pfirst"]." ".$_POST["plast"];
$email = $_POST["email"];
$phone = $_POST["phone"];
$description = $_POST["desc"];
$amount = $_POST["amount"];

// Add custom field variables to array&lt;BR /&gt;echo AuthorizeNetDPM::getCreditCardForm($payer, $camper, $email, $phone, $description, $amount, $relay_response_url,$api_login_id, $transaction_key);
?&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Edit checkout_form.php to include the custom fields. Sensible, no? But when you try to do it it returns the Test example because the whole thing seems set up to use &lt;EM&gt;AuthorizeNetDPM.php&lt;/EM&gt; which appears to have been designed as a demo. Is there another version of this file that only does LIVE processing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More to follow...&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2011 20:47:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18648#M10330</guid>
      <dc:creator>chad</dc:creator>
      <dc:date>2011-11-06T20:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get DPM to work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18650#M10331</link>
      <description>&lt;P&gt;I don't know how this thing is supposed to work, but I think I have a simple way to make it work, as in 1, 2, 3, 4, bingo!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Download file templates for &lt;EM&gt;checkout_form.php&lt;/EM&gt;, &lt;EM&gt;relay_response.php&lt;/EM&gt; and &lt;EM&gt;order_receipt.php&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Make a custom shopping cart page with its action set to checkout_form.php.&lt;/LI&gt;&lt;LI&gt;Edit checkout_form.php, adding to it API Number and Transaction Key along with all the custom field names. Make all required edits in the other two files to make them functional.&lt;/LI&gt;&lt;LI&gt;Go to your Account Center @ authorize.net and set up a Payment Receipt page that will include all the custom fields you will be sending.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;And that's it. What do you think?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2011 21:04:20 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Can-t-get-DPM-to-work/m-p/18650#M10331</guid>
      <dc:creator>chad</dc:creator>
      <dc:date>2011-11-06T21:04:20Z</dc:date>
    </item>
  </channel>
</rss>

