<?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 $_POST fields lost with DPM when relay_url moved out of root directory in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/POST-fields-lost-with-DPM-when-relay-url-moved-out-of-root/m-p/31338#M16340</link>
    <description>&lt;P&gt;I am upgrading a legacy website (that uses old WebLink integration method with Auth.Net) to use the Direct Post Method so that I can populate an online database with the results of&amp;nbsp;transactions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a test account, and downloaded the sample code, which uses a file named 'direct_post.php' for both the relay_url and the receipt page.&amp;nbsp; In the sample code, direct_post.php is located in the website's root directory.&amp;nbsp; When tested in this way, everything works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then took the next step, trying to move the 'direct_post.php' to the php folder in my directory structure.&amp;nbsp; In doing so, I changed x_relay_url&amp;nbsp;in the POST&amp;nbsp;to Auth.net to point to the new location, updated the Relay Response URL&amp;nbsp;in my&amp;nbsp;test account,&amp;nbsp;and tried again.&amp;nbsp; Authorize.Net's transaction response DOES make it to direct_post in the new location, but all $_POST variables are lost - so I am unable to process the transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the direct_post file as downloaded w/ sample - I've added code that&amp;nbsp;immediately finds, and prints to a file, the size of the POST and GET arrays.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Direct_post.php:&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php
require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK
$url = "&lt;A href="http://www.myweb.com/direct_post.php" target="_blank"&gt;http://www.myweb.com/direct_post.php&lt;/A&gt;";
//$url = "&lt;A href="http://www.myweb.com/websitePages/php/direct_post.php" target="_blank"&gt;http://www.myweb.com/websitePages/php/direct_post.php&lt;/A&gt;";
$api_login_id = 'myapilogin';
$transaction_key = 'mytransactionKey';
$md5_setting = 'myapilogin'; // Your MD5 Setting

$myString = "inside direct_post with POST count of ".count($_POST)." and count of GET of ". count($_GET)."";
					$fname = "debug_".time().".txt";
					$fp = fopen("$fname",'a');
					fwrite($fp,$myString);
					fclose($fp);

AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);
?&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "&lt;A href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/A&gt;"&amp;gt;
&amp;lt;html xmlns="&lt;A href="http://www.w3.org/1999/xhtml" target="_blank"&gt;http://www.w3.org/1999/xhtml&lt;/A&gt;"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When direct_post resides in the root directory, the file that is created correctly shows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp; inside direct_post with POST count of 61 and count of GET of 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I move direct_post to lower in the directory structure, the file generated shows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;&amp;gt;&amp;nbsp; inside direct_post with POST count of 0 and count of GET of 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea what could be happening?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Nov 2012 20:59:28 GMT</pubDate>
    <dc:creator>dstocks</dc:creator>
    <dc:date>2012-11-08T20:59:28Z</dc:date>
    <item>
      <title>$_POST fields lost with DPM when relay_url moved out of root directory</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/POST-fields-lost-with-DPM-when-relay-url-moved-out-of-root/m-p/31338#M16340</link>
      <description>&lt;P&gt;I am upgrading a legacy website (that uses old WebLink integration method with Auth.Net) to use the Direct Post Method so that I can populate an online database with the results of&amp;nbsp;transactions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a test account, and downloaded the sample code, which uses a file named 'direct_post.php' for both the relay_url and the receipt page.&amp;nbsp; In the sample code, direct_post.php is located in the website's root directory.&amp;nbsp; When tested in this way, everything works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then took the next step, trying to move the 'direct_post.php' to the php folder in my directory structure.&amp;nbsp; In doing so, I changed x_relay_url&amp;nbsp;in the POST&amp;nbsp;to Auth.net to point to the new location, updated the Relay Response URL&amp;nbsp;in my&amp;nbsp;test account,&amp;nbsp;and tried again.&amp;nbsp; Authorize.Net's transaction response DOES make it to direct_post in the new location, but all $_POST variables are lost - so I am unable to process the transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the direct_post file as downloaded w/ sample - I've added code that&amp;nbsp;immediately finds, and prints to a file, the size of the POST and GET arrays.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Direct_post.php:&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php
require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK
$url = "&lt;A href="http://www.myweb.com/direct_post.php" target="_blank"&gt;http://www.myweb.com/direct_post.php&lt;/A&gt;";
//$url = "&lt;A href="http://www.myweb.com/websitePages/php/direct_post.php" target="_blank"&gt;http://www.myweb.com/websitePages/php/direct_post.php&lt;/A&gt;";
$api_login_id = 'myapilogin';
$transaction_key = 'mytransactionKey';
$md5_setting = 'myapilogin'; // Your MD5 Setting

$myString = "inside direct_post with POST count of ".count($_POST)." and count of GET of ". count($_GET)."";
					$fname = "debug_".time().".txt";
					$fp = fopen("$fname",'a');
					fwrite($fp,$myString);
					fclose($fp);

AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);
?&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "&lt;A href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/A&gt;"&amp;gt;
&amp;lt;html xmlns="&lt;A href="http://www.w3.org/1999/xhtml" target="_blank"&gt;http://www.w3.org/1999/xhtml&lt;/A&gt;"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When direct_post resides in the root directory, the file that is created correctly shows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp; inside direct_post with POST count of 61 and count of GET of 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I move direct_post to lower in the directory structure, the file generated shows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;&amp;gt;&amp;nbsp; inside direct_post with POST count of 0 and count of GET of 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea what could be happening?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2012 20:59:28 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/POST-fields-lost-with-DPM-when-relay-url-moved-out-of-root/m-p/31338#M16340</guid>
      <dc:creator>dstocks</dc:creator>
      <dc:date>2012-11-08T20:59:28Z</dc:date>
    </item>
  </channel>
</rss>

