From: levinse Date: Tue, 7 Jun 2011 01:00:34 +0000 (+0000) Subject: BOP Cardcom, RT13058 X-Git-Url: http://git.freeside.biz/gitweb/?p=Business-OnlinePayment-Cardcom.git;a=commitdiff_plain;h=f4e54b965c13751c1a4b79f801f65d25dbd13cae BOP Cardcom, RT13058 --- diff --git a/Cardcom.pm b/Cardcom.pm index 68ba354..57e9d14 100644 --- a/Cardcom.pm +++ b/Cardcom.pm @@ -24,7 +24,6 @@ sub set_defaults { # -Identity number # -Configurable currency # -Configurable deal code -# -Refunds or whatever this thing calls them sub submit { my($self) = @_; @@ -38,8 +37,13 @@ sub submit { cvv2 => 'cvv', ); - die "invalid action" unless - $self->{_content}{'action'} =~ /^\s*normal\s*authorization\s*$/i; + my $action = $self->{_content}{'action'}; + if ( $action =~ /^\s*credit\s*$/i ) { + $self->{_content}{dealtype} = 51; + $self->{_content}{credittype} = 1; + } elsif ( $action !~ /^\s*normal\s*authorization\s*$/i ) { + die "invalid action"; + } $self->{_content}{'expiration'} =~ /^(\d+)\D+\d*(\d{2})$/ or croak "unparsable expiration ". $self->{_content}{expiration}; @@ -111,6 +115,8 @@ sub fields { Username userpassword languages + dealtype + credittype cvv ); } @@ -124,9 +130,10 @@ sub _info { 'support_types' => [ 'CC' ], 'token_support' => 0, # well technically the gateway supports it, but we haven't implemented it 'test_transaction' => 1, - 'supported_actions' => [ # XXX refunds + 'supported_actions' => [ 'Normal Authorization', - ], + 'Credit', + ], }; }