cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Error 99 when more than two slot selected

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>

13 REPLIES 13

Hello, I am echoing the amount using Ajax, and i confirm the amount shows correct.

Thanks

It that the same place where it do the AuthorizeNetSIM_Form::getFingerprint() ?

No its on the other file,

AuthorizeNetSIM_Form::getFingerprint() exists on generateFingerprint.php file

 

This code is used to echo the amount, in index.php file where the form input variables exist, The slots are selected usign index.php file so the total amount is then saved in $amount variable using $_GET

$wbc.ajax({
                      
                      url: '<?php echo plugins_url('wp-booking-calendar/public');?>/ajax/getSlotinfo.php?slot_id='+$wbc(this).val(),
                      success: function(data) {
                        
                          arrData=data.split("$");
                          
                          if(arrData[1]>0) {
                              
                             totalamount = totalamount + parseFloat(arrData[1]);
                             i++;
                             $wbc.ajax({
                          
                                  url: '<?php echo plugins_url("booking/public');?>/ajax/generateFingerprint.php?totalamount='+totalamount,
                                  success: function(data) {
                                      arrDataFingerprint = data.split("$");
                                      $wbc('#x_login').val(arrDataFingerprint[0]);
                                      $wbc('#x_fp_timestamp').val(arrDataFingerprint[1]);
                                      $wbc('#x_fp_sequence').val(arrDataFingerprint[2]);
                                      $wbc('#x_fp_hash').val(arrDataFingerprint[3]);
                                      $wbc('#x_amount').val(totalamount);
                                      $wbc('#authorize').val(1);
                                  }
                                  
                              });
                          }
                         

 

$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id

, $transaction_key, $amount, $fp_sequence, $fp_timestamp);
  echo $api_login_id.'$'.$fp_timestamp.'$'.$fp_sequence.'$'.$fingerprint;

 

Can you add $amount to the echo?