<?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 Newbie needs help with SIM.php in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Newbie-needs-help-with-SIM-php/m-p/17150#M9610</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a newbie at this and I just need some advice on how to take the default SIM.php page Authorize.net provides and set it up so the user can enter a custom dollar amount to pay. I'm not proficient enough in PHP to make it happen on my own. I understand that I have to make the x_amount field visible, etc. and from there I would think I should just make the value blank so a user can enter their own amount. But from there, don't know how to code it. Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is the default:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;BR /&gt;require_once 'anet_php_sdk/AuthorizeNet.php'; // Include the SDK you downloaded in Step 2&lt;BR /&gt;$api_login_id = 'xxxxxxxxxx';&lt;BR /&gt;$transaction_key = 'xxxxxxxxx';&lt;BR /&gt;$amount = "5.99";&lt;BR /&gt;$fp_timestamp = time();&lt;BR /&gt;$fp_sequence = "123" . time(); // Enter an invoice or other unique number.&lt;BR /&gt;$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id,&lt;BR /&gt;&amp;nbsp; $transaction_key, $amount, $fp_sequence, $fp_timestamp)&lt;BR /&gt;?&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;form method='post' action="&lt;A target="_blank" href="https://secure.authorize.net/gateway/transact.dll"&gt;https://secure.authorize.net/gateway/transact.dll&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_login" value="&amp;lt;?php echo $api_login_id?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_fp_hash" value="&amp;lt;?php echo $fingerprint?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_amount" value="&amp;lt;?php echo $amount?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_fp_timestamp" value="&amp;lt;?php echo $fp_timestamp?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_fp_sequence" value="&amp;lt;?php echo $fp_sequence?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_version" value="3.1"&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_show_form" value="payment_form"&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_test_request" value="false" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_method" value="cc"&amp;gt;&lt;BR /&gt;&amp;lt;input type='submit' value="Click here for the secure payment form"&amp;gt;&lt;BR /&gt;&amp;lt;/form&amp;gt;﻿&lt;/P&gt;</description>
    <pubDate>Sun, 18 Sep 2011 18:58:22 GMT</pubDate>
    <dc:creator>tedsilv</dc:creator>
    <dc:date>2011-09-18T18:58:22Z</dc:date>
    <item>
      <title>Newbie needs help with SIM.php</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Newbie-needs-help-with-SIM-php/m-p/17150#M9610</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a newbie at this and I just need some advice on how to take the default SIM.php page Authorize.net provides and set it up so the user can enter a custom dollar amount to pay. I'm not proficient enough in PHP to make it happen on my own. I understand that I have to make the x_amount field visible, etc. and from there I would think I should just make the value blank so a user can enter their own amount. But from there, don't know how to code it. Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is the default:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;BR /&gt;require_once 'anet_php_sdk/AuthorizeNet.php'; // Include the SDK you downloaded in Step 2&lt;BR /&gt;$api_login_id = 'xxxxxxxxxx';&lt;BR /&gt;$transaction_key = 'xxxxxxxxx';&lt;BR /&gt;$amount = "5.99";&lt;BR /&gt;$fp_timestamp = time();&lt;BR /&gt;$fp_sequence = "123" . time(); // Enter an invoice or other unique number.&lt;BR /&gt;$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id,&lt;BR /&gt;&amp;nbsp; $transaction_key, $amount, $fp_sequence, $fp_timestamp)&lt;BR /&gt;?&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;form method='post' action="&lt;A target="_blank" href="https://secure.authorize.net/gateway/transact.dll"&gt;https://secure.authorize.net/gateway/transact.dll&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_login" value="&amp;lt;?php echo $api_login_id?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_fp_hash" value="&amp;lt;?php echo $fingerprint?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_amount" value="&amp;lt;?php echo $amount?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_fp_timestamp" value="&amp;lt;?php echo $fp_timestamp?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_fp_sequence" value="&amp;lt;?php echo $fp_sequence?&amp;gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_version" value="3.1"&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_show_form" value="payment_form"&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_test_request" value="false" /&amp;gt;&lt;BR /&gt;&amp;lt;input type='hidden' name="x_method" value="cc"&amp;gt;&lt;BR /&gt;&amp;lt;input type='submit' value="Click here for the secure payment form"&amp;gt;&lt;BR /&gt;&amp;lt;/form&amp;gt;﻿&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2011 18:58:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Newbie-needs-help-with-SIM-php/m-p/17150#M9610</guid>
      <dc:creator>tedsilv</dc:creator>
      <dc:date>2011-09-18T18:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie needs help with SIM.php</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Newbie-needs-help-with-SIM-php/m-p/17152#M9611</link>
      <description>&lt;P&gt;The problem is that the $fingerprint value is calculated partly based off amount, so if the amount is not pre-determined, the fingerprint will be incorrect and the form will fail. So there is essentially only one way you can do this - you have to have a page where they fill out the amount (using a form with just a single field 'amount'), then that submits to another page which does all the stuff you listed (only with $amount being $_POST['amount'] and $_POST['amount']﻿ being validated using round() to make sure they aren't trying to inject something bad). That second page can either be a verification page "You chose to donate x amount, click Go to donate now" or it can be auto-submit (onload="document.forms.myformname.submit();" in your body tag) so they are forwarded more or less invisibly and don't know it's a two-step process rather than one. Personally, I'd choose auto-submit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really, this is fairly simple.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2011 21:36:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Newbie-needs-help-with-SIM-php/m-p/17152#M9611</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2011-09-18T21:36:11Z</dc:date>
    </item>
  </channel>
</rss>

