3 require('freeside.class.php');
4 $freeside = new FreesideSelfService();
6 $session_id = $_GET['session_id'];
8 $renew_info = $freeside->renew_info( array(
9 'session_id' => $session_id,
12 $error = $renew_info['error'];
15 header('Location:login.php?error='. urlencode($error));
19 #in the simple case, just deal with the first package
20 $bill_date = $renew_info['dates'][0]['bill_date'];
21 $bill_date_pretty = $renew_info['dates'][0]['bill_date_pretty'];
22 $renew_date = $renew_info['dates'][0]['renew_date'];
23 $renew_date_pretty = $renew_info['dates'][0]['renew_date_pretty'];
24 $amount = $renew_info['dates'][0]['amount'];
26 $payment_info = $freeside->payment_info( array(
27 'session_id' => $session_id,
30 extract($payment_info);
33 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
36 <TITLE>Renew Early</TITLE>
41 <FONT SIZE="+1" COLOR="#ff0000"><?php echo htmlspecialchars($_GET['error']); ?></FONT>
43 <FORM NAME="OneTrueForm" METHOD="POST" ACTION="process_payment_order_renew.php" onSubmit="document.OneTrueForm.process.disabled=true">
45 <INPUT TYPE="hidden" NAME="date" VALUE="<?php echo $date; ?>">
46 <INPUT TYPE="hidden" NAME="session_id" VALUE="<?php echo $session_id; ?>">
47 <INPUT TYPE="hidden" NAME="amount" VALUE="<?php echo $amount; ?>">
49 A payment of $<?php echo $amount; ?> will renew your account through <?php echo $renew_date_pretty; ?>.<BR><BR>
51 <TABLE BGCOLOR="#cccccc">
53 <TD ALIGN="right">Amount</TD>
55 <TABLE><TR><TD BGCOLOR="#ffffff">
56 $<?php echo $amount; ?>
61 <TD ALIGN="right">Card type</TD>
63 <SELECT NAME="card_type"><OPTION></OPTION>
64 <?php foreach ( array_keys($card_types) as $t ) { ?>
65 <OPTION <?php if ($card_type == $card_types[$t] ) { ?> SELECTED <?php } ?>
66 VALUE="<?php echo $card_types[$t]; ?>"
74 <TD ALIGN="right">Card number</TD>
79 <INPUT TYPE="text" NAME="payinfo" SIZE=20 MAXLENGTH=19 VALUE="<?php echo $payinfo; ?>"> </TD>
83 <?php foreach ( array('01','02','03','04','05','06','07','08','09','10','11','12') as $m) { ?>
84 <OPTION<?php if ($m == $month ) { ?> SELECTED<?php } ?>
92 <?php $lt = localtime(); $y = $lt[5] + 1900;
93 for ($y = $lt[5]+1900; $y < $lt[5] + 1910; $y++ ) { ?>
94 <OPTION<?php if ($y == $year ) { ?> SELECTED<?php } ?>
103 <?php if ( $withcvv ) { ?>
105 <TD ALIGN="right">CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>)</TD>
106 <TD><INPUT TYPE="text" NAME="paycvv" VALUE="" SIZE=4 MAXLENGTH=4></TD>
110 <TD ALIGN="right">Exact name on card</TD>
111 <TD><INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="payname" VALUE="<?php echo $payname; ?>"></TD>
113 <TD ALIGN="right">Card billing address</TD>
115 <INPUT TYPE="text" SIZE=40 MAXLENGTH=80 NAME="address1" VALUE="<?php echo $address1; ?>">
118 <TD ALIGN="right">Address line 2</TD>
120 <INPUT TYPE="text" SIZE=40 MAXLENGTH=80 NAME="address2" VALUE="<?php echo $address2; ?>">
123 <TD ALIGN="right">City</TD>
128 <INPUT TYPE="text" NAME="city" SIZE="12" MAXLENGTH=80 VALUE="<?php echo $city; ?>">
132 <SELECT NAME="state">
133 <?php foreach ( $states as $s ) { ?>
134 <OPTION<?php if ($s == $state) { ?> SELECTED<?php } ?>
141 <INPUT TYPE="text" NAME="zip" SIZE=11 MAXLENGTH=10 VALUE="<?php echo $zip; ?>">
150 <INPUT TYPE="checkbox" CHECKED NAME="save" VALUE="1">
151 Remember this information
155 <INPUT TYPE="checkbox"<?php if ( $payby == 'CARD' ) { ?> CHECKED<?php } ?> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }">
156 Charge future payments to this card automatically
161 <INPUT TYPE="hidden" NAME="paybatch" VALUE="<?php echo $paybatch; ?>">
162 <INPUT TYPE="submit" NAME="process" VALUE="Process payment"> <!-- onClick="this.disabled=true"> -->