From: Jonathan Prykop Date: Thu, 5 May 2016 22:59:08 +0000 (-0500) Subject: RT#42364: Elavon error when processing credit card X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=Business-OnlinePayment-ElavonVirtualMerchant.git RT#42364: Elavon error when processing credit card --- diff --git a/Changes b/Changes index 14bd560..f655561 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension Business::OnlinePayment::ElavonVirtualMerchant. +0.04 Thu May 05 17:53:35 CDT 2016 + - added ACH support + - added test_transaction support + 0.03 unreleased - Truncate fields to their maximum lengths diff --git a/ElavonVirtualMerchant.pm b/ElavonVirtualMerchant.pm index 29ed092..8616df5 100644 --- a/ElavonVirtualMerchant.pm +++ b/ElavonVirtualMerchant.pm @@ -5,10 +5,29 @@ use strict; use vars qw( $VERSION $DEBUG %maxlength ); use Carp; -$VERSION = '0.03'; -$VERSION = eval $VERSION; +$VERSION = '0.04'; $DEBUG = 0; +sub _info { + return { + 'info_compat' => '0.01', + 'gateway_name' => 'ElavonVirtualMerchant', + 'gateway_url' => 'http://www.myvirtualmerchant.com/', + 'module_version' => $VERSION, + 'supported_types' => [ qw( CC ECHECK ) ], + 'token_support' => 0, + 'test_transaction' => 1, + 'supported_actions' => [ + 'Normal Authorization', + #'Authorization Only', + #'Post Authorization', + #'Void', + 'Credit', + ], + }; +} + + =head1 NAME Business::OnlinePayment::ElavonVirtualMerchant - Elavon Virtual Merchant backend for Business::OnlinePayment @@ -270,6 +289,11 @@ for the transaction type are present, and submits the transaction. Saves the re sub submit { my ($self) = @_; + if ($self->test_transaction) { + $self->server("demo.myvirtualmerchant.com"); + $self->path("/VirtualMerchantDemo/process.do"); + } + $self->_map_fields(); my %content = $self->content; @@ -280,7 +304,6 @@ sub submit { ssl_transaction_type ssl_merchant_id ssl_pin - ssl_user_id ssl_amount ); $required{CC_CCSALE} = [ @alwaysrequired, qw( @@ -301,7 +324,10 @@ sub submit { my %optional; # these are actually each sometimes required, depending on account type & settings, # but we can let converge handle error messages for that + # Regarding ssl_user_id...all Elavon docs say this is required, + # but apparently CardFortress previously worked without it my @alwaysoptional = qw( + ssl_user_id ssl_first_name ssl_last_name ssl_company @@ -418,6 +444,7 @@ sub submit { $params{ssl_result_format}='ASCII'; # send request + warn "CONNECTING TO " . $self->server . ':' . $self->port . $self->path if $self->debug; warn "POST PARAMETERS:\n" . join("\n", map{ "$_ => $params{$_}" } keys(%params)) if $self->debug; my ( $page, $resp, %resp_headers ) = $self->https_post( %params );