NAME
Business::OnlinePayment::Vindicia::Select - Backend for Business::OnlinePayment
SYNOPSIS
This is a plugin for the Business::OnlinePayment interface. Please refer to that documentation for general usage.
use Business::OnlinePayment;
my $tx = Business::OnlinePayment->new(
"Vindicia::Select",
default_Origin => 'NEW', # or RECURRING
);
$tx->content(
type => 'CC',
login => 'testdrive',
password => '123qwe',
action => 'billTransactions',
description => 'FOO*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
invoice_number => '54123',
vindicia_nvp => {
custom => 'data',
goes => 'here',
},
);
$tx->submit();
DESCRIPTION
Used via Business::OnlinePayment for processing payments through the Vindicia processor.
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. Will be empty if no code is returned, or if multiple codes can exist.
error_message
Returns the response error description text. Will be empty if no code error is returned, or if multiple errors can exist.
server_request
Returns the complete request that was sent to the server. The request has been stripped of card_num, cvv2, and password. So it should be safe to log.
server_request_dangerous
Returns the complete request that was sent to the server. This could contain data that is NOT SAFE to log. It should only be used in a test environment, or in a PCI compliant manner.
server_response
Returns the complete response from the server. The response has been stripped of card_num, cvv2, and password. So it should be safe to log.
server_response_dangerous
Returns the complete response from the server. This could contain data that is NOT SAFE to log. It should only be used in a test environment, or in a PCI compliant manner.
Handling of content(%content) data:
action
The following actions are valid
normal authorization
authorization only
post authorization
credit
void
auth reversal
TESTING
The test suite runs using mocked data results. All tests are run using MOCKED return values. If you wish to run REAL tests then add these ENV variables.
export PERL_BUSINESS_VINDICIA_USERNAME=your_test_user
export PERL_BUSINESS_VINDICIA_PASSWORD=your_test_password
If you would like to create your own tests, or mock your own responses you can do the following
use Business::OnlinePayment;
my $tx = Business::OnlinePayment->new(
"Vindicia::Select",
default_Origin => 'NEW', # or RECURRING
);
push @{$client->{'mocked'}}, {
action => 'billTransactions', # must match the action you call, or the script will die
login => 'mocked', # must match the login credentials used, or the script will die
resp => 'ok_duplicate', # or you can return a HASH of the actual data you want to mock
};
FUNCTIONS
_info
Return the introspection hash for BOP 3.x
set_defaults
Used by BOP to set default values during "new"
test_transaction
Get/set the server used for processing transactions. Possible values are Live, Certification, and Sandbox Default: Live
#Live
$self->test_transaction(0);
#Test
$self->test_transaction(1);
#Read current value
$val = $self->test_transaction();
submit
Do a Business::OnlinePayment style action on Vindicia
billTransactions
Send a batch of transactions to Vindicia for collection
is_success means the call was successful, it does NOT mean all of your transactions were accepted In order to verify your transaction you need to look at result->{'response'} for an ARRAY of potential errors, if no errors exist the result will not have a response array
fetchBillingResults
Lookup changes in a time period
$tx->content(
login => 'testdrive',
password => '123qwe',
action => 'fetchBillingResults',
start_timestamp => '2012-09-11T21:34:32.265Z',
end_timestamp => '2012-09-11T22:34:32.265Z',
page => '0', # optional, defaults to zero
page_size => '100', # optional, defaults to 100
);
my $response = $tx->submit();
fetchByMerchantTransactionId
Lookup a specific transaction in Vindicia
$tx->content(
login => 'testdrive',
password => '123qwe',
action => 'fetchByMerchantTransactionId',
invoice_number => 'abc123',
);
my $response = $tx->submit();
refundTransactions
Cancel or refund (sadly you can't choose one) a transaction.
$tx->content(
login => 'testdrive',
password => '123qwe',
action => 'refundTransactions',
invoice_number => 'abc123',
);
my $response = $tx->submit();