<?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: Using try/catch to process a transaction in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Using-try-catch-to-process-a-transaction/m-p/35359#M19754</link>
    <description>&lt;P&gt;The link you provided gave me a successful transaction, as have other basic aim and dmp test done. What I'm really trying to do is use John Conde's payment-form setup, but I can't ever get the form to work properly. It's just never happy. I want to get it to run in test mode... I've inserted my test credentials just like I did in the form you suggested, and I've gotten a MD5Hash to generate through a custom form I'm trying to incorporate, so adding that information to the "AuthorizeNet_Test_Config.php" file should work for me. Right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm confused about what supposed to be included in the payment-form.php file. It says to use this:&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; // Include the SDK&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; require_once('./config.php');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm thinking it should be:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;require_once('../anet_php_sdk/AuthorizeNet_Test_Config.php');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe payment-form.php should require:&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; require_once{'AuthorizeNetAIM_Test.php');&amp;nbsp;&lt;/P&gt;&lt;P&gt;because that page then requires the AuthorizeNet_Test_Config.php file. Maybe AuthnetAIM.class.php and AuthorizeNet.php should also be added there, because they aren't being required anywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is also hard-coded test info in the AuthorizeNetAIM_Test.php file for amount, card number and exp_date, but the payment-form.php has fields for those and they need to be filled in, so it's hard to get this form working properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help you could give me on these question would be very much appreciated. I've tried so many different versions of what might be required where and am getting nowhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2013 04:48:13 GMT</pubDate>
    <dc:creator>auththch</dc:creator>
    <dc:date>2013-08-28T04:48:13Z</dc:date>
    <item>
      <title>Using try/catch to process a transaction</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Using-try-catch-to-process-a-transaction/m-p/35354#M19749</link>
      <description>&lt;P&gt;Can anyone tell me where I might have gotten this setup? I can't find it anywhere in the authorize.net community. It's not part of the "php_aim/sample.php" or the SDK, but I got it from somewhere and it's the ONLY WAY I can process a transaction using AIM. I'd like to read up on this method, but can't find where it came from. Please help!&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;BR /&gt;&lt;BR /&gt;require('anet/AuthnetAIM.class.php');&lt;BR /&gt;&lt;BR /&gt;try&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;$creditcard = $_REQUEST['ccnumber'];&lt;BR /&gt;$expiration = $_REQUEST['expdate'];&lt;BR /&gt;$total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = $_REQUEST['amt_paid'];&lt;BR /&gt;$first&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = $_REQUEST['first_name'];&lt;BR /&gt;$last&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = $_REQUEST['last_name'];&lt;BR /&gt;$addr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = $_REQUEST['address'];&lt;BR /&gt;$city&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = $_REQUEST['city'];&lt;BR /&gt;$state&amp;nbsp;&amp;nbsp;&amp;nbsp; = $_REQUEST['state'];&lt;BR /&gt;$zip&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = $_REQUEST['zip'];&lt;BR /&gt;$member_id = $_REQUEST['member_id'];&lt;BR /&gt;$description = "Young Voices Uniform, Fees and Tuition";&lt;BR /&gt;$email = $_REQUEST['email'];&lt;BR /&gt;&lt;BR /&gt;$payment = new AuthnetAIM('xxxxxxxxx', 'xxxxxxxxxxxxxx');&lt;BR /&gt;$payment-&amp;gt;setTransaction($creditcard, $expiration, $total);&lt;BR /&gt;$payment-&amp;gt;setParameter("x_card_num", $creditcard);&lt;BR /&gt;$payment-&amp;gt;setParameter("x_exp_date", $expiration);&lt;BR /&gt;$payment-&amp;gt;setParameter("x_amount", $total);&lt;BR /&gt;$payment-&amp;gt;setParameter("x_first_name", $first);&lt;BR /&gt;$payment-&amp;gt;setParameter("x_last_name", $last);&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 01:56:32 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Using-try-catch-to-process-a-transaction/m-p/35354#M19749</guid>
      <dc:creator>auththch</dc:creator>
      <dc:date>2013-08-28T01:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using try/catch to process a transaction</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Using-try-catch-to-process-a-transaction/m-p/35355#M19750</link>
      <description>&lt;P&gt;Never mind. I found it at &lt;A href="http://www.johnconde.net/blog/tutorial-integrating-the-authorizenet-aim-api-with-php/" target="_blank"&gt;http://www.johnconde.net/blog/tutorial-integrating-the-authorizenet-aim-api-with-php/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 02:48:59 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Using-try-catch-to-process-a-transaction/m-p/35355#M19750</guid>
      <dc:creator>auththch</dc:creator>
      <dc:date>2013-08-28T02:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using try/catch to process a transaction</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Using-try-catch-to-process-a-transaction/m-p/35357#M19752</link>
      <description>&lt;P&gt;That code was written in 2008, don't know how up to date it is. The sample code for AIM is here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://developer.authorize.net/integration/fifteenminutes/#custom" target="_blank"&gt;http://developer.authorize.net/integration/fifteenminutes/#custom&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would think that that would be pretty easy to adapt to your uses. Just add a few fields. Note - you should always use $_POST, since $_REQUEST is an amalgam of $_GET, $_POST, and $_COOKIE, and it is therefore easier for people to insert values into with a minimum of effort. Also check to make sure the amount (in this case $total) is within some reasonable minimum / maximum range before you process the transaction. Wouldn't hurt to run a Luhn on the credit card number, either.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 04:19:00 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Using-try-catch-to-process-a-transaction/m-p/35357#M19752</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2013-08-28T04:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using try/catch to process a transaction</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Using-try-catch-to-process-a-transaction/m-p/35359#M19754</link>
      <description>&lt;P&gt;The link you provided gave me a successful transaction, as have other basic aim and dmp test done. What I'm really trying to do is use John Conde's payment-form setup, but I can't ever get the form to work properly. It's just never happy. I want to get it to run in test mode... I've inserted my test credentials just like I did in the form you suggested, and I've gotten a MD5Hash to generate through a custom form I'm trying to incorporate, so adding that information to the "AuthorizeNet_Test_Config.php" file should work for me. Right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm confused about what supposed to be included in the payment-form.php file. It says to use this:&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; // Include the SDK&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; require_once('./config.php');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm thinking it should be:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;require_once('../anet_php_sdk/AuthorizeNet_Test_Config.php');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe payment-form.php should require:&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; require_once{'AuthorizeNetAIM_Test.php');&amp;nbsp;&lt;/P&gt;&lt;P&gt;because that page then requires the AuthorizeNet_Test_Config.php file. Maybe AuthnetAIM.class.php and AuthorizeNet.php should also be added there, because they aren't being required anywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is also hard-coded test info in the AuthorizeNetAIM_Test.php file for amount, card number and exp_date, but the payment-form.php has fields for those and they need to be filled in, so it's hard to get this form working properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help you could give me on these question would be very much appreciated. I've tried so many different versions of what might be required where and am getting nowhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 04:48:13 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Using-try-catch-to-process-a-transaction/m-p/35359#M19754</guid>
      <dc:creator>auththch</dc:creator>
      <dc:date>2013-08-28T04:48:13Z</dc:date>
    </item>
  </channel>
</rss>

