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
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;
ssl_transaction_type
ssl_merchant_id
ssl_pin
- ssl_user_id
ssl_amount
);
$required{CC_CCSALE} = [ @alwaysrequired, qw(
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
$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 );