Hi all,
Hope someone can help me out here. I need to make a "checkout" page for use with authorize.net's SIM (server integration method) of payment processing. Question is how can I merge the two PHP statements at the start of the page to avoid conflicts?
here are the two snippets I have to work with;
FORMTOOL:
<?php
require_once("/home/MYSITE/public_html/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
$params = array(
"submit_button" => "continue",
"next_page" => "camp_reg5.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
AUTHORIZE.NET:
<?php
require_once '/home/MYSITE/public_html/registration/anet_php_sdk/AuthorizeNet.php';
$api_login_id = 'XXXXXXX';
$transaction_key = 'XXXXXXXXXXX';
$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://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_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>
notice it has it's own button for submission
Any help would be greatly appreciated.
(thanks Ben for your "registration" demo. I used it as a template and it's great so far)
Hope someone can help me out here. I need to make a "checkout" page for use with authorize.net's SIM (server integration method) of payment processing. Question is how can I merge the two PHP statements at the start of the page to avoid conflicts?
here are the two snippets I have to work with;
FORMTOOL:
<?php
require_once("/home/MYSITE/public_html/formtools/global/api/api.php");
$fields = ft_api_init_form_page();
$params = array(
"submit_button" => "continue",
"next_page" => "camp_reg5.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
AUTHORIZE.NET:
<?php
require_once '/home/MYSITE/public_html/registration/anet_php_sdk/AuthorizeNet.php';
$api_login_id = 'XXXXXXX';
$transaction_key = 'XXXXXXXXXXX';
$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://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_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>
notice it has it's own button for submission
Any help would be greatly appreciated.
(thanks Ben for your "registration" demo. I used it as a template and it's great so far)