1 [% PROCESS "default/opac/parts/header.tt2";
2 PROCESS "default/opac/parts/misc_util.tt2";
3 WRAPPER "default/opac/parts/myopac/main_base.tt2";
5 myopac_main_page = "payment_form";
7 [% IF ctx.fines.balance_owed <= 0 %]
9 [% l("You either have no fines to pay or you have selected fines whose " _
10 "total is non-positive. We cannot process non-positive amounts.") %]
13 <div id="pay_fines_now">
14 <form action="[% ctx.opac_root %]/myopac/main_pay" method="POST"
15 onsubmit="return confirm('[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]');">
16 [% FOR xact IN CGI.param('xact') %]
17 <input type="hidden" name="xact" value="[% xact | html %]" />
22 <td colspan='2'><strong>[% l('Billing Information') %]</strong></td>
23 <td rowspan='13' valign='top'>
24 [% l('Selected fines you are paying for:') %]
25 <table cellpadding="0" cellspacing="5" border="0">
28 <th>[% l('Name') %]</th>
29 <th>[% l('Amount') %]</th>
34 FOR f IN ctx.fines.circulation;
35 NEXT IF CGI.param('xact').size &&
36 !CGI.param('xact').grep(f.xact.id).size;
37 attrs = {marc_xml => f.marc_xml};
39 PROCESS get_marc_attrs args=attrs;
40 ELSIF f.xact.reservation;
41 attrs.title = f.xact.reservation.target_resource_type.name;
44 <td>[% attrs.title %]</td>
45 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
49 FOR f IN ctx.fines.grocery;
50 NEXT IF CGI.param('xact').size &&
51 !CGI.param('xact').grep(f.xact.id).size %]
53 <td>[% f.xact.last_billing_type %]</td>
54 <td class="text-right">[% money(f.xact.balance_owed) %]</td>
61 [% l('Total amount to pay:') %]
62 <strong>[% money(ctx.fines.balance_owed) %]</strong>
65 [% | l('<strong>', '</strong>') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
69 <td>[% l('First Name') %]</td>
70 <td><input type="text" name="billing_first" value="[% ctx.user.first_given_name | html %]" /></td>
73 <td>[% l('Last Name') %]</td>
74 <td><input type="text" name="billing_last" value="[% ctx.user.family_name | html %]" /></td>
77 <td>[% l('Street Address') %]</td>
78 <td><input type="text" name="billing_address" value="[% ctx.user.billing_address.street1 _ ctx.user.billing_address.street2 | html %]" /></td>
81 <td>[% l('City' )%]</td>
82 <td><input type="text" name="billing_city" value="[% ctx.user.billing_address.city | html %]" /></td>
85 <td>[% l('State or Province') %]</td>
86 <td><input type="text" name="billing_state" value="[% ctx.user.billing_address.state | html %]" /></td>
89 <td>[% l('ZIP or Postal Code') %]</td>
90 <td><input type="text" name="billing_zip" value="[% ctx.user.billing_address.post_code | html %]" /></td>
93 <td colspan='2'><strong>[% l('Credit Card Information') %]</strong></td>
95 <!-- Technically not needed since card type is derived from the CC number
100 <option value='VISA'>VISA</option>
101 <option value='MasterCard'>MasterCard</option>
102 <option value='American Express'>American Express</option>
108 <td>[% l('Credit Card #') %]</td>
109 <td><input type="text" name="number" maxlength="16" /></td>
113 <div style="position:absolute;">
114 <div style="position:relative;left:80px;">
116 src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
119 [% l('Security Code') %]
122 <input type="text" size="4" maxlength="5" name="cvv2" />
126 <td>[% l('Exipration Month') %]</td>
128 <select name="expire_month">
129 <option value="01">[% l("January") %]</option>
130 <option value="02">[% l("February") %]</option>
131 <option value="03">[% l("March") %]</option>
132 <option value="04">[% l("April") %]</option>
133 <option value="05">[% l("May") %]</option>
134 <option value="06">[% l("June") %]</option>
135 <option value="07">[% l("July") %]</option>
136 <option value="08">[% l("August") %]</option>
137 <option value="09">[% l("September") %]</option>
138 <option value="10">[% l("October") %]</option>
139 <option value="11">[% l("November") %]</option>
140 <option value="12">[% l("December") %]</option>
145 <td>[% l('Expiration Year') %]</td>
147 <select name="expire_year">
148 [% year = date.format(date.now, '%Y');
150 WHILE y < year + 10; # show ten years starting now %]
151 <option value="[% y %]">[% y %]</option>
157 <td colspan='2' align="center">
158 <input type="submit" value="[% l('Submit Payment') %]" />
159 <input type="reset" value="[% l('Cancel') %]"
160 onclick="history.go(-1);" />
163 [% INCLUDE "default/opac/parts/myopac/main_refund_policy.tt2" %]