summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-02-15 12:52:57 -0800
committerIvan Kohler <ivan@freeside.biz>2014-02-15 12:52:57 -0800
commitaf684c392679cf62703ea60c0b9c50d70e6cd82a (patch)
tree2f9f90923230b26913828875b3527849b1e9f401
parent97691c77e7ace2c14c5e145cb124130e0f0a888e (diff)
quiet warnings, 0.02
-rw-r--r--Changes2
-rw-r--r--lib/Business/OnlinePayment/IATSPayments.pm6
2 files changed, 5 insertions, 3 deletions
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 ) {