Bugzilla – Attachment 44426 Details for
Bug 11622
Add ability to pay fees and fines from OPAC via PayPal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11622 [QA Followup] - Fix currency issue, add error template
Bug-11622-QA-Followup---Fix-currency-issue-add-err.patch (text/plain), 4.76 KB, created by
Kyle M Hall (khall)
on 2015-11-04 16:06:48 UTC
(
hide
)
Description:
Bug 11622 [QA Followup] - Fix currency issue, add error template
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-11-04 16:06:48 UTC
Size:
4.76 KB
patch
obsolete
>From 3760e951387604caecdab151752883216bf3ffe3 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 24 Sep 2015 08:06:16 -0400 >Subject: [PATCH] Bug 11622 [QA Followup] - Fix currency issue, add error template > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../bootstrap/en/modules/opac-account-pay-error.tt | 48 ++++++++++++++++++++ > opac/opac-account-pay-paypal-return.pl | 8 +++- > opac/opac-account-pay.pl | 2 +- > 3 files changed, 55 insertions(+), 3 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt >new file mode 100644 >index 0000000..2c306bc >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-error.tt >@@ -0,0 +1,48 @@ >+[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your payment >+[% INCLUDE 'doc-head-close.inc' %] >+[% BLOCK cssinclude %][% END %] >+</head> >+ >+<body id="opac-account-pay-return" class="scrollto"> >+[% INCLUDE 'masthead.inc' %] >+ >+<div class="main"> >+ <ul class="breadcrumb"> >+ <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li> >+ <li><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]</a> <span class="divider">›</span></li> >+ <li><a href="#">Your payment</a></li> >+ </ul> >+ >+ <div class="container-fluid"> >+ <div class="row-fluid"> >+ <div class="span2"> >+ <div id="navigation"> >+ [% INCLUDE 'navigation.inc' IsPatronPage=1 %] >+ </div> >+ </div> >+ <div class="span10"> >+ <div id="useraccount" class="maincontent"> >+ [% IF error %] >+ <div id="error" class="dialog alert"> >+ <p><strong>Error:</strong> there was an problem processing your payment</p> >+ >+ [% IF error == "PAYPAL_UNABLE_TO_CONNECT" %] >+ <p>Unable to connect to PayPal.</p> >+ <p>Please try again later.</p> >+ [% ELSIF error == "PAYPAL_ERROR_PROCESSING" %] >+ <p>Unable to verify payment.</p> >+ <p>Please contact the library to verify your payment.</p> >+ [% END %] >+ </div> >+ [% END %] >+ >+ <a href="/cgi-bin/koha/opac-account.pl">Return to fine details</a> >+ </div> <!-- / #useraccount --> >+ </div> <!-- / .span10 --> >+ </div> <!-- / .row-fluid --> >+ </div> <!-- / .container-fluid --> >+</div> <!-- / .main --> >+ >+[% INCLUDE 'opac-bottom.inc' %] >+ >+[% BLOCK jsinclude %][% END %] >diff --git a/opac/opac-account-pay-paypal-return.pl b/opac/opac-account-pay-paypal-return.pl >index d2be6d3..4279263 100755 >--- a/opac/opac-account-pay-paypal-return.pl >+++ b/opac/opac-account-pay-paypal-return.pl >@@ -30,6 +30,7 @@ use C4::Auth; > use C4::Output; > use C4::Accounts; > use C4::Members; >+use C4::Budgets qw(GetCurrency); > use Koha::Database; > > my $cgi = new CGI; >@@ -49,6 +50,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >+my $active_currency = GetCurrency(); >+ > my $token = $cgi->param('token'); > my $payer_id = $cgi->param('PayerID'); > my $amount = $cgi->param('amount'); >@@ -75,11 +78,12 @@ my $nvp_params = { > 'PAYERID' => $payer_id, > 'TOKEN' => $token, > 'PAYMENTREQUEST_0_AMT' => $amount, >+ 'PAYMENTREQUEST_0_CURRENCYCODE' => $active_currency->{currency}, > }; > > my $response = $ua->request( POST $url, $nvp_params ); > >-my $error; >+my $error = q{}; > if ( $response->is_success ) { > my $params = url_params_mixed( $response->decoded_content ); > >@@ -98,7 +102,7 @@ if ( $response->is_success ) { > > } > else { >- $error => "PAYPAL_UNABLE_TO_CONNECT"; >+ $error = "PAYPAL_UNABLE_TO_CONNECT"; > } > > $template->param( >diff --git a/opac/opac-account-pay.pl b/opac/opac-account-pay.pl >index 4fdd28e..e8664e4 100755 >--- a/opac/opac-account-pay.pl >+++ b/opac/opac-account-pay.pl >@@ -42,7 +42,7 @@ unless ( C4::Context->preference('EnablePayPalOpacPayments') ) { > > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > { >- template_name => "opac-account-pay-return.tt", >+ template_name => "opac-account-pay-error.tt", > query => $cgi, > type => "opac", > authnotrequired => 0, >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11622
:
24753
|
24754
|
24756
|
40520
|
40521
|
40522
|
40523
|
42241
|
42351
|
42352
|
42594
|
42649
|
42702
|
42705
|
42715
|
42733
|
42774
|
42775
|
42777
|
42778
|
42842
|
42843
|
42857
|
42858
|
42859
|
42860
|
42861
|
42862
|
42863
|
42864
|
42865
|
44419
|
44420
|
44421
|
44422
|
44423
|
44424
|
44425
|
44426
|
44427
|
46143
|
46144
|
46145
|
46146
|
46147
|
46148
|
46149
|
46150
|
46151