<?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: Writing to the authorize-net.log file in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Writing-to-the-authorize-net-log-file/m-p/83014#M52324</link>
    <description>&lt;P&gt;I'd like to add a couple comments here related to the security of the PHP version of the log file.&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; change the name of the log file - clearly it shouldn't be anything similar, add a date&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; add some security to the log file:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a)&amp;nbsp; add a unique subfolder to the LOG pathname,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b)&amp;nbsp; change the LOG extention to .PHP, then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c)&amp;nbsp; find the Log.php file in \authnet\lib\net\authorize\util and change line #269&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_put_contents($this-&amp;gt;logFile, $logMessage, $flags);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_put_contents($this-&amp;gt;logFile, "\n&amp;lt;?php\n".$logMessage."\n?&amp;gt;", $flags);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; so that the contents of the log file are wrapped in PHP delimiters, and will hide all the contents of the file in case someone guesses the log file name and tries to download it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;all the above at least adds some layers of obfuscation that make things harder to crack.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 16:29:27 GMT</pubDate>
    <dc:creator>jnewman67</dc:creator>
    <dc:date>2022-06-06T16:29:27Z</dc:date>
    <item>
      <title>Writing to the authorize-net.log file</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Writing-to-the-authorize-net-log-file/m-p/49821#M25351</link>
      <description>&lt;P&gt;I don't know if it is important, because things seem to be working OK with integration using the SIM method.&amp;nbsp; However, I was wondering how to write logging information to the authorize-net.log file ?&amp;nbsp; It is configured it my phphunit_config.php file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;define( "AUTHORIZENET_LOG_FILE",&amp;nbsp; "authorize-net.log");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it looks like it uses authorize-net.log by default if you don't define it.&amp;nbsp; However, I am not seeing any data in the log file.&amp;nbsp; Is that something that you have to turn on or is it suppose to do it by default?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only see that in code in HttpClient.php, AuthorizeNetRequest.php and in the test suite.&amp;nbsp; Just curious about what gets written there by default, if anything and how to enable it.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Feb 2015 14:37:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Writing-to-the-authorize-net-log-file/m-p/49821#M25351</guid>
      <dc:creator>sscotti</dc:creator>
      <dc:date>2015-02-28T14:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to the authorize-net.log file</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Writing-to-the-authorize-net-log-file/m-p/49909#M25433</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi &lt;SPAN class="UserName lia-user-name"&gt;&lt;A id="link_23" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/18017" target="_self"&gt;&lt;SPAN class=""&gt;sscotti&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If defined, the PHP SDK logfile should have information primarily from the httpclient class. This logging should not be enabled for production use because it logs full post data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joy&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2015 22:32:46 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Writing-to-the-authorize-net-log-file/m-p/49909#M25433</guid>
      <dc:creator>Joy</dc:creator>
      <dc:date>2015-03-06T22:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to the authorize-net.log file</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Writing-to-the-authorize-net-log-file/m-p/83014#M52324</link>
      <description>&lt;P&gt;I'd like to add a couple comments here related to the security of the PHP version of the log file.&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; change the name of the log file - clearly it shouldn't be anything similar, add a date&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; add some security to the log file:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a)&amp;nbsp; add a unique subfolder to the LOG pathname,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b)&amp;nbsp; change the LOG extention to .PHP, then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c)&amp;nbsp; find the Log.php file in \authnet\lib\net\authorize\util and change line #269&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_put_contents($this-&amp;gt;logFile, $logMessage, $flags);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_put_contents($this-&amp;gt;logFile, "\n&amp;lt;?php\n".$logMessage."\n?&amp;gt;", $flags);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; so that the contents of the log file are wrapped in PHP delimiters, and will hide all the contents of the file in case someone guesses the log file name and tries to download it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;all the above at least adds some layers of obfuscation that make things harder to crack.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 16:29:27 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Writing-to-the-authorize-net-log-file/m-p/83014#M52324</guid>
      <dc:creator>jnewman67</dc:creator>
      <dc:date>2022-06-06T16:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Writing to the authorize-net.log file</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Writing-to-the-authorize-net-log-file/m-p/83015#M52325</link>
      <description>&lt;P&gt;update - missed something - the replacement code should be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_put_contents($this-&amp;gt;logFile, "\n&amp;lt;?php /*\n".$logMessage." */\n?&amp;gt;", $flags);&lt;/P&gt;&lt;P&gt;this will wrap comment markers around the code, preventing the log files from throwing errors in your site's log file&amp;nbsp; &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 16:52:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Writing-to-the-authorize-net-log-file/m-p/83015#M52325</guid>
      <dc:creator>jnewman67</dc:creator>
      <dc:date>2022-06-06T16:52:36Z</dc:date>
    </item>
  </channel>
</rss>

