From e774c0d48cdc2c9f4e02d5f5b413bfbd816661cd Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Thu, 19 Sep 2013 16:05:18 -0400 Subject: [PATCH] Fix looking in wrong place for OU for setting lookup call Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm index 32e4417daf..321e190f16 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm @@ -75,7 +75,10 @@ sub process_stripe_or_bop_payment { if (!$cc_args->{processor}) { if (!($cc_args->{processor} = $U->ou_ancestor_setting_value( - $cc_args->{ou}, 'credit.processor.default'))) { + $this_ou, 'credit.processor.default' + ) + ) + ) { return OpenILS::Event->new('CREDIT_PROCESSOR_NOT_SPECIFIED'); } } @@ -388,9 +391,11 @@ sub make_payments { if ($U->event_code($response)) { # non-success (success is 0) $logger->info( "Credit card payment for user $user_id failed: " . - $response->{"textcode"} . " " . - $response->{"payload"}->{"error_message"} + $response->{textcode} . " " . + ($response->{payload}->{error_message} || + $response->{payload}{message}) ); + return $response; } else { # We need to save this for later in case there's a failure on # the EG side to store the processor's result. -- 2.11.0