NAME

Business::OnlinePayment::BankOfAmerica - Bank of America backend for Business::OnlinePayment

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."\n";
 } else {
     print "Card was rejected: ".$tx->error_message."\n";
 }

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."\n";
     } else {
         print "Card was rejected: ".$capture->error_message."\n";
     }

 }

SUPPORTED TRANSACTION TYPES

Visa, MasterCard, American Express, JCB, Discover/Novus, Carte blanche/Diners Club

Content required for `Authorization Only': type, action, amount, invoice_number, customer_id, first_name, last_name, address, city, state, zip, email, card_number, expiration, referer

Content required for `Post Authorization': action, login, password, order_number, amount, authorization, description

`Normal Authorization' is not supported by the Bank of America gateway.

`Credit' is untested.

DESCRIPTION

For detailed information see Business::OnlinePayment.

NOTE

Unlike Business::OnlinePayment or early verisons of Business::OnlinePayment::AuthorizeNet, Business::OnlinePayment::BankOfAmerica requires separate first_name and last_name fields.

An additional name field is optional. By default the first_name and last_name fields will be concatenated.

NOTE

Business::OnlinePayment::BankOfAmerica does not support the Normal Authorization mode which combines authorization and capture into a single tranaction. You must use the Authorization Only mode followed by the Post Authorization mode. The Credit mode is supported.

COMPATIBILITY

This module implements the interface documented at http://www.bankofamerica.com/merchantservices/index.cfm?template=merch_ic_estores_developer.cfm

The settlement API is documented at https://manager.bamart.com/welcome/SettlementAPI.pdf

BUGS

No login and password are required for Authorization Only mode. Access is restricted only by the merchant id (available in any public store webpage which passes off to the backend system) and HTTP referer header.

There is no way to run test transactions against the settlement API.

AUTHOR

Ivan Kohler <ivan-bofa@420.am>

Based on Business::OnlinePayment::AuthorizeNet written by Jason Kohles.

SEE ALSO

perl(1). Business::OnlinePayment.