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 %]" />
37 <table title="[% l('Billing Information') %]">
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 title="[% l('List of Transactions') %]"
44 class="table_no_border_space table_no_cell_pad myopac_payments_table">
47 <th>[% l('Name') %]</th>
48 <th>[% l('Amount') %]</th>
53 FOR f IN ctx.fines.circulation;
54 NEXT IF CGI.param('xact').size &&
55 !CGI.param('xact').grep(f.xact.id).size;
56 attrs = {marc_xml => f.marc_xml};
58 PROCESS get_marc_attrs args=attrs;
59 ELSIF f.xact.reservation;
60 attrs.title = f.xact.reservation.target_resource_type.name;
63 <td>[% attrs.title | html %]</td>
64 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
68 FOR f IN ctx.fines.grocery;
69 NEXT IF CGI.param('xact_misc').size &&
70 !CGI.param('xact_misc').grep(f.xact.id).size %]
72 <td>[% f.xact.last_billing_type | html %]</td>
73 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
80 [% l('Total amount to pay:') %]
81 <strong>[% money(ctx.fines.balance_owed) %]</strong>
84 [% | l('<strong>', '</strong>') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
88 <td><label for="payment-first-name">[% l('First Name') %]</label></td>
89 <td><input type="text" name="billing_first" id="payment-first-name"
90 value="[% ctx.user.first_given_name | html %]" /></td>
93 <td><label for="payment-last-name">[% l('Last Name') %]</label></td>
94 <td><input type="text" name="billing_last" id="payment-last-name"
95 value="[% ctx.user.family_name | html %]" /></td>
98 <td><label for="payment-email-addr">[% l('Email Address') %]</label></td>
100 <input id="payment-email-addr" type="text" disabled="disabled"
101 readonly="readonly" value="[% ctx.user.email | html %]" />
102 <a title="[% l('Update Email Address') %]"
103 href="[% ctx.opac_root %]/myopac/update_email?return_to_referer=1">[% l("Update") %]</a>
107 <td><label for="payment-billing-address">[% l('Street Address') %]</label></td>
108 <td><input type="text" name="billing_address" id="payment-billing-address"
109 value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
112 <td><label for="payment-billing-city">[% l('City' )%]</label></td>
113 <td><input type="text" name="billing_city" id="payment-billing-city"
114 value="[% ctx.user.billing_address.city | html %]" /></td>
117 <td><label for="payment-billing-state">[% l('State or Province') %]</label></td>
118 <td><input type="text" name="billing_state" id="payment-billing-state"
119 value="[% ctx.user.billing_address.state | html %]" /></td>
122 <td><label for="paymenet-billing-zip">[% l('ZIP or Postal Code') %]</label></td>
123 <td><input type="text" name="billing_zip" id="paymenet-billing-zip"
124 value="[% ctx.user.billing_address.post_code | html %]" /></td>
127 <td colspan='2'><strong>[% l('Credit Card Information') %]</strong></td>
129 <!-- Technically not needed since card type is derived from the CC number
131 <td>[% l('Type of Card') %]</td>
134 <option value='VISA'>[% l('VISA') %]</option>
135 <option value='MasterCard'>[% l('MasterCard') %]</option>
136 <option value='American Express'>[% l('American Express') %]</option>
142 <td><label for="payment-credit-card">[% l('Credit Card #') %]</label></td>
143 <td><input type="text" name="number"
144 id="payment-credit-card" maxlength="16" /></td>
147 <td><label for="payment-security-code">[% l('Security Code') %]</label></td>
149 <input type="text" size="4" maxlength="5"
150 name="cvv2" id="payment-security-code"/>
154 <td><label for="payment-expire-month">[% l('Expiration Month') %]</label></td>
156 <select name="expire_month" id="payment-expire-month">
157 <option value="01">[% l("January") %]</option>
158 <option value="02">[% l("February") %]</option>
159 <option value="03">[% l("March") %]</option>
160 <option value="04">[% l("April") %]</option>
161 <option value="05">[% l("May") %]</option>
162 <option value="06">[% l("June") %]</option>
163 <option value="07">[% l("July") %]</option>
164 <option value="08">[% l("August") %]</option>
165 <option value="09">[% l("September") %]</option>
166 <option value="10">[% l("October") %]</option>
167 <option value="11">[% l("November") %]</option>
168 <option value="12">[% l("December") %]</option>
173 <td><label for="payment-expire-year">[% l('Expiration Year') %]</label></td>
175 <select name="expire_year" id="payment-expire-year">
176 [% year = date.format(date.now, '%Y');
178 WHILE y < year + 10; # show ten years starting now %]
179 <option value="[% y %]">[% y %]</option>
185 <td colspan='2' align="center">
186 <input type="submit" value="[% l('Next') %]" />
187 <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]">[% l('Cancel') %]</a>
190 [% INCLUDE "opac/parts/myopac/main_refund_policy.tt2" %]