X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=Cardcom.pm;h=0203f78610cb4de267901799f882b4cac0b59137;hb=82a335ec22857eae3a8c351a8fbf348c32b97de6;hp=68ba354a2a3441309280546fba229b122c24cc29;hpb=f615277ada6dbcb82a61e15e757e88c428662366;p=Business-OnlinePayment-Cardcom.git diff --git a/Cardcom.pm b/Cardcom.pm index 68ba354..0203f78 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', + ], }; } @@ -188,4 +195,14 @@ Erik Levinson perl(1). L. +=head1 ADVERTISEMENT + +Need a complete, open-source back-office and customer self-service solution? +The Freeside software includes support for credit card and electronic check +processing, integrated trouble ticketing, and customer signup and self-service +web interfaces. + +http://freeside.biz/freeside/ + + =cut