Business::OnlinePayment::BankOfAmerica is a Perl module that requires separate first_name and last_name fields.
SYNOPSIS
use Business::OnlinePayment;
my $tx = new Business::OnlinePayment("BankOfAmerica", 'merchant_id' => 'YOURMERCHANTID');
$tx->content(
type => 'VISA',
action => 'Authorization Only',
description => 'Business::OnlinePayment test',
amount => '49.95',
invoice_number => '100100',
customer_id => 'jsk',
first_name => 'Jason',
last_name => 'Kohles',
address => '123 Anystreet',
city => 'Anywhere',
state => 'UT',
zip => '84058',
email => 'ivan-bofa@420.am',
card_number => '4007000000027',
expiration => '09/99',
referer => 'http://cleanwhisker.420.am/',
);
$tx->submit();
if($tx->is_success()) {
print "Card processed successfully: ".$tx->authorization."
";
} else {
print "Card was rejected: ".$tx->error_message."
";
}
if($tx->is_success()) {
$auth = $tx->authorization;
$ordernum = $tx->order_number;
my $capture = new Business::OnlinePayment("BankOfAmerica", 'merchant_id' => 'YOURMERCHANTID' );
$capture->content(
action => 'Post Authorization',
login => 'YOURLOGIN
password => 'YOURPASSWORD',
order_number => $ordernum,
amount => '0.01',
authorization => $auth,
description => 'Business::OnlinePayment::BankOfAmerica visa test',
);
$capture->submit();
if($capture->is_success()) {
print "Card captured successfully: ".$capture->authorization."
";
} else {
print "Card was rejected: ".$capture->error_message."
";
}
}
Product's homepage
Requirements:
· Perl