From 393d7c66d25845a853cd2ffa476555fbe8ae0a47 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 Signed-off-by: Kyle M Hall --- opac/opac-account-pay.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opac/opac-account-pay.pl b/opac/opac-account-pay.pl index 5260309793..4fdd28eb55 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', -- 2.39.5