Bugzilla – Attachment 58840 Details for
Bug 15907
Remove use of makepayment in opac/opac-account-pay-paypal-return.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15907 - Remove use of makepayment in opac/opac-account-pay-paypal-return.pl
Bug-15907---Remove-use-of-makepayment-in-opacopac-.patch (text/plain), 1.81 KB, created by
Jonathan Druart
on 2017-01-11 18:25:10 UTC
(
hide
)
Description:
Bug 15907 - Remove use of makepayment in opac/opac-account-pay-paypal-return.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-01-11 18:25:10 UTC
Size:
1.81 KB
patch
obsolete
>From 9657cf133b5fb858262b93394bae069a3a8bc90b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 24 Feb 2016 15:56:52 +0000 >Subject: [PATCH] Bug 15907 - Remove use of makepayment in > opac/opac-account-pay-paypal-return.pl > >Test Plan: >1) Apply this patch >2) Make a payment via PayPal in sandbox mode >3) Note the payment succeeds > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Bug 15907 [QA Followup] - Simplify code and call pay() only once > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > opac/opac-account-pay-paypal-return.pl | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > >diff --git a/opac/opac-account-pay-paypal-return.pl b/opac/opac-account-pay-paypal-return.pl >index 77b50d8..eb870cc 100755 >--- a/opac/opac-account-pay-paypal-return.pl >+++ b/opac/opac-account-pay-paypal-return.pl >@@ -93,11 +93,20 @@ if ( $response->is_success ) { > if ( $params{ACK} eq "Success" ) { > $amount = $params{PAYMENTINFO_0_AMT}; > >- my $accountlines_rs = Koha::Database->new()->schema()->resultset('Accountline'); >- foreach my $accountlines_id ( @accountlines ) { >- my $accountline = $accountlines_rs->find( $accountlines_id ); >- makepayment( $accountlines_id, $borrowernumber, undef, $accountline->amountoutstanding, undef, undef, 'PayPal' ); >- } >+ my $account = Koha::Account->new( { patron_id => $borrowernumber } ); >+ my @lines = Koha::Account::Lines->search( >+ { >+ accountlines_id => { -in => \@accountlines } >+ } >+ ); >+ >+ $account->pay( >+ { >+ amount => $amount, >+ lines => \@lines, >+ note => 'PayPal' >+ } >+ ); > } > else { > $error = "PAYPAL_ERROR_PROCESSING"; >-- >2.9.3
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 15907
:
48348
|
52149
|
57194
|
58816
|
58829
|
58830
| 58840