<?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 Undefined Property - PHP error in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Undefined-Property-PHP-error/m-p/27700#M14635</link>
    <description>&lt;P&gt;I'm getting a php error...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sandbox mode worked fine and the SDK is in place. I switched my account to live mode, updated/recopied the API Login ID and Transaction Key (in case they changed by going live), and added the $transaction-setSandbox(false); code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now get the following PHP error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Notice&lt;/STRONG&gt;&lt;SPAN&gt;: Undefined property: AuthorizeNetAIM_Response::$error_message&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I take out the setSandbox(false) line, the PHP error goes away and the normal authorize.net error 13 code shows (which makes sense as the sandbox code is trying to connect to a live account).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;require_once 'anet_php_sdk/AuthorizeNet.php';&lt;BR /&gt;$transaction = new AuthorizeNetAIM('XXXXX, 'XXXXX'); &amp;nbsp; &amp;nbsp;// this is the line the error occurs&lt;/P&gt;&lt;P&gt;$transaction-&amp;gt;setSandbox(false);&lt;BR /&gt;$transaction-&amp;gt;amount = $amount;&lt;BR /&gt;$transaction-&amp;gt;card_num = $number;&lt;BR /&gt;$transaction-&amp;gt;exp_date = $expiration;&lt;BR /&gt;$transaction-&amp;gt;first_name = $first;&lt;BR /&gt;$transaction-&amp;gt;last_name = $last;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$response = $transaction-&amp;gt;authorizeAndCapture();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ($response-&amp;gt;approved)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;// some code&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;else&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;echo $response-&amp;gt;error_message;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jul 2012 01:21:30 GMT</pubDate>
    <dc:creator>TimTysons</dc:creator>
    <dc:date>2012-07-05T01:21:30Z</dc:date>
    <item>
      <title>Undefined Property - PHP error</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Undefined-Property-PHP-error/m-p/27700#M14635</link>
      <description>&lt;P&gt;I'm getting a php error...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sandbox mode worked fine and the SDK is in place. I switched my account to live mode, updated/recopied the API Login ID and Transaction Key (in case they changed by going live), and added the $transaction-setSandbox(false); code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now get the following PHP error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Notice&lt;/STRONG&gt;&lt;SPAN&gt;: Undefined property: AuthorizeNetAIM_Response::$error_message&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I take out the setSandbox(false) line, the PHP error goes away and the normal authorize.net error 13 code shows (which makes sense as the sandbox code is trying to connect to a live account).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;require_once 'anet_php_sdk/AuthorizeNet.php';&lt;BR /&gt;$transaction = new AuthorizeNetAIM('XXXXX, 'XXXXX'); &amp;nbsp; &amp;nbsp;// this is the line the error occurs&lt;/P&gt;&lt;P&gt;$transaction-&amp;gt;setSandbox(false);&lt;BR /&gt;$transaction-&amp;gt;amount = $amount;&lt;BR /&gt;$transaction-&amp;gt;card_num = $number;&lt;BR /&gt;$transaction-&amp;gt;exp_date = $expiration;&lt;BR /&gt;$transaction-&amp;gt;first_name = $first;&lt;BR /&gt;$transaction-&amp;gt;last_name = $last;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$response = $transaction-&amp;gt;authorizeAndCapture();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ($response-&amp;gt;approved)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;// some code&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;else&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;echo $response-&amp;gt;error_message;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2012 01:21:30 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Undefined-Property-PHP-error/m-p/27700#M14635</guid>
      <dc:creator>TimTysons</dc:creator>
      <dc:date>2012-07-05T01:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Undefined Property - PHP error</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Undefined-Property-PHP-error/m-p/27724#M14645</link>
      <description>&lt;P&gt;What displays if you do a print_r($response)?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2012 21:06:25 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Undefined-Property-PHP-error/m-p/27724#M14645</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2012-07-05T21:06:25Z</dc:date>
    </item>
  </channel>
</rss>

