summaryrefslogtreecommitdiff
path: root/lib/Business
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Business')
-rw-r--r--lib/Business/OnlinePayment/IATSPayments.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Business/OnlinePayment/IATSPayments.pm b/lib/Business/OnlinePayment/IATSPayments.pm
index dd6dc5b..69495ab 100644
--- a/lib/Business/OnlinePayment/IATSPayments.pm
+++ b/lib/Business/OnlinePayment/IATSPayments.pm
@@ -8,7 +8,7 @@ use Business::CreditCard;
use SOAP::Lite;
#SOAP::Lite->import(+trace=>'debug');
-our $VERSION = '0.01';
+our $VERSION = '0.02';
$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
sub _info {
@@ -287,6 +287,8 @@ sub submit {
my $processresult = $iatsresponse->{PROCESSRESULT};
+ $processresult->{TRANSACTIONID} =~ s/^\s+//;
+ $processresult->{TRANSACTIONID} =~ s/\s+$//;
$self->authorization($processresult->{TRANSACTIONID} || '');
if ( $processresult->{AUTHORIZATIONRESULT} =~ /^\s*OK(:\s*\d+:)?(\w)?\s*$/i ) {
@@ -303,6 +305,7 @@ sub submit {
)
{
$self->is_success(0);
+ $self->result_code($2);
$self->error_message( $reject{$2} || $processresult->{AUTHORIZATIONRESULT});
$self->failure_status( $failure_status{$2} || 'decline' );