From 93eadbbfdc684cf323b1b1402ba0d96a9f98c4d7 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 22 Sep 2015 08:11:40 -0400 Subject: [PATCH] Bug 11622 [QA Followup] - Use Koha's active currency for PayPal Signed-off-by: Jonathan Druart --- opac/opac-account-pay.pl | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/opac/opac-account-pay.pl b/opac/opac-account-pay.pl index 5260309..4fdd28e 100755 --- a/opac/opac-account-pay.pl +++ b/opac/opac-account-pay.pl @@ -30,6 +30,7 @@ use URI; use C4::Auth; use C4::Output; use C4::Context; +use C4::Budgets qw(GetCurrency); use Koha::Database; my $cgi = new CGI; @@ -57,6 +58,8 @@ my $amount_to_pay = ->get_column('amountoutstanding')->sum(); $amount_to_pay = sprintf( "%.2f", $amount_to_pay ); +my $active_currency = GetCurrency(); + my $error = 0; if ( $payment_method eq 'paypal' ) { my $ua = LWP::UserAgent->new; @@ -91,6 +94,7 @@ if ( $payment_method eq 'paypal' ) { 'BRANDNAME' => C4::Context->preference('LibraryName'), 'CANCELURL' => $cancel_url->as_string(), 'RETURNURL' => $return_url->as_string(), + 'PAYMENTREQUEST_0_CURRENCYCODE' => $active_currency->{currency}, 'PAYMENTREQUEST_0_AMT' => $amount_to_pay, 'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale', 'PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD' => 'InstantPaymentOnly', -- 1.7.2.5