BoA
Interchange's support for the Bank of America
Payment Services Provider.
Synopsis
or
|
[charge route="boa" param1="value1" param2="value2"]
|
Prerequisites
or
|
LWP::UserAgent and Crypt::SSLeay
|
Only one of the above options needs be present and working.
Description
The Vend::Payment::BoA module implements the
boa() subroutine for use with Interchange.
It is compatible on a call level with the other Interchange payment modules.
In theory (and even usually in practise) you could switch from another payment
module to BoA with a few configuration file changes.
To enable this module, place this directive in your "interchange.cfg" file:
|
Require module Vend::Payment::BoA
|
This must be in interchange.cfg or a file included from it.
Make sure CreditCardAuto is off, which is the default in
the Standard ecommerce demo.
The "mode" can be named anything, but the "gateway" parameter
must be set to "boa".
To make it the default payment gateway for all credit card transactions in a
specific website, you can set the following in catalog.cfg:
|
Variable MV_PAYMENT_MODE boa
|
It uses several of the standard settings from Interchange payment.
Any time we speak of a setting, it is obtained either first from the tag/call
options, then from an Interchange order Route named after
the mode, then finally a default global payment Variable.
For example, the id parameter would be specified by:
|
[charge route=boa id=YourBoAID]
|
or
or
|
Variable MV_PAYMENT_ID YourBoAID
|
Settings
| Name
|
Description
|
| id
|
Your BoA account ID, supplied by BoA when you sign up.
The variable is MV_PAYMENT_ID. |
| transaction
|
Type of transaction to execute, which may be one of the following:
| Name
|
Description
|
| authorize
|
Perform authorisation only (the default). |
| sale
|
Authorise and settle (requires two separate requests). |
| settle
|
Perform settlement only on previously authorised transaction. |
| return
|
Make a refund on previously settled transaction. |
The variable is MV_PAYMENT_TRANSACTION.
|
| referer
|
The URI of the web page you are posting from.
Required by BoA.
The variable is MV_PAYMENT_REFERER. |
| accept
|
Comma-separated return codes for which you consider a credit card acceptable.
Valid codes are:
| Code
|
Description
|
| 0
|
Order authorised. |
| 1
|
Some other failure.
Try again. |
| 2
|
Card Declined.
Do not accept the order. |
| 3
|
No response from issuing institution.
Try again. |
| 4
|
Bad card.
Do not accept the order.
Merchant should call shopper. |
| 5
|
Error in transfer amount. |
| 6
|
Credit card expired. |
| 7
|
Transaction is invalid. |
| 8
|
Unknown system error. |
| 9
|
Duplicate request.
This transaction was completed earlier. |
| >=10
|
Other error.
Contact you merchant bank representative. |
Default is to accept for return code <= 0.
"accept" codes are only valid on "authorize" transactions.
All others are only successful with a return code of 0.
For example:
|
Variable MV_PAYMENT_ACCEPT -1,0,1,3,8,10
|
|
| timeout_error
|
The error displayed if Bank of America is not responding, or is down.
The default is "Credit card processor not responding. Please try again later or call our customer service directly." The variable is MV_PAYMENT_TIMEOUT_ERROR. |
| username
|
User ID used to log in to the Back Office.
The variable is MV_PAYMENT_USERNAME.
This may not be needed for actual charges. |
| secret
|
Your BoA account password, supplied by BoA when you sign up.
The variable is MV_PAYMENT_SECRET.
This may not be needed for actual charges. |
| remap
|
This remaps the form variable names to the ones needed by BoA. |
Troubleshooting
Try the instructions above, then enable test mode in the online
account manager.
A test order should complete.
Disable test mode and then test in various BoA error modes
by using the credit card number "4222 2222 2222 2222".
Then try a sale with the card number "4111 1111 1111 1111" and a
valid expiration date.
The sale should be denied, and the reason should be in
[data session payment_error].
If nothing works:
Make sure you Required the module in
interchange.cfg:
|
Require module Vend::Payment::BoA
|
Make sure either Net::SSLeay, or Crypt::SSLeay and
LWP::UserAgent are installed and working.
You can test to see whether your Perl thinks they are:
|
perl -MNet::SSLeay -le 'print "Available"'
|
or
|
perl -MLWP::UserAgent -MCrypt::SSLeay -le 'print "Available"'
|
If either of the above prints "Available", and returns to the shell prompt,
then you should be OK (presuming they are in working order otherwise).
- Check the local and global error log files.
- Make sure you set your payment parameters properly.
Try an order, then put this code in a page:
<pre>
[calcn]
my $string = $Tag->uneval({ ref => $Session->{payment_result} });
$string =~ s/{/{\n/;
$string =~ s/,/,\n/g;
return $string;
[/calcn]
</pre>
|
That should show what happened.
- If all else fails, consultants are available to help with integration for a fee.
Notes
There is actually nothing in Vend::Payment::BoA;
This module changes its package name to Vend::Payment and
places things there.
Authors
Credits
Donations
Please contact us if you have
a HOWTO-style document,
or anything else you'd like to share with other Interchange users
and developers.
Go on - you know you want to.