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

SIM Integration with different amounts

I want to use the SIM integration for handling payments through one part of my website. This integration has to handle payments for events, which each have a different and unique price. The "Golf"-event could cost $65, while the "Annual Business Meeting" would only cost $10. How would I handle different amounts that is easy for my client to handle himself (i.e. through a panel or the backend of Authorize.Net)?

Because it seems like there's no way of doing this by looking at the Quick Start Guide using PHP (https://developer.authorize.net/integration/fifteenminutes/#hosted):

<?php
require_once 'anet_php_sdk/AuthorizeNet.php'; // Include the SDK you downloaded in Step 2
$api_login_id = 'YOUR_API_LOGIN_ID';
$transaction_key = 'YOUR_TRANSACTION_KEY';
$amount = "5.99";
$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)
?>

<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="<?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_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='submit' value="Click here for the secure payment form">
</form>

 

I really need your help. I've been trying to figure this out for ages now.

 

Thanks in advance,


Frederick Andersen

 

FredrixDesign
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Couldn't you pass the $ amount from another page? or use multiple checkout page? or if else statement?

View solution in original post

RaynorC1emen7
Expert
8 REPLIES 8

Couldn't you pass the $ amount from another page? or use multiple checkout page? or if else statement?

RaynorC1emen7
Expert

How would you setup multiple checkout pages easily? It would probably would be the smartest solution, because the client has to be able to create an event in WordPress and through a custom field link to the SIM payment gateway.

 

You have any ideas?

Sorry, I don't work with php.

Would you be able to accomplish it using JavaScript?

Not with just javascript because it need the x_fp_hash which required the transactionKey. And you do NOT want it get out.

Is there anyway at all you could help me with the necessary code? I really need help. I'm getting very frustrated, because I'm not able to myself.

Thanks for the reponses so far, Raynor!

On your local checkout page, calculate the amount you want to submit:

<?php

    $totalcost = round($subtotal + $taxcost + $shipping,2);

?>

 

Then pass that variable over to the AuthorizeNET form:

<?php

  $totalcost = round($subtotal + $taxcost + $shipping,2);

  $amount = $totalcost;

?>