1 <? $title ='Electronic Check Payment'; include('elements/header.php'); ?>
2 <? $current_menu = 'payment_ach.php'; include('elements/menu.php'); ?>
5 if ( isset($_POST['amount']) && $_POST['amount'] ) {
7 $payment_results = $freeside->process_payment(array(
8 'session_id' => $_COOKIE['session_id'],
10 'amount' => $_POST['amount'],
11 'payinfo1' => $_POST['payinfo1'],
12 'payinfo2' => $_POST['payinfo2'],
15 'payname' => $_POST['payname'],
16 'paytype' => $_POST['paytype'],
17 'paystate' => $_POST['paystate'],
19 'stateid' => $_POST['stateid'],
20 'stateid_state' => $_POST['stateid_state'],
21 'save' => $_POST['save'],
22 'auto' => $_POST['auto'],
23 'paybatch' => $_POST['paybatch'],
24 //'discount_term' => $discount_term,
27 if ( $payment_results['error'] ) {
28 $payment_error = $payment_results['error'];
30 $receipt_html = $payment_results['receipt_html'];
35 if ( $receipt_html ) { ?>
37 Your payment was processed successfully. Thank you.<BR><BR>
38 <? echo $receipt_html; ?>
42 $payment_info = $freeside->payment_info( array(
43 'session_id' => $_COOKIE['session_id'],
46 if ( isset($payment_info['error']) && $payment_info['error'] ) {
47 $error = $payment_info['error'];
48 header('Location:index.php?error='. urlencode($error));
52 extract($payment_info);
54 $error = $payment_error;
58 <? include('elements/error.php'); ?>
60 <FORM NAME="OneTrueForm" METHOD="POST" ACTION="payment_ach.php" onSubmit="document.OneTrueForm.process.disabled=true">
64 <TD ALIGN="right">Amount Due</TD>
66 <TABLE><TR><TD BGCOLOR="#ffffff">
67 $<? echo sprintf("%.2f", $balance) ?>
73 <TD ALIGN="right">Payment amount</TD>
75 <TABLE><TR><TD BGCOLOR="#ffffff">
76 $<INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<? echo sprintf("%.2f", $balance) ?>">
80 <? // include('elements/discount_term.php') ?>
82 <? include('elements/check.php') ?>
86 <INPUT TYPE="checkbox" <? if ( ! $save_unchecked ) { echo 'CHECKED'; } ?> NAME="save" VALUE="1">
87 Remember this information
91 <INPUT TYPE="checkbox" <? if ( $payby == 'CARD' ) { echo ' CHECKED'; } ?> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }">
92 Charge future payments to this account automatically
97 <INPUT TYPE="hidden" NAME="paybatch" VALUE="<? echo $paybatch; ?>">
98 <INPUT TYPE="submit" NAME="process" VALUE="Process payment"> <!-- onClick="this.disabled=true"> -->
103 <? include('elements/menu_footer.php'); ?>
104 <? include('elements/footer.php'); ?>