Bugzilla – Attachment 44422 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] - Display payment messages directly on opac account view
Bug-11622-QA-Followup---Display-payment-messages-d.patch (text/plain), 7.82 KB, created by
Kyle M Hall (khall)
on 2015-11-04 16:06:31 UTC
(
hide
)
Description:
Bug 11622 [QA Followup] - Display payment messages directly on opac account view
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-11-04 16:06:31 UTC
Size:
7.82 KB
patch
obsolete
>From 0d79f4d8bd965120191526bae91e969bdc4ff9ee Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 18 Sep 2015 05:54:30 -0700 >Subject: [PATCH] Bug 11622 [QA Followup] - Display payment messages directly on opac account view > >Fixed spelling of "Receive" in preferences. > >Signed-off-by: David Kuhn <techservspec@gmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../prog/en/modules/admin/preferences/opac.pref | 6 +- > .../en/modules/opac-account-pay-return.tt | 52 -------------------- > .../opac-tmpl/bootstrap/en/modules/opac-account.tt | 18 +++++++ > opac/opac-account-pay-paypal-return.pl | 8 ++-- > opac/opac-account.pl | 2 + > 5 files changed, 27 insertions(+), 59 deletions(-) > delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-return.tt > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 986b330..8d4b231 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -720,15 +720,15 @@ OPAC: > no: "Production" > - "mode." > - >- - "The email address to recieve PayPal payments is " >+ - "The email address to receive PayPal payments is " > - pref: PayPalUser > class: long > - >- - "The password for the PayPal account to recieve payments is " >+ - "The password for the PayPal account to receive payments is " > - pref: PayPalPwd > class: long > - >- - "The signature for the PayPal account to recieve payments is " >+ - "The signature for the PayPal account to receive payments is " > - pref: PayPalSignature > class: long > - >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-return.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-return.tt >deleted file mode 100644 >index 03b9093..0000000 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account-pay-return.tt >+++ /dev/null >@@ -1,52 +0,0 @@ >-[% 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> >- [% ELSIF amount %] >- <div class="dialog message"> >- <p><strong>Payment applied:</strong> your payment of [% amount %] has been applied to your account</p> >- </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/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >index bf808dc..aefad49 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >@@ -42,6 +42,24 @@ > </div> > [% END %] > >+ [% IF payment_error %] >+ <div id="error" class="dialog alert"> >+ <p><strong>Error:</strong> there was an problem processing your payment</p> >+ >+ [% IF payment_error == "PAYPAL_UNABLE_TO_CONNECT" %] >+ <p>Unable to connect to PayPal.</p> >+ <p>Please contact a librarian to verify your payment.</p> >+ [% ELSIF payment_error == "PAYPAL_ERROR_PROCESSING" %] >+ <p>Unable to verify payment.</p> >+ <p>Please contact a librarian to verify your payment.</p> >+ [% END %] >+ </div> >+ [% ELSIF payment %] >+ <div class="alert alert-info"> >+ <p><strong>Payment applied:</strong> your payment of [% payment %] has been applied to your account</p> >+ </div> >+ [% END %] >+ > <h3>Fines and charges</h3> > > [% IF ( ACCOUNT_LINES ) %] >diff --git a/opac/opac-account-pay-paypal-return.pl b/opac/opac-account-pay-paypal-return.pl >index 5ed3913..d2be6d3 100755 >--- a/opac/opac-account-pay-paypal-return.pl >+++ b/opac/opac-account-pay-paypal-return.pl >@@ -79,12 +79,12 @@ my $nvp_params = { > > my $response = $ua->request( POST $url, $nvp_params ); > >+my $error; > if ( $response->is_success ) { > my $params = url_params_mixed( $response->decoded_content ); > > if ( $params->{ACK} eq "Success" ) { > $amount = $params->{PAYMENTINFO_0_AMT}; >- $template->param( amount => $amount ); > > my $accountlines_rs = Koha::Database->new()->schema()->resultset('Accountline'); > foreach my $accountlines_id ( @accountlines ) { >@@ -93,12 +93,12 @@ if ( $response->is_success ) { > } > } > else { >- $template->param( error => "PAYPAL_ERROR_PROCESSING" ); >+ $error = "PAYPAL_ERROR_PROCESSING"; > } > > } > else { >- $template->param( error => "PAYPAL_UNABLE_TO_CONNECT" ); >+ $error => "PAYPAL_UNABLE_TO_CONNECT"; > } > > $template->param( >@@ -106,4 +106,4 @@ $template->param( > accountview => 1 > ); > >-output_html_with_http_headers( $cgi, $cookie, $template->output ); >+print $cgi->redirect("/cgi-bin/koha/opac-account.pl?payment=$amount&payment-error=$error"); >diff --git a/opac/opac-account.pl b/opac/opac-account.pl >index eb07a4d..57cbf97 100755 >--- a/opac/opac-account.pl >+++ b/opac/opac-account.pl >@@ -73,6 +73,8 @@ $template->param( > accountview => 1, > message => $query->param('message') || q{}, > message_value => $query->param('message_value') || q{}, >+ payment => $query->param('payment'), >+ payment_error => $query->param('payment-error'), > ); > > output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; >-- >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