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> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
c6a40b272d
commit
678df3132f
|
|
@ -727,15 +727,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
|
||||
-
|
||||
|
|
|
|||
|
|
@ -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 %]
|
||||
|
|
@ -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 ) %]
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -69,6 +69,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 };
|
||||
|
|
|
|||
Loading…
Reference in New Issue