From: Ivan Kohler Date: Sat, 15 Feb 2014 20:52:57 +0000 (-0800) Subject: quiet warnings, 0.02 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=af684c392679cf62703ea60c0b9c50d70e6cd82a;hp=97691c77e7ace2c14c5e145cb124130e0f0a888e;p=Business-OnlinePayment-IATSPayments.git quiet warnings, 0.02 --- diff --git a/Changes b/Changes index 4ff4c4f..19d4049 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,7 @@ Revision history for Perl extension Business::OnlinePayment::IATSPayments. -0.02 unreleased +0.02 Sat Feb 15 12:45:24 PST 2014 - trim spaces from authorization (TRANSACTIONID) - return numeric IATS error message as result_code diff --git a/lib/Business/OnlinePayment/IATSPayments.pm b/lib/Business/OnlinePayment/IATSPayments.pm index 69495ab..cb5eda3 100644 --- a/lib/Business/OnlinePayment/IATSPayments.pm +++ b/lib/Business/OnlinePayment/IATSPayments.pm @@ -287,8 +287,10 @@ sub submit { my $processresult = $iatsresponse->{PROCESSRESULT}; - $processresult->{TRANSACTIONID} =~ s/^\s+//; - $processresult->{TRANSACTIONID} =~ s/\s+$//; + if ( defined( $processresult->{TRANSACTIONID} ) ) { + $processresult->{TRANSACTIONID} =~ s/^\s+//; + $processresult->{TRANSACTIONID} =~ s/\s+$//; + } $self->authorization($processresult->{TRANSACTIONID} || ''); if ( $processresult->{AUTHORIZATIONRESULT} =~ /^\s*OK(:\s*\d+:)?(\w)?\s*$/i ) {