[% PROCESS "opac/parts/header.tt2"; PROCESS "opac/parts/misc_util.tt2"; WRAPPER "opac/parts/myopac/main_base.tt2"; myopac_page = "main"; myopac_main_page = "payment_form"; last_chance = CGI.param("last_chance"); %]

[% l('Pay Fines') %]

[% IF ctx.fines.balance_owed <= 0 %]
[% l("You either have no fines to pay or you have selected fines whose " _ "total is non-positive. We cannot process non-positive amounts.") %]
[% ELSE %]
[% IF last_chance %]

[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]

[% FOR k IN CGI.Vars; NEXT UNLESS k; FOR val IN CGI.param(k) %] [% END; END %] [% l('Cancel') %] [% ELSE %] [% FOR xact IN CGI.param('xact') %] [% END %] [% FOR xact IN CGI.param('xact_misc') %] [% END %] [% IF use_stripe %] [% END %] [% INCLUDE "opac/parts/myopac/main_refund_policy.tt2" %]
[% l('Billing Information') %]

[% l('Selected fines you are paying for:') %]

[% FOR f IN ctx.fines.circulation; NEXT IF CGI.param('xact').size && !CGI.param('xact').grep(f.xact.id).size; attrs = {marc_xml => f.marc_xml}; IF f.marc_xml; PROCESS get_marc_attrs args=attrs; ELSIF f.xact.reservation; attrs.title = f.xact.reservation.target_resource_type.name; END %] [% END; FOR f IN ctx.fines.grocery; NEXT IF CGI.param('xact_misc').size && !CGI.param('xact_misc').grep(f.xact.id).size %] [% END %]
[% l('Name') %] [% l('Amount') %]
[% attrs.title | html %] [% money(f.xact.balance_owed) %]
[% f.xact.last_billing_type | html %] [% money(f.xact.balance_owed) %]

[% l('Total amount to pay:') %] [% money(ctx.fines.balance_owed) %]

[% | l('', '') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
[% l("Update") %]
[% l('Credit Card Information') %]
[% l('Cancel') %]
[% END %]
[% END %] [% END %]