X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=LinkPoint.pm;h=3e258c64f5537db6b33cdc0e9c5f09df3497b19b;hb=0f9677a5ec0ef393ed34ac8f51a9b9b848cebfa9;hp=6bf9a8373c27d8cd89a7657d7c22969f67173260;hpb=e4f4e9e92f7620ee23f2c7347104c56dd93ff704;p=Business-OnlinePayment-LinkPoint.git diff --git a/LinkPoint.pm b/LinkPoint.pm index 6bf9a83..3e258c6 100644 --- a/LinkPoint.pm +++ b/LinkPoint.pm @@ -6,7 +6,7 @@ use Carp qw(croak); use Business::OnlinePayment; @ISA = qw(Business::OnlinePayment); -$VERSION = '0.09_01'; +$VERSION = '0.09_03'; $VERSION = eval $VERSION; # modperlstyle: convert the string into a number $DEBUG = 0; @@ -135,11 +135,6 @@ sub submit { $result ||= 'LIVE'; } - #docs disagree with lpperl.pm here - $content{'voidcheck'} = 1 - if ($self->transaction_type() =~ /^e?check$/i - && $content{'action'} =~ /^VOID$/); - #strip phone numbers of non-digits for ACH/echeck #as per undocumented suggestion from LinkPoint if ( $self->transaction_type =~ /^e?check$/i ) { @@ -147,6 +142,8 @@ sub submit { $content{$field} =~ s/\D//g; } } + # stuff it back into %content + $self->content(%content); $self->revmap_fields( host => \( $self->server ), @@ -203,6 +200,11 @@ sub submit { $post_data{'ordertype'} = $content{action}; + #docs disagree with lpperl.pm here + $post_data{'voidcheck'} = 1 + if $self->transaction_type() =~ /^e?check$/i + && $post_data{'ordertype'} =~ /^VOID$/; + if ( $content{'cvv2'} ) { $post_data{cvmindicator} = 'provided'; $post_data{cvmvalue} = $content{'cvv2'}; @@ -229,7 +231,12 @@ sub submit { warn "$_ => $response{$_}\n" for keys %response; } - if ( $response{'r_approved'} eq 'APPROVED' ) { + if ( $response{'r_approved'} eq 'APPROVED' + or ( $self->transaction_type() =~ /^e?check$/i + && $response{'r_approved'} eq 'SUBMITTED' + ) + ) + { $self->is_success(1); $self->result_code($response{'r_code'}); $self->authorization($response{'r_ref'});