LP1895679: Add Stripe v3 support to Bootstrap OPAC
[Evergreen.git] / Open-ILS / src / templates-bootstrap / opac / myopac / main_payment_form.tt2
1 [%  PROCESS "opac/parts/header.tt2";
2     PROCESS "opac/parts/misc_util.tt2";
3     WRAPPER "opac/parts/myopac/base.tt2";
4     myopac_page = "main";
5     myopac_main_page = "payment_form";
6
7     last_chance = CGI.param("last_chance");
8
9     IF myopac_main_page == "payment_form" AND
10         ctx.get_org_setting(ctx.user.home_ou.id, 'credit.processor.stripe.enabled') AND ctx.get_org_setting(ctx.user.home_ou.id, 'credit.processor.default') == 'Stripe';
11         ctx.use_stripe = 1;
12     END %]
13
14 <a name="payment"> </a>
15 <h3 class="sr-only">[% l('Pay Charges') %]</h3>
16 [% IF ctx.fines.balance_owed <= 0 %]
17 <div>
18     [% l("The minimum amount you can pay is \$0.01.") %]
19 </div>
20 [% ELSE %]
21 <div class="container">
22 <hr>
23 <div id="pay_fines_now">
24     [% IF last_chance %]
25       [% PROCESS "opac/myopac/last_chance_form.tt2"; %]
26     [% ELSE %]
27         [% IF ctx.use_stripe %]
28             [% PROCESS "opac/myopac/stripe_payment_form.tt2"; %]
29         [% ELSE %]
30             [% PROCESS "opac/myopac/generic_payment_form.tt2"; %]
31         [% END %]
32     [% END %]
33 </div></div>
34
35 [% END %]
36 [% END %]