Reply
Member
Posts: 3
Registered: ‎02-29-2012

SIM Intergration in Home Page/Post

Greetings -

 

I've read just about every thread related to SIM as well as the developer's guide and still can't figure out what I'm doing wrong.

 

I'm trying to set up payment processing for an upcoming fundraising event. If you go here: gazellefoundation.com/springforthewater/sim.php everything works fine. But, I want to implement that payment button directly in to the home page template. When I copy the code and add it to the page, the clickthrough gives me a (13) The merchant login ID or password is invalid or the account is inactive.

 

Does anyone have suggestions? Going to gazellefoundation.com/springforthewater and clicking on the Secure Payment Form button will take you to the 13 error code. Any idea why this is?

 

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

Re: SIM Intergration in Home Page/Post

It is not processing the php code. This is what it look on the homepage in browser page source

 

<form action="https://secure.authorize.net/gateway/transact.dll" method="post">

<input type="hidden" value="<?php echo $api_login_id?>" name="x_login">
<input type="hidden" value="<?php echo $fingerprint?>" name="x_fp_hash">
<input type="hidden" value="<?php echo $amount?>" name="x_amount">
<input type="hidden" value="<?php echo $fp_timestamp?>" name="x_fp_timestamp">
<input type="hidden" value="<?php echo $fp_sequence?>" name="x_fp_sequence">
<input type="hidden" value="AUTH_CAPTURE" name="x_type">
<input type="hidden" value="3.1" name="x_version">
<input type="hidden" value="payment_form" name="x_show_form">
<input type="hidden" value="cc" name="x_method">
<input type="submit" value="Click here for the secure payment form">
</form>
Member
Posts: 3
Registered: ‎02-29-2012

Re: SIM Intergration in Home Page/Post

Thank you, Raynor. This is what I have in the code:

 

<?php
require_once 'anet_php_sdk/AuthorizeNet.php';
$api_login_id = 'HIDDEN';
$transaction_key = 'hidden';
$amount = "100.00";
$fp_timestamp = time();
$fp_sequence = "1234" . time();
$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id,
  $transaction_key, $amount, $fp_sequence, $fp_timestamp)
?>
<form 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_type" value="AUTH_CAPTURE">
<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="cc">
<input type='submit' value="Click here for the secure payment form">
</form>

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

Re: SIM Intergration in Home Page/Post

Hopfully TJPride can answer you question. I don't work with php at all.

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

Re: SIM Intergration in Home Page/Post

Never mind, I went to the wrong URL. You are correct, it's just not running PHP on that page. Change the index page URL from index.html to index.php and try again. Unless you're using some sort of templating system, in which case things might get a bit more complicated.

Member
Posts: 3
Registered: ‎02-29-2012

Re: SIM Intergration in Home Page/Post

That worked! Blue star for you! Thanks very much, TJ.