Lines 30-36
use URI;
Link Here
|
30 |
use C4::Auth; |
30 |
use C4::Auth; |
31 |
use C4::Output; |
31 |
use C4::Output; |
32 |
use C4::Context; |
32 |
use C4::Context; |
33 |
use C4::Budgets qw(GetCurrency); |
33 |
use Koha::Acquisition::Currencies; |
34 |
use Koha::Database; |
34 |
use Koha::Database; |
35 |
|
35 |
|
36 |
my $cgi = new CGI; |
36 |
my $cgi = new CGI; |
Lines 58-64
my $amount_to_pay =
Link Here
|
58 |
->get_column('amountoutstanding')->sum(); |
58 |
->get_column('amountoutstanding')->sum(); |
59 |
$amount_to_pay = sprintf( "%.2f", $amount_to_pay ); |
59 |
$amount_to_pay = sprintf( "%.2f", $amount_to_pay ); |
60 |
|
60 |
|
61 |
my $active_currency = GetCurrency(); |
61 |
my $active_currency = Koha::Acquisition::Currencies->get_active; |
62 |
|
62 |
|
63 |
my $error = 0; |
63 |
my $error = 0; |
64 |
if ( $payment_method eq 'paypal' ) { |
64 |
if ( $payment_method eq 'paypal' ) { |
Lines 94-100
if ( $payment_method eq 'paypal' ) {
Link Here
|
94 |
'BRANDNAME' => C4::Context->preference('LibraryName'), |
94 |
'BRANDNAME' => C4::Context->preference('LibraryName'), |
95 |
'CANCELURL' => $cancel_url->as_string(), |
95 |
'CANCELURL' => $cancel_url->as_string(), |
96 |
'RETURNURL' => $return_url->as_string(), |
96 |
'RETURNURL' => $return_url->as_string(), |
97 |
'PAYMENTREQUEST_0_CURRENCYCODE' => $active_currency->{currency}, |
97 |
'PAYMENTREQUEST_0_CURRENCYCODE' => $active_currency->currency, |
98 |
'PAYMENTREQUEST_0_AMT' => $amount_to_pay, |
98 |
'PAYMENTREQUEST_0_AMT' => $amount_to_pay, |
99 |
'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale', |
99 |
'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale', |
100 |
'PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD' => 'InstantPaymentOnly', |
100 |
'PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD' => 'InstantPaymentOnly', |
101 |
- |
|
|