<?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: Trouble testing DPM in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19548#M10763</link>
    <description>&lt;P&gt;Where did you get that code from? My version of the SDK has this (from AuthorizeNetDPM.php):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And this (from AuthorizeNetSIM.php, which DPM inherits from):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public static function getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp)
    {
        $api_login_id = ($api_login_id ? $api_login_id : (defined('AUTHORIZENET_API_LOGIN_ID') ? AUTHORIZENET_API_LOGIN_ID : ""));
        $transaction_key = ($transaction_key ? $transaction_key : (defined('AUTHORIZENET_TRANSACTION_KEY') ? AUTHORIZENET_TRANSACTION_KEY : ""));
        if (function_exists('hash_hmac')) {
            return hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key); 
        }
        return bin2hex(mhash(MHASH_MD5, $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key));
    }&lt;/PRE&gt;&lt;P&gt;If I had to guess from the error you say you're getting now, you're not including one of the values that goes into the fingerprint. If it were my code, I could probably find the problem fairly quickly, but it may be a bit hard by remote control.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2011 07:16:14 GMT</pubDate>
    <dc:creator>TJPride</dc:creator>
    <dc:date>2011-12-01T07:16:14Z</dc:date>
    <item>
      <title>Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19482#M10730</link>
      <description>&lt;P&gt;I'm using the DPM integration method, and regardless of what details I enter it returns the response code 3. That's supposed to mean that the card is declined, but it gives that when I use the test card info from the help files and when I use real credit card info as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the simplified test page which has nothing but the sample html with the values plugged in:&amp;nbsp;&lt;A href="https://www.reellocations.com/clonedir/testpage.html" target="_blank"&gt;https://www.reellocations.com/clonedir/testpage.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know what I could be missing here?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2011 14:25:51 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19482#M10730</guid>
      <dc:creator>Gavagai</dc:creator>
      <dc:date>2011-11-30T14:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19486#M10732</link>
      <description>&lt;P&gt;It hard to said without the&amp;nbsp;Response Reason Codes. The response_reason_text point to the x_fp_hash being wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://developer.authorize.net/guides/AIM/Transaction_Response/Response_Reason_Codes_and_Response_Reason_Text.htm" target="_blank"&gt;http://developer.authorize.net/guides/AIM/Transaction_Response/Response_Reason_Codes_and_Response_Reason_Text.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a debug tool from authorize.net&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.authorize.net/tools/responsecode99/" target="_blank"&gt;https://developer.authorize.net/tools/responsecode99/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2011 15:47:55 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19486#M10732</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-11-30T15:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19492#M10735</link>
      <description>&lt;P&gt;The response code is 3, but I'm not seeing &amp;nbsp;a response reason code. The only values it's posting back to me are these:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[response_code] =&amp;gt; 3&lt;/P&gt;&lt;P&gt;[response_reason_text] =&amp;gt; (TESTMODE) This transaction cannot be accepted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2011 16:35:19 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19492#M10735</guid>
      <dc:creator>Gavagai</dc:creator>
      <dc:date>2011-11-30T16:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19494#M10736</link>
      <description>&lt;P&gt;Temporarily change the applicable line in the relay response page to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$redirect_url .= '?response_reason_code='.$response-&amp;gt;response_reason_code . '&amp;amp;response_reason_text=' . $response-&amp;gt;response_reason_text;&lt;/PRE&gt;&lt;P&gt;The error, as far as I can tell, has to do with a bad fingerprint. But there's no way to tell what's specifically wrong with it without the response reason code being passed to the error page.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2011 16:43:56 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19494#M10736</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-11-30T16:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19498#M10738</link>
      <description>&lt;P&gt;I see I didn't have the&amp;nbsp;x_tran_key field that&amp;nbsp;&lt;A href="https://developer.authorize.net/tools/responsecode99/" target="_blank"&gt;https://developer.authorize.net/tools/responsecode99/&lt;/A&gt;&amp;nbsp;says is required. However, I added it and that made no difference, same response. Edit: nevermind I see that should not be in there as a field so I took it back out.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2011 17:05:46 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19498#M10738</guid>
      <dc:creator>Gavagai</dc:creator>
      <dc:date>2011-11-30T17:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19502#M10740</link>
      <description>&lt;P&gt;I've made the suggested change and got a response_reason_code of &amp;nbsp;97. This indicates "Applicable only to SIM API. Fingerprints are only valid for a short period of time. If the fingerprint is more than one hour old or more than 15 minutes into the future, it will be rejected. This code indicates that the transaction fingerprint has expired."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was intending to do DPM though not SIM.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2011 17:04:46 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19502#M10740</guid>
      <dc:creator>Gavagai</dc:creator>
      <dc:date>2011-11-30T17:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19504#M10741</link>
      <description>&lt;P&gt;DPM, SIM, AIM all use the same URL location. It just required some different inputs. It the timestamp hard coded?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Test your &lt;SPAN&gt;x_fp_timestamp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://developer.authorize.net/tools/responsecode97" target="_blank"&gt;http://developer.authorize.net/tools/responsecode97&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2011 17:11:45 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19504#M10741</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-11-30T17:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19526#M10752</link>
      <description>&lt;P&gt;DPM is layered on top of SIM, so the same fingerprint errors apply to both. From the DPM lib:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    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);&lt;/PRE&gt;&lt;P&gt;The problem is that your local time is not the time that Authorize.net expects - either GMT or whatever your control panel is set to (I'm not sure which). You need to add to or subtract from $time so it matches up.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2011 20:52:44 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19526#M10752</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-11-30T20:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19538#M10758</link>
      <description>&lt;P&gt;So I realized, of course it was expired -- because that was a .html simplified copy of the original PHP page. I went back to testing the PHP version ( &lt;A href="https://www.reellocations.com/clonedir/index.php?action=bulksponsor" target="_blank"&gt;https://www.reellocations.com/clonedir/index.php?action=bulksponsor&lt;/A&gt;&amp;nbsp;)&amp;nbsp;and got response reason code 99 instead: "The server-generated fingerprint does not match the merchant-specified fingerprint in the x_fp_hash field."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the PHP I'm using to generate the x_fp_hash field (hard-coded the number for testing):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;authnet_fingerprint('19.95');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's calling the authnet_fingerprint function from the SDK.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2011 04:46:07 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19538#M10758</guid>
      <dc:creator>Gavagai</dc:creator>
      <dc:date>2011-12-01T04:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19540#M10759</link>
      <description>&lt;P&gt;Correction: sorry, that wasn't an SDK function, here's the functions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;function authnet_fingerprint($amount)&lt;BR /&gt;{&amp;nbsp;&lt;BR /&gt;global $settings;&lt;BR /&gt;$apt_login_id = $settings-&amp;gt;authorizenet;&lt;BR /&gt;$transaction_key = $settings-&amp;gt;authorizenettransactionkey;&lt;BR /&gt;$fp_sequence = authnet_sequence();&lt;BR /&gt;$fp_timestamp = authnet_timestamp();&lt;BR /&gt;&lt;BR /&gt;$api_login_id = ($api_login_id ? $api_login_id : (defined('AUTHORIZENET_API_LOGIN_ID') ? AUTHORIZENET_API_LOGIN_ID : ""));&lt;BR /&gt;$transaction_key = ($transaction_key ? $transaction_key : (defined('AUTHORIZENET_TRANSACTION_KEY') ? AUTHORIZENET_TRANSACTION_KEY : ""));&lt;BR /&gt;if (function_exists('hash_hmac')) {&lt;BR /&gt;return hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key);&lt;BR /&gt;}&lt;BR /&gt;return bin2hex(mhash(MHASH_MD5, $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;function authnet_sequence()&lt;BR /&gt;{&lt;BR /&gt;global $cache; // we cache this not for speed, but to make sure the same value gets used in each spot even if time second changes&lt;BR /&gt;if (!isset($cache['authnet_sequence'])) $cache['authnet_sequence'] = time();&lt;BR /&gt;return $cache['authnet_sequence'];&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;function authnet_timestamp()&lt;BR /&gt;{&lt;BR /&gt;global $cache; // we cache this not for speed, but to make sure the same value gets used in each spot even if time second changes&lt;BR /&gt;if (!isset($cache['authnet_timestamp'])) $cache['authnet_timestamp'] = time();&lt;BR /&gt;return $cache['authnet_timestamp'];&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2011 05:05:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19540#M10759</guid>
      <dc:creator>Gavagai</dc:creator>
      <dc:date>2011-12-01T05:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19548#M10763</link>
      <description>&lt;P&gt;Where did you get that code from? My version of the SDK has this (from AuthorizeNetDPM.php):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And this (from AuthorizeNetSIM.php, which DPM inherits from):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public static function getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp)
    {
        $api_login_id = ($api_login_id ? $api_login_id : (defined('AUTHORIZENET_API_LOGIN_ID') ? AUTHORIZENET_API_LOGIN_ID : ""));
        $transaction_key = ($transaction_key ? $transaction_key : (defined('AUTHORIZENET_TRANSACTION_KEY') ? AUTHORIZENET_TRANSACTION_KEY : ""));
        if (function_exists('hash_hmac')) {
            return hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key); 
        }
        return bin2hex(mhash(MHASH_MD5, $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $transaction_key));
    }&lt;/PRE&gt;&lt;P&gt;If I had to guess from the error you say you're getting now, you're not including one of the values that goes into the fingerprint. If it were my code, I could probably find the problem fairly quickly, but it may be a bit hard by remote control.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2011 07:16:14 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19548#M10763</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-12-01T07:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble testing DPM</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19684#M10831</link>
      <description>&lt;P&gt;Found I typoed $api_login_id as $apt_login_id, fixed that and it works now. :)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2011 15:48:40 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-testing-DPM/m-p/19684#M10831</guid>
      <dc:creator>Gavagai</dc:creator>
      <dc:date>2011-12-05T15:48:40Z</dc:date>
    </item>
  </channel>
</rss>

