From 3659e2a6fa66ec049c546c105bfb170b48f118e3 Mon Sep 17 00:00:00 2001 From: Jason Boyer Date: Thu, 19 Sep 2013 09:16:30 -0400 Subject: [PATCH] Rough draft of integrating Stripe support into the opac payment page. --- .../templates/opac/myopac/main_payment_form.tt2 | 59 ++++++++++++++-------- Open-ILS/src/templates/opac/parts/base.tt2 | 41 +++++++++++++-- 2 files changed, 76 insertions(+), 24 deletions(-) diff --git a/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2 b/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2 index 8da0287e85..c5cd8ed029 100644 --- a/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2 +++ b/Open-ILS/src/templates/opac/myopac/main_payment_form.tt2 @@ -5,7 +5,7 @@ myopac_main_page = "payment_form"; last_chance = CGI.param("last_chance"); - + use_stripe = ctx.get_org_setting(ctx.user.home_ou.id, 'opac.processor.stripe.enabled'); %] [% IF ctx.fines.balance_owed <= 0 %]
@@ -25,7 +25,11 @@ [% l('Cancel') %] [% ELSE %] -
+ [% FOR xact IN CGI.param('xact') %] @@ -33,7 +37,9 @@ [% FOR xact IN CGI.param('xact_misc') %] [% END %] - + [% IF use_stripe %] + + [% ENDIF %] @@ -117,32 +123,37 @@ - - + + diff --git a/Open-ILS/src/templates/opac/parts/base.tt2 b/Open-ILS/src/templates/opac/parts/base.tt2 index 95b3c31a14..cd99f7a319 100644 --- a/Open-ILS/src/templates/opac/parts/base.tt2 +++ b/Open-ILS/src/templates/opac/parts/base.tt2 @@ -4,9 +4,9 @@ [% IF ctx.refresh %] - + [% ELSIF ctx.authtime %] - + [% END %] @@ -19,7 +19,42 @@ [% END %] [% INCLUDE 'opac/parts/goog_analytics.tt2' %] - + [% IF myopac_main_page == "payment_form" AND ctx.get_org_setting(ctx.user.home_ou.id, 'opac.processor.stripe.enabled')%] + + + [% END %] + + [% content %] [% INCLUDE 'opac/parts/footer.tt2' %] -- 2.11.0
[% l('Credit Card Information') %]
[% l('Credit Card #') %]
[% l('Security Code') %] - -
[% l('Expiration Month') %] - @@ -161,7 +172,13 @@
[% l('Expiration Year') %] - [% year = date.format(date.now, '%Y'); y = year; WHILE y < year + 10; # show ten years starting now %] @@ -172,7 +189,7 @@
- + [% l('Cancel') %]