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
Solved! Go to Solution.
04-24-2013 11:56 AM
Couldn't you pass the $ amount from another page? or use multiple checkout page? or if else statement?
04-24-2013 01:18 PM
Couldn't you pass the $ amount from another page? or use multiple checkout page? or if else statement?
04-24-2013 01:18 PM
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?
04-24-2013 01:30 PM
Sorry, I don't work with php.
04-24-2013 01:43 PM
Would you be able to accomplish it using JavaScript?
04-24-2013 02:30 PM
Not with just javascript because it need the x_fp_hash which required the transactionKey. And you do NOT want it get out.
04-24-2013 04:26 PM
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!
04-25-2013 01:44 AM
There the
04-25-2013 04:12 AM
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;
?>
05-24-2013 01:10 PM