Hello,
I am integrating Authorize.net SIM API to a Booking Module
The Booking module works on number of slot selected,
I am getting Error 99, when more than two checkbox (slots) are selected.
I set per slot price $15, and when three or more slots selected, it returns Error 99.
If 1 or 2 slots selected it works fine and show $15 amount on Payment page.
For debugging, i created a file "get.php" with following code :
<?php
$x_login = $_POST['x_login'];
$x_fp_sequence = $_POST['x_fp_sequence'];
$x_fp_timestamp = $_POST['x_fp_timestamp'];
$x_fp_hash = $_POST['x_fp_hash'];
$x_amount = $_POST['x_amount'];
?>
API : <?php echo $x_login ?><br/>
Fp sequence : <?php echo $x_fp_sequence ?><br/>
TS : <?php echo $x_fp_timestamp ?><br/>
Fingerprint : <?php echo $x_fp_hash ?><br/>
Amount : <?php echo $x_amount ?><br/>
and echo all the fields submitted by form with 4 sots selected, and i found every value correct. The amount was calculated correct and it was 60, an Integer.
Also i used Response code 99 Tool and check the fingeprint, but i found it was matching with the output of form.
The same form when i submit with 4 Slots selected, it returns Error 99, but when i echo the values for the 4 slots they show correct amount 60 and other value as well including fingerprint
I am confused what could be the issue? please help
Thanks
Authorize.net Code
<form action='https://test.authorize.net/gateway/transact.dll' METHOD='POST' name="authorize_form" id="authorize" style="display:inline">
<!-- Authorize Configuration -->
<input type='hidden' name="x_login" id="x_login" value="" />
<input type='hidden' name="x_fp_sequence" id="x_fp_sequence" value="" />
<input type='hidden' name="x_fp_timestamp" id="x_fp_timestamp" value="" />
<input type='hidden' name="x_fp_hash" id="x_fp_hash" value="" />
<input type='hidden' name="x_amount" id="x_amount" value="" />
<input type='hidden' name="x_version" value="3.1">
<input type='hidden' name="x_show_form" value="payment_form">
<input type='hidden' name="x_test_request" value="false" />
<input type='hidden' name="x_method" value="cc">
</form>
06-17-2013 04:02 AM
Instead of using get.php, just look at the page source on the browser when you run the form post page. That would show you exactly what you are sending to authorize.net
06-17-2013 04:44 AM
When errorr occurs it does not show any source instead the error text 99 that is why i test using get.php
Any idea why this happening?
06-17-2013 07:06 AM
On the page that form post to authorize.net
<form action='https://test.authorize.net/gateway/transact.dll' METHOD='POST' name="authorize_form" id="authorize" style="display:inline">
...
</form>
Run it up to that and view the page source on the browser
06-17-2013 07:42 AM
HI, After debugging i found that for more than two slots, there is Invalid fingerprint is generated,
I am not sure why iy is done because for a single and two slots, there is correct fingerprint shows.
How can i solve this
06-17-2013 07:56 AM
something might be wrong with your booking module, talk to whomever created it.
06-17-2013 08:06 AM
Ok but as i have echoed and found that script is generating correct amount that is 60, an integer.
and the API and transaction key are also correct for more than two slots.
So i need help what could be wrong.
Also, I am using two files for processing authorize.net
One file : generateFingerprint.php is used with this code
<?php
include '/../common.php';
require_once '/anet_php_sdk/AuthorizeNet.php'; // Include the SDK you downloaded in Step 2
$api_login_id = $bookingSettingObj->getAuthorizeAPI();
$transaction_key = $bookingSettingObj->getAuthorizeTXN();
$amount = $_GET["totalamount"];
$fp_timestamp = time();
$fp_sequence = "123" . time(); // Enter an invoice or other unique number.
$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id, $transaction_key, $amount, $fp_sequence, $fp_timestamp);
echo $api_login_id.'$'.$fp_timestamp.'$'.$fp_sequence.'$'.$fingerprint;
?>
And the another file index.php is used to add input form fields with the code i posted above?
Could this be reason for incorrect fingerprint for more than two slots?
06-17-2013 09:28 AM
Maybe your totalamount not the same as the authorize.net x_amount?
06-17-2013 09:39 AM
When i echo it shows correct, so no issue with amount
I tried echo amount it shows 60
( 15 x4 ) as per slot price is 15, but fingerpring is wrong (i found by matching from 99 Error Tool)
06-17-2013 09:43 AM - edited 06-17-2013 09:50 AM
I see that
$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id
, $transaction_key, $amount, $fp_sequence, $fp_timestamp);
echo $api_login_id.'$'.$fp_timestamp.'$'.$fp_sequence.'$'.$fingerprint;
you didn't echo the $amount.
When i echo it shows correct, so no issue with amount
But your code is not working. if everything stay the same, the only thing that seem to change is the totalamount.
06-17-2013 10:54 AM