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'],
44 'payment_payby' => 'CHEK',
47 if ( isset($payment_info['error']) && $payment_info['error'] ) {
48 $error = $payment_info['error'];
49 header('Location:index.php?error='. urlencode($error));
53 extract($payment_info);
55 $error = $payment_error;
59 <? include('elements/error.php'); ?>
61 <FORM NAME="OneTrueForm" METHOD="POST" ACTION="payment_ach.php" onSubmit="document.OneTrueForm.process.disabled=true">
65 <TD ALIGN="right">Amount Due</TD>
67 <TABLE><TR><TD BGCOLOR="#ffffff">
68 $<? echo sprintf("%.2f", $balance) ?>
74 <TD ALIGN="right">Payment amount</TD>
76 <TABLE><TR><TD BGCOLOR="#ffffff">
77 $<INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<? echo sprintf("%.2f", $balance) ?>">
81 <? // include('elements/discount_term.php') ?>
83 <? include('elements/check.php') ?>
87 <INPUT TYPE="checkbox" <? if ( ! $save_unchecked ) { echo 'CHECKED'; } ?> NAME="save" VALUE="1">
88 Remember this information
92 <INPUT TYPE="checkbox" <? if ( $payby == 'CARD' ) { echo ' CHECKED'; } ?> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }">
93 Charge future payments to this account automatically
98 <INPUT TYPE="hidden" NAME="paybatch" VALUE="<? echo $paybatch; ?>">
99 <INPUT TYPE="submit" NAME="process" VALUE="Process payment"> <!-- onClick="this.disabled=true"> -->
104 <? include('elements/menu_footer.php'); ?>
105 <? include('elements/footer.php'); ?>