Reply
Contributor
Posts: 25
Registered: ‎05-30-2014

eChecks and SIM PHP code example

Hi,

 

Can anyone provide an example of code to use - for SIM and eCheck.  I have a snippet below that only results in this error:

The following errors have occurred.
(99) This transaction cannot be accepted.

 

We are using SIM with a hosted form for CC payments and that works fine. We are approved for Echeck. I'd like to use SIM, not AIM.  I took this snippet from the working CC code and changed the X_Method field to "ECHECK".  That's as far as I got. I was hoping to see the hosted form change to one in which bank info is entered instead of credit card info. When in the authorize account, I don't see anything to set on the hosted form about this, so was hoping it just sensed what to do by changing the X_method, but that is not working.  Help!?  Thanks!

 

 

<form id="f" name="f" class="form-horizontal" method="post" action="https://secure.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="<?php echo $amount; ?>" />
<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_description" value="<?php echo $description; ?>" />
<input type='hidden' name="x_line_item1" value="item1<|><|>Membership Registration<|>1<|><?php echo number_format($amount,2); ?><|>N" />
<input type='hidden' name="x_invoice_num" value="<?php echo $formid; ?>" />
<input type='hidden' name="x_po_num" value="<?php echo $formtype; ?>" />
<input type='hidden' name="x_delim_data" value="FALSE" />
<input type='hidden' name="x_relay_always" value="TRUE" />
<input type='hidden' name="x_relay_response" value="TRUE" />
<input type='hidden' name="x_relay_URL" value="http://xxxxxxx.php" />

<input type='hidden' name="x_version" value="3.1">
<input type='hidden' name="x_show_form" value="payment_form">
<input type='hidden' name="x_method" value="ECHECK">
<button type="submit" class="btn btn-success" >Checkout to Pay</button>
</form>

 

 

Contributor
Posts: 25
Registered: ‎05-30-2014

Re: eChecks and SIM PHP code example

oh and by the  way with the above snippet I use this reference to the library...

 

require_once 'anet_php_sdk/AuthorizeNet.php';   

 

 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: eChecks and SIM PHP code example

Is the x_fp_hash   match the one from https://developer.authorize.net/tools/responsecode99/

Contributor
Posts: 25
Registered: ‎05-30-2014

Re: eChecks and SIM PHP code example

Thanks!  The link brought to another page which gave me a clue to what was wrong.  And that was....

 

The fingerprint requires the amount to generate correct.  I was putting the amount in the code after the fingerprint. I moved the amount variable ahead of the fingerprint and now it works!  I am getting a different error now - but I think its just because I am testing with a made up bank account number.