use vars qw($VERSION @ISA $DEBUG);
@ISA = qw(Business::OnlinePayment::HTTPS);
-$VERSION = '0.01';
+$VERSION = '0.02';
$DEBUG = 0;
sub set_defaults {
$self->port('443');
$self->path('/billing/TransactionCentral/');
- $self->build_subs(qw( order_number avs_code cvv2_response ));
+ $self->build_subs(qw( order_number avs_code cvv2_response
+ response_page response_code response_headers
+ ));
}
sub submit {
$content{'expiration'} =~ /^(\d+)\D+\d*(\d{2})$/
or croak "unparsable expiration ". $content{'expiration'};
my( $month, $year ) = ( $1, $2 );
- #$month = '0'. $month if $month =~ /^\d$/;
+ $month = '0'. $month if $month =~ /^\d$/;
$content{'CCMonth'} = $month;
$content{'CCYear'} = $year;
DESCRIPTION DESCDATE TRANSTYPE TRANSROUTE
);
- #my( $page, $response, %reply_headers ) =
- my( $page, $response ) =
+ my( $page, $response, %reply_headers ) =
$self->https_post( $self->get_fields( @fields ) );
+ $self->response_code( $response );
+ $self->response_page( $page );
+ $self->response_headers( \%reply_headers );
+
warn "\n" if $DEBUG > 1;
if ( $DEBUG > 2 ) {
warn "response: $response\n";
$self->avs_code( $return{'AVSCode'} );
$self->cvv2_response( $return{'CVV2ResponseMsg'} );
- if ( $return{'Auth'} =~ /^(\d+)$/ ) {
+ if ( $return{'Auth'} =~ /^(\w+)$/ ) {
$self->is_success(1);
$self->authorization( $return{'Auth'} );
# One step transaction, the simple case.
####
- my $tx = new Business::OnlinePayment("Capstone");
+ my $tx = new Business::OnlinePayment("TransactionCentral");
$tx->content(
type => 'CC',
login => '10011', #MerchantID