NAME
Business::OnlinePayment::Vanco - Vanco Services backend for Business::OnlinePayment
SYNOPSIS
use Business::OnlinePayment;
####
# One step transaction, the simple case.
####
my $tx = new Business::OnlinePayment( "Vanco",
ClientID => 'CL1234',
ProductID => 'EFT',
);
$tx->content(
type => 'VISA',
login => 'testdrive',
password => '', #password
action => 'Normal Authorization',
description => 'Business::OnlinePayment test',
amount => '49.95',
customer_id => 'tfb',
name => 'Tofu Beast',
address => '123 Anystreet',
city => 'Anywhere',
state => 'UT',
zip => '84058',
card_number => '4007000000027',
expiration => '09/02',
cvv2 => '1234', #optional
);
$tx->submit();
if($tx->is_success()) {
print "Card processed successfully: ".$tx->authorization."\n";
} else {
print "Card was rejected: ".$tx->error_message."\n";
}
####
# One step subscription, the simple case.
####
my $tx = new Business::OnlinePayment( "Vanco",
ClientID => 'CL1234',
ProductID => 'EFT',
);
$tx->content(
type => 'CC',
login => 'testdrive',
password => 'testpass',
action => 'Recurring Authorization',
interval => '7 days',
start => '2008-3-10',
periods => '16',
amount => '99.95',
description => 'Business::OnlinePayment test',
customer_id => 'vip',
name => 'Tofu Beast',
address => '123 Anystreet',
city => 'Anywhere',
state => 'GA',
zip => '84058',
card_number => '4111111111111111',
expiration => '09/02',
);
$tx->submit();
if($tx->is_success()) {
print "Card processed successfully: ".$tx->order_number."\n";
} else {
print "Card was rejected: ".$tx->error_message."\n";
}
my $subscription = $tx->order_number
####
# Subscription cancellation. It happens.
####
$tx->content(
subscription => '99W2D',
login => 'testdrive',
password => 'testpass',
action => 'Cancel Recurring Authorization',
);
$tx->submit();
if($tx->is_success()) {
print "Cancellation processed successfully."\n";
} else {
print "Cancellation was rejected: ".$tx->error_message."\n";
}
SUPPORTED TRANSACTION TYPES
CC, Visa, MasterCard, American Express, Discover
Content required: type, login, password, action, amount, name, card_number, expiration.
Check
Content required: type, login, password, action, amount, name, account_number, routing_code, account_type.
Subscriptions
Additional content required: interval, start, periods.
DESCRIPTION
For detailed information see Business::OnlinePayment.
METHODS AND FUNCTIONS
See Business::OnlinePayment for the complete list. The following methods either override the methods in Business::OnlinePayment or provide additional functions.
result_code
Returns the response error code.
error_message
Returns the response error description text.
server_response
Returns the complete response from the server.
Handling of content(%content) data:
action
The following actions are valid
normal authorization
recurring authorization
cancel recurring authorization
interval
Interval contains a number of digits, whitespace, and the units of days or months in either singular or plural form.
Setting Vanco parameters from content(%content)
The following rules are applied to map data to AuthorizeNet ARB parameters from content(%content):
# param => $content{<key>}
Auth
UserId => 'login',
Password => 'password',
Request
RequestVars
CustomerID => 'customer_id',
CustomerName => 'ship_name',
CustomerAddress1 => 'ship_address',
CustomerCity => 'ship_city',
CustomerState => 'ship_state',
CustomerZip => 'ship_zip',
CustomerPhone => 'phone',
AccountType => 'account_type', # C, S, or CC
AccountNumber => 'account_number' # or card_number
RoutingNumber => 'routing_code',
CardBillingName => 'name',
CardExpMonth => \( $month ), # YYYY-MM from 'expiration'
CardExpYear => \( $year ), # YYYY-MM from 'expiration'
CardCVV2 => 'cvv2',
CardBillingAddr1 => 'address',
CardBillingCity => 'city',
CardBillingState => 'state',
CardBillingZip => 'zip',
Amount => 'amount',
StartDate => 'start',
EndDate => calculated_from start, periods, interval,
FrequencyCode => [O,M,W,BW,Q, or A determined from interval],
TransactionTypeCode => 'check_type', # (or PPD by default)
NOTE
To cancel a recurring authorization transaction, submit the TransactionRef in the field "subscription" with the action set to "Cancel Recurring Authorization". You can get the TransactionRef from the authorization by calling the order_number method on the object returned from the authorization.
COMPATIBILITY
Business::OnlinePayment::Vanco uses Vanco Services' "Standard Web Services XML API" as described on February 29, 2008. The describing documents are protected by a non-disclosure agreement.
See http://www.vancoservices.com/ for more information.
AUTHOR
Jeff Finucane, vanco@weasellips.com
SEE ALSO
perl(1). Business::OnlinePayment.