1 package Business::BatchPayment;
9 use Business::BatchPayment::Processor;
10 use Business::BatchPayment::Item;
11 use Business::BatchPayment::Transport;
17 Business::BatchPayment - Batch-oriented payment processing
21 our $VERSION = '0.02';
25 use Business::BatchPayment;
27 my %options = ( merchant_id => '00451', password => 'opensesame' );
28 my $processor = Business::BatchPayment->create(MyGateway => %options);
31 push @request, Business::BatchPayment->create(Item =>
32 action => 'payment', # as opposed to 'credit'
33 payment_type => 'CC', #credit card, or 'ECHECK' for check/ACH
35 tid => '0001234', # transaction id, like a customer/order number
36 card_number => '1234123412341238',
37 expiration => '0100', # MM/YY
38 # these fields are optional
41 address => '123 Main Street',
42 address2 => 'Suite H',
47 ); # returns a Business::OnlinePayment::Item;
49 $processor->submit(@request);
51 # at some point in the future
53 my @reply = $processor->receive();
54 foreach my $item (@reply) {
55 ... process items and record successful/failed payments
58 # if your processor uses processor_id...
60 $processor->submit(@request);
62 ... record process_id for that request
65 my @reply = $processor->receive(@process_ids);
71 =item create MODULE[, OPTIONS ]
73 Loads Business::BatchPayment::MODULE, then attempts to call
74 Business::BatchPayment::MODULE->new(OPTIONS).
83 $subclass = "Business::BatchPayment::$subclass";
84 Class::MOP::load_class($subclass);
92 Mark Wells, C<< <mark at freeside.biz> >>
98 You can find documentation for this module with the perldoc command.
100 perldoc Business::BatchPayment
102 Commercial support is available from Freeside Internet Services,
103 L<http://www.freeside.biz>.
105 =head1 LICENSE AND COPYRIGHT
107 Copyright 2012 Mark Wells.
109 This program is free software; you can redistribute it and/or modify it
110 under the terms of either: the GNU General Public License as published
111 by the Free Software Foundation; or the Artistic License.
113 See http://dev.perl.org/licenses/ for more information.
118 1; # End of Business::BatchPayment