<?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 Php IPN example in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Php-IPN-example/m-p/16210#M9165</link>
    <description>&lt;P&gt;I need help.&amp;nbsp; Looking for a php example where I can get the response codes, that I then can enter into my mysql tables.&lt;/P&gt;&lt;P&gt;example : customer name, amount they sent, timestamp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do not care about seeing on screen, I need to enter automatically into table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The amount is not fixed, the customer is sending a payment ( each amount might be different)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2011 12:35:14 GMT</pubDate>
    <dc:creator>joel123</dc:creator>
    <dc:date>2011-08-17T12:35:14Z</dc:date>
    <item>
      <title>Php IPN example</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Php-IPN-example/m-p/16210#M9165</link>
      <description>&lt;P&gt;I need help.&amp;nbsp; Looking for a php example where I can get the response codes, that I then can enter into my mysql tables.&lt;/P&gt;&lt;P&gt;example : customer name, amount they sent, timestamp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do not care about seeing on screen, I need to enter automatically into table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The amount is not fixed, the customer is sending a payment ( each amount might be different)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2011 12:35:14 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Php-IPN-example/m-p/16210#M9165</guid>
      <dc:creator>joel123</dc:creator>
      <dc:date>2011-08-17T12:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Php IPN example</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Php-IPN-example/m-p/16218#M9169</link>
      <description>&lt;P&gt;What I did was first generate a transaction and then log the output to a text file using the callback page:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$logfile = "{$_SERVER['DOCUMENT_ROOT']}/mylogfolder/log.txt";
$handle = fopen($logfile, 'a');
fwrite($handle, print_r($_POST, true));&lt;/PRE&gt;&lt;P&gt;This is with some of the field data modified or the fields removed entirely for security reasons, but it will give you an idea of what the output looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Array
(
    [x_response_code] =&amp;gt; 1
    [x_response_reason_code] =&amp;gt; 1
    [x_response_reason_text] =&amp;gt; This transaction has been approved.
    [x_avs_code] =&amp;gt; Y
    [x_auth_code] =&amp;gt; 012335
    [x_trans_id] =&amp;gt; 12345678
    [x_card_type] =&amp;gt; Visa
    [x_first_name] =&amp;gt; Theodore
    [x_last_name] =&amp;gt; Pride
    [x_company] =&amp;gt; Fenton Web Design Firm.
    [x_address] =&amp;gt; 1731 Smizer Mill Rd.
    [x_city] =&amp;gt; Fenton
    [x_state] =&amp;gt; MO
    [x_zip] =&amp;gt; 63026
    [x_country] =&amp;gt; US
    [x_description] =&amp;gt; My transaction description
    [x_cust_id] =&amp;gt; 1234
    [x_amount] =&amp;gt; 19.95
    [x_MD5_Hash] =&amp;gt; X5C2BA75F23E5666AD9D3A3B693E584X
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From there it was simple - I knew what the field names were and what the data looked like, just had to test for success (I'm using x_response_code == 1) and if successful, store the transaction record in the database. I'll leave the database storage part up to you.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2011 14:42:07 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Php-IPN-example/m-p/16218#M9169</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-08-17T14:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Php IPN example</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Php-IPN-example/m-p/16226#M9173</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That helped but I really need more.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am used to is :&amp;nbsp; our customer login to my website, enters how much they are paying and press the "buy now" button.&amp;nbsp; I then send along their userid and the payment amount to be processed.&amp;nbsp; The return, goes to an IPN and then posts to my mysql tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you by chance have a more complete script I might be able to cannibalize?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2011 17:35:55 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Php-IPN-example/m-p/16226#M9173</guid>
      <dc:creator>joel123</dc:creator>
      <dc:date>2011-08-17T17:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Php IPN example</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Php-IPN-example/m-p/16254#M9186</link>
      <description>&lt;P&gt;The data is all there in a simple associative array in $_POST. Just go into your Authorize.net control panel, set the callback URL to the page you want logging the transactions (https://), then have the callback page take the $_POST variables and store them in the database. Not sure what part you need code for - is it the initial charge, the logging, the database interaction, what? I can certainly try to help, but you have to have some amount of experience with PHP and databases - I'm not writing the entire system for free. Might be fun, but I have paying work I have to do.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2011 01:49:04 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Php-IPN-example/m-p/16254#M9186</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-08-18T01:49:04Z</dc:date>
    </item>
  </channel>
</rss>

