Reply
Highlighted
Member
Posts: 2
Registered: ‎03-12-2012

Trying to integrate Authorize.net | Error (99)

Greetings!

 

Ok so I'm trying to implement this for a client but I seem to be running into some issues, mind you this is my first time using Authorize.net.

 

Sorce Services is where I'm trying to implement it.

 

-- Below is the code I'm using --

 

//++
// Authorize.NET
//++

require_once 'anet_php_sdk/AuthorizeNet.php';

$api_login_id = 'TEST_API_ID'; // This is filled in correctly on my end
$transaction_key = 'TEST_TRANSACTION_KEY'; // This is filled in correctly on my end
$amount = '';
$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)

?>
<div id="content">
<h3>Services</h3>
Prices include ALL fees. (Local Trucking and Disposal)
<br/>
<h4>Roll Offs</h4>
<table class="servicestable">
<tr><th>SIZE</th>
<th>LENGTH</th>
<th>WIDTH</th>
<th>HEIGHT</th>
<th>WW WEIGHT</th>
<th>WW PRICE*</th>
<th>PRICE FOR 10 TON</th>
<th></th></tr>
<tr><td>12 yd</td>
<td>20 ft</td>
<td>8 ft</td>
<td>2&frac12; ft</td>
<td>3 Ton</td>
<td>$295.00</td>
<td>$330.00</td>
<td><form method='post' action="https://test.authorize.net/gateway/transact.dll">
<input type='hidden' name="x_login" value="<?php echo $api_login_id?>" />
<input type='hidden' name="x_fp_hash" value="<?php echo $fingerprint?>" />
<input type='hidden' name="x_amount" value="330.00" />
<input type='hidden' name="x_fp_timestamp" value="<?php echo $fp_timestamp?>" />
<input type='hidden' name="x_fp_sequence" value="<?php echo $fp_sequence?>" />
<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">
<input type='image' src="images/buyNow.gif" border="0" name="submit" type="submit" height="17" width="56" title="Buy Now" alt="Buy Now" class="buy_now">
</form>
</form></td></tr>

 

So I have a few questions, is this a good way of going about it since I have to have multiple prices? And secondly what is wrong what is throwing me a (99) error?

 

I appreciate all the help.

 

Thanks,

 

Randy

 

Highlighted
Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: Trying to integrate Authorize.net | Error (99)

The problem is here:

 

$transaction_key = 'TEST_TRANSACTION_KEY'; // This is filled in correctly on my end
$amount = '';
$fp_timestamp = time();

The amount you're putting into the fingerprint doesn't match what you're passing as an amount in your form. Fix that and the fingerprint ought to work.

Highlighted
Member
Posts: 2
Registered: ‎03-12-2012

Re: Trying to integrate Authorize.net | Error (99)

I set the variable like that because I have multiple prices I have to accept depending on the dumpster they need. If I declair an amount there it would be one set price. Easy way I could integrate it with support for multiple prices?

 

Appreciate the quick response TJ.

Highlighted
Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: Trying to integrate Authorize.net | Error (99)

Yes. You would submit just the product information (name, price, quantity, if applicable) from this page to a second page, which would generate the Authorize.net form details and auto-submit using this in the body tag of the page:

 

<body onload="document.myformname.submit();">

 Where myformname is the name of your form.