1 package Business::OnlinePayment::PayConnect;
5 use Business::OnlinePayment;
6 #use Business::CreditCard;
7 use Net::SSLeay qw( make_form post_https get_https make_headers );
8 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $DEBUG);
12 @ISA = qw(Exporter AutoLoader Business::OnlinePayment);
23 $self->server('zavijah.e-ebi.net');
25 $self->path('/rtv/servlet/aio');
27 $self->build_subs(qw( partner ));
32 my %content = $self->content();
34 $content{$_} = ref($map{$_})
38 $self->content(%content);
43 my %content = $self->content();
45 my $action = lc($content{'action'});
46 if ( $action eq 'authorization only' ) {
48 croak "$action not (yet) supported";
51 my $type = lc($content{'type'});
52 if ( $type eq 'lec' ) {
54 croak "$type not (yet) supported";
57 $content{'zip'} =~ s/\D//g;
58 $content{'zip'} =~ /^(\d{5})(\d*)$/;
59 my($zip, $zip4) = ($1, $2);
61 my $phone = $content{'phone'};
65 ebiinfo => \'AIO-1.0',
67 password => 'password',
68 partner => \($self->partner()),
70 transtype => \'A', #action
71 paytype => \'lec', #type
72 trackid => 'invoice_number',
73 acctid => 'customer_id',
75 billaddr1 => 'address',
92 my %post_data = $self->get_fields(qw(
93 ebiinfo clientid password partner transtype paytype trackid acctid
94 billname billaddr1 billcity billstate billzip billzip4 amt btn
97 my $s = $self->server();
98 my $p = $self->port();
99 my $t = $self->path();
101 my $pd = make_form(%post_data);
102 my($page,$server_response,%headers) = post_https($s,$p,$t,'',$pd);
104 #warn join('-',%headers);
106 my %response = map { split('=',$_,2) } split(/\|/,$page);
107 #warn "$_: $response{$_}\n" foreach keys %response;
109 if ( $response{'response'} eq '0000' ) {
110 $self->is_success(1);
111 $self->result_code('0000');
112 $self->authorization($response{'trackid'});
114 $self->is_success(0);
115 $self->result_code($response{'response'});
116 $self->error_message($response{'respmsg'});
126 Business::OnlinePayment::PayConnect - PaymentOne (formerly eBillit) PayConnect backend for Business::OnlinePayment
130 use Business::OnlinePayment;
132 my $tx = new Business::OnlinePayment("PayConnect",
137 login => 'test', #ClientID
139 action => 'Authorization Only',
140 description => 'Business::OnlinePayment test',
142 invoice_number => '100100',
143 name => 'Tofu Beast',
144 phone => '4155554321',
148 if($tx->is_success()) {
149 print "LEC billing authorized successfully: ".$tx->authorization."\n";
151 print "LEC billing was rejected: ".$tx->error_message."\n";
156 For detailed information see L<Business::OnlinePayment>.
160 This module only implements 'LEC' (phone bill billing) functionality at this
161 time. Credit card and ACH transactions are not (yet) supported.
165 This module implements an interface the "HTTPS AIO Validation Protocol
166 version 3.0" of PaymentOne (formerly eBillit) PayConnect
167 <http://www.paymentone.com/products/paycon.asp>. Unfortunately, no
168 documentation is publicly available.
172 Ivan Kohler <ivan-jettis@420.am>
176 perl(1). L<Business::OnlinePayment>