X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=lib%2FBusiness%2FOnlinePayment%2FTransactionCentral.pm;h=aca83c6e0e266f8004024c958acd1912a6e9878e;hb=32014ce34ac7f23d45e3ea1622789ec735fe9e56;hp=e16a484198cd2aeaa50980cd0631982fd74e8758;hpb=97caf6448f338be65d58b3331d3cb50084fa2793;p=Business-OnlinePayment-TransactionCentral.git diff --git a/lib/Business/OnlinePayment/TransactionCentral.pm b/lib/Business/OnlinePayment/TransactionCentral.pm index e16a484..aca83c6 100644 --- a/lib/Business/OnlinePayment/TransactionCentral.pm +++ b/lib/Business/OnlinePayment/TransactionCentral.pm @@ -18,7 +18,9 @@ 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 { @@ -59,7 +61,7 @@ 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; @@ -107,10 +109,13 @@ sub submit { 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"; @@ -177,7 +182,7 @@ Business::OnlinePayment::TransactionCentral - Transaction Central backend module # 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 @@ -229,7 +234,7 @@ Ivan Kohler =head1 COPYRIGHT AND LICENSE -Copyright (C) 2005 by Ivan Kohler +Copyright (C) 2006 by Ivan Kohler This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.