use vars qw($VERSION $DEBUG @ISA $me);
@ISA = qw(Business::OnlinePayment::HTTPS);
-$VERSION = '0.07_01';
+$VERSION = '0.07';
$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
$DEBUG = 0;
my %opts = @_;
# standard B::OP methods/data
- $self->server('gateway17.jetpay.com') unless $self->server;
+ $self->server('gtwy.ippay.com') unless $self->server;
$self->port('443') unless $self->port;
- $self->path('/jetpay') unless $self->path;
+ $self->path('/ippay') unless $self->path;
$self->build_subs(qw( order_number avs_code cvv2_response
response_page response_code response_headers
'void' => 'VOIDACH',
'credit' => 'REVERSAL',
);
+
if ($self->transaction_type eq 'CC') {
$content{'TransactionType'} = $actions{$action} || $action;
- }elsif ($self->transaction_type eq 'ECHECK') {
- $content{'TransactionType'} = $check_actions{$action} || $action;
- }
+ } elsif ($self->transaction_type eq 'ECHECK') {
+ $content{'TransactionType'} = $check_actions{$action} || $action;
- # ACCOUNT TYPE MAP
- my %account_types = ('personal checking' => 'Checking',
- 'personal savings' => 'Savings',
- 'business checking' => 'BusinessCk',
- );
- $content{'account_type'} = $account_types{lc($content{'account_type'})}
- || $content{'account_type'};
+ # ACCOUNT TYPE MAP
+ my %account_types = ('personal checking' => 'Checking',
+ 'personal savings' => 'Savings',
+ 'business checking' => 'BusinessCk',
+ );
+ $content{'account_type'} = $account_types{lc($content{'account_type'})}
+ || $content{'account_type'};
+ }
$content{Origin} = 'RECURRING'
if ($content{recurring_billing} &&$content{recurring_billing} eq 'YES' );
foreach ( keys ( %{($self->{_defaults})} ) ) {
$content{$_} = $self->{_defaults}->{$_} unless exists($content{$_});
}
+ if ($self->test_transaction()) {
+ $content{'login'} = 'TESTTERMINAL';
+ }
$self->content(%content);
$self->required_fields(@required_fields);
}
}
- if ($self->test_transaction()) {
- $self->server('test1.jetpay.com');
- $self->port('443');
- $self->path('/jetpay');
- }
-
my $transaction_id = $content{'order_number'};
unless ($transaction_id) {
my ($page, $server_response, %headers) = $self->https_get('dummy' => 1);
if ( exists($response->{ActionCode}) && !exists($response->{ErrMsg})) {
$self->error_message($response->{ResponseText});
}else{
- $self->error_message($response->{Errmsg});
+ $self->error_message($response->{ErrMsg});
}
# }else{
# $self->error_message("Server Failed");
=head1 COMPATIBILITY
+Version 0.07 changes the server name and path for IPPay's late 2012 update.
+
Business::OnlinePayment::IPPay uses IPPay XML Product Specifications version
1.1.2.
$tx,
desc => "invalid card_number",
is_success => 0,
- result_code => '912',
- error_message => 'INVALID CARD NUMBER',
+ result_code => '900', #'912' with old jetpay gw
+ error_message => 'Invalid card number. ', #'INVALID CARD NUMBER' w/old gw
authorization => qr/^$/,
avs_code => '', # so rather pointless :\
cvv2_response => '', # ...
# authorization void test
{
- my $tx = Business::OnlinePayment->new("IPPay", @opts);
+ my $tx = Business::OnlinePayment->new("IPPay", %opt);
$tx->content(%content, action => 'authorization only', amount => '3.00' );
$tx->test_transaction(1);
$tx->submit;