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 <h3 class="sr-only">[% l('Pay Fines') %]</h3>
11 [% IF ctx.fines.balance_owed <= 0 %]
13 [% l("You either have no fines to pay or you have selected fines whose " _
14 "total is non-positive. We cannot process non-positive amounts.") %]
17 <div id="pay_fines_now">
19 <p><big>[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]</big></p>
20 <form action="[% ctx.opac_root %]/myopac/main_pay_init" method="post">
23 FOR val IN CGI.param(k) %]
24 <input type="hidden" name="[% k | html %]" value="[% val | html %]" />
26 <input type="submit" value="[% l('Submit Payment') %]" />
27 <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]">[% l('Cancel') %]</a>
30 <input type="hidden" name="last_chance" value="1" />
31 [% FOR xact IN CGI.param('xact') %]
32 <input type="hidden" name="xact" value="[% xact | html %]" />
34 [% FOR xact IN CGI.param('xact_misc') %]
35 <input type="hidden" name="xact_misc" value="[% xact | html %]" />
38 <table title="[% l('Billing Information') %]">
41 <td colspan='2'><strong>[% l('Billing Information') %]</strong></td>
42 <td rowspan='13' valign='top'>
43 <p>[% l('Selected fines you are paying for:') %]</p>
44 <table title="[% l('List of Transactions') %]"
45 class="table_no_border_space table_no_cell_pad myopac_payments_table">
48 <th>[% l('Name') %]</th>
49 <th>[% l('Amount') %]</th>
54 FOR f IN ctx.fines.circulation;
55 NEXT IF CGI.param('xact').size &&
56 !CGI.param('xact').grep(f.xact.id).size;
57 attrs = {marc_xml => f.marc_xml};
59 PROCESS get_marc_attrs args=attrs;
60 ELSIF f.xact.reservation;
61 attrs.title = f.xact.reservation.target_resource_type.name;
64 <td>[% attrs.title | html %]</td>
65 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
69 FOR f IN ctx.fines.grocery;
70 NEXT IF CGI.param('xact_misc').size &&
71 !CGI.param('xact_misc').grep(f.xact.id).size %]
73 <td>[% f.xact.last_billing_type | html %]</td>
74 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
81 [% l('Total amount to pay:') %]
82 <strong>[% money(ctx.fines.balance_owed) %]</strong>
85 [% | l('<strong>', '</strong>') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
89 <td><label for="payment-first-name">[% l('First Name') %]</label></td>
90 <td><input type="text" name="billing_first" id="payment-first-name"
91 value="[% ctx.user.first_given_name | html %]" /></td>
94 <td><label for="payment-last-name">[% l('Last Name') %]</label></td>
95 <td><input type="text" name="billing_last" id="payment-last-name"
96 value="[% ctx.user.family_name | html %]" /></td>
99 <td><label for="payment-email-addr">[% l('Email Address') %]</label></td>
101 <input id="payment-email-addr" type="text" disabled="disabled"
102 readonly="readonly" value="[% ctx.user.email | html %]" />
103 <a title="[% l('Update Email Address') %]"
104 href="[% ctx.opac_root %]/myopac/update_email?return_to_referer=1">[% l("Update") %]</a>
108 <td><label for="payment-billing-address">[% l('Street Address') %]</label></td>
109 <td><input type="text" name="billing_address" id="payment-billing-address"
110 value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
113 <td><label for="payment-billing-city">[% l('City' )%]</label></td>
114 <td><input type="text" name="billing_city" id="payment-billing-city"
115 value="[% ctx.user.billing_address.city | html %]" /></td>
118 <td><label for="payment-billing-state">[% l('State or Province') %]</label></td>
119 <td><input type="text" name="billing_state" id="payment-billing-state"
120 value="[% ctx.user.billing_address.state | html %]" /></td>
123 <td><label for="paymenet-billing-zip">[% l('ZIP or Postal Code') %]</label></td>
124 <td><input type="text" name="billing_zip" id="paymenet-billing-zip"
125 value="[% ctx.user.billing_address.post_code | html %]" /></td>
128 <td colspan='2'><strong>[% l('Credit Card Information') %]</strong></td>
130 <!-- Technically not needed since card type is derived from the CC number
132 <td>[% l('Type of Card') %]</td>
135 <option value='VISA'>[% l('VISA') %]</option>
136 <option value='MasterCard'>[% l('MasterCard') %]</option>
137 <option value='American Express'>[% l('American Express') %]</option>
143 <td><label for="payment-credit-card">[% l('Credit Card #') %]</label></td>
144 <td><input type="text" name="number"
145 id="payment-credit-card" maxlength="16" /></td>
148 <td><label for="payment-security-code">[% l('Security Code') %]</label></td>
150 <input type="text" size="4" maxlength="5"
151 name="cvv2" id="payment-security-code"/>
155 <td><label for="payment-expire-month">[% l('Expiration Month') %]</label></td>
157 <select name="expire_month" id="payment-expire-month">
158 <option value="01">[% l("January") %]</option>
159 <option value="02">[% l("February") %]</option>
160 <option value="03">[% l("March") %]</option>
161 <option value="04">[% l("April") %]</option>
162 <option value="05">[% l("May") %]</option>
163 <option value="06">[% l("June") %]</option>
164 <option value="07">[% l("July") %]</option>
165 <option value="08">[% l("August") %]</option>
166 <option value="09">[% l("September") %]</option>
167 <option value="10">[% l("October") %]</option>
168 <option value="11">[% l("November") %]</option>
169 <option value="12">[% l("December") %]</option>
174 <td><label for="payment-expire-year">[% l('Expiration Year') %]</label></td>
176 <select name="expire_year" id="payment-expire-year">
177 [% year = date.format(date.now, '%Y');
179 WHILE y < year + 10; # show ten years starting now %]
180 <option value="[% y %]">[% y %]</option>
186 <td colspan='2' align="center">
187 <input type="submit" value="[% l('Next') %]" />
188 <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]">[% l('Cancel') %]</a>
191 [% INCLUDE "opac/parts/myopac/main_refund_policy.tt2" %]