1 [% PROCESS "opac/parts/header.tt2";
2 PROCESS "opac/parts/misc_util.tt2";
3 WRAPPER "opac/parts/myopac/main_base.tt2";
5 myopac_main_page = "payment_form";
7 last_chance = CGI.param("last_chance");
10 [% IF ctx.fines.balance_owed <= 0 %]
12 [% l("You either have no fines to pay or you have selected fines whose " _
13 "total is non-positive. We cannot process non-positive amounts.") %]
16 <div id="pay_fines_now">
18 <p><big>[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]</big></p>
19 <form action="[% ctx.opac_root %]/myopac/main_pay_init" method="POST">
22 FOR val IN CGI.param(k) %]
23 <input type="hidden" name="[% k | html %]" value="[% val | html %]" />
25 <input type="submit" value="[% l('Submit Payment') %]" />
26 <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]">[% l('Cancel') %]</a>
29 <input type="hidden" name="last_chance" value="1" />
30 [% FOR xact IN CGI.param('xact') %]
31 <input type="hidden" name="xact" value="[% xact | html %]" />
33 [% FOR xact IN CGI.param('xact_misc') %]
34 <input type="hidden" name="xact_misc" value="[% xact | html %]" />
40 <td colspan='2'><strong>[% l('Billing Information') %]</strong></td>
41 <td rowspan='13' valign='top'>
42 <p>[% l('Selected fines you are paying for:') %]</p>
43 <table cellpadding="0" cellspacing="0" border="0" class="myopac_payments_table">
46 <th>[% l('Name') %]</th>
47 <th>[% l('Amount') %]</th>
52 FOR f IN ctx.fines.circulation;
53 NEXT IF CGI.param('xact').size &&
54 !CGI.param('xact').grep(f.xact.id).size;
55 attrs = {marc_xml => f.marc_xml};
57 PROCESS get_marc_attrs args=attrs;
58 ELSIF f.xact.reservation;
59 attrs.title = f.xact.reservation.target_resource_type.name;
62 <td>[% attrs.title | html %]</td>
63 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
67 FOR f IN ctx.fines.grocery;
68 NEXT IF CGI.param('xact_misc').size &&
69 !CGI.param('xact_misc').grep(f.xact.id).size %]
71 <td>[% f.xact.last_billing_type | html %]</td>
72 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
79 [% l('Total amount to pay:') %]
80 <strong>[% money(ctx.fines.balance_owed) %]</strong>
83 [% | l('<strong>', '</strong>') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
87 <td>[% l('First Name') %]</td>
88 <td><input type="text" name="billing_first" value="[% ctx.user.first_given_name | html %]" /></td>
91 <td>[% l('Last Name') %]</td>
92 <td><input type="text" name="billing_last" value="[% ctx.user.family_name | html %]" /></td>
95 <td>[% l('Email Address') %]</td>
97 <input type="text" disabled="disabled" readonly="readonly" value="[% ctx.user.email | html %]" />
98 <a href="[% ctx.opac_root %]/myopac/update_email?return_to_referer=1">[% l("Update") %]</a>
102 <td>[% l('Street Address') %]</td>
103 <td><input type="text" name="billing_address" value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
106 <td>[% l('City' )%]</td>
107 <td><input type="text" name="billing_city" value="[% ctx.user.billing_address.city | html %]" /></td>
110 <td>[% l('State or Province') %]</td>
111 <td><input type="text" name="billing_state" value="[% ctx.user.billing_address.state | html %]" /></td>
114 <td>[% l('ZIP or Postal Code') %]</td>
115 <td><input type="text" name="billing_zip" value="[% ctx.user.billing_address.post_code | html %]" /></td>
118 <td colspan='2'><strong>[% l('Credit Card Information') %]</strong></td>
120 <!-- Technically not needed since card type is derived from the CC number
122 <td>Type of Card</td>
125 <option value='VISA'>VISA</option>
126 <option value='MasterCard'>MasterCard</option>
127 <option value='American Express'>American Express</option>
133 <td>[% l('Credit Card #') %]</td>
134 <td><input type="text" name="number" maxlength="16" /></td>
137 <td>[% l('Security Code') %]</td>
139 <input type="text" size="4" maxlength="5" name="cvv2" />
143 <td>[% l('Expiration Month') %]</td>
145 <select name="expire_month">
146 <option value="01">[% l("January") %]</option>
147 <option value="02">[% l("February") %]</option>
148 <option value="03">[% l("March") %]</option>
149 <option value="04">[% l("April") %]</option>
150 <option value="05">[% l("May") %]</option>
151 <option value="06">[% l("June") %]</option>
152 <option value="07">[% l("July") %]</option>
153 <option value="08">[% l("August") %]</option>
154 <option value="09">[% l("September") %]</option>
155 <option value="10">[% l("October") %]</option>
156 <option value="11">[% l("November") %]</option>
157 <option value="12">[% l("December") %]</option>
162 <td>[% l('Expiration Year') %]</td>
164 <select name="expire_year">
165 [% year = date.format(date.now, '%Y');
167 WHILE y < year + 10; # show ten years starting now %]
168 <option value="[% y %]">[% y %]</option>
174 <td colspan='2' align="center">
175 <input type="submit" value="[% l('Next') %]" />
176 <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]">[% l('Cancel') %]</a>
179 [% INCLUDE "opac/parts/myopac/main_refund_policy.tt2" %]