
Business::OnlinePayment::CyberSource::Client - CyberSource Client object for Business::OnlinePayment::CyberSource

version 3.000011

use 5.010;
use Business::OnlinePayment::CyberSource::Client;
my $client = Business::OnlinePayment::CyberSource::Client->new();
my $data = {
invoice_number => 12345678,
purchase_totals => {
currency => 'USD',
total => 9000,
},
bill_to => {
first_name => 'Tofu',
last_name => 'Beast',
street1 => '123 Anystreet',
city => 'Anywhere',
state => 'UT',
postal_code => '84058',
country => 'US',
email => 'tofu@beast.org',
},
card => {
account_number => '4111111111111111',
expiration => { month => 12, year => 2012 },
security_code => 1111,
},
};
$client->authorize( $data );
if ( $client->is_success() ) {
say "Transaction succeeded!";
}

Business::OnlinePayment::CyberSource::Client is a wrapper for the Business::CyberSource::Client. It provides a translation layer between the Business::OnlinePayment API and the Business::CyberSource API. While the input parameters and method names follow the conventions Business::CyberSource API, the attribute names follow the Business::OnlinePayment API.

use to determine whether or not the transaction succeeded
The authorization code supplied upon a successful authorization
This is the CyberSource-generated transaction identifier. It should be used to identify subsequent transactions to authorizations.
$client->capture( { ... service => { request_id => $client->order_number() }, ... } );
this is currently not supported.
This is currently not supported
This is currently not supported.
The HTTP response code
A hash of the HTTP response headers
The HTTP response content
The processor response value
The code returned for the Address Verification Service
The CVV2 code value
This is the type value supplied to the content method of Business::OnlinePayment::CyberSource
The CyberSource account username
The CyberSource account API key
Boolean value determining whether transactions should be sent as test transactions or not.
This method should be called after construction but before transactions are performed, unless it is supplied to the constructor.
Boolean determining whether or not address verification should be done
This holds the value of the CyberSource server to which requests are being made.
This holds the port number on which the remote server is communicating.
This holds the path component of the remote service URI.

This method should be used to perform an "Authorization Only" transaction.
Parameters:
{
reference_code => 44544,
bill_to => {
first_name => 'John",
last_name => 'Doe',
email => 'john.doe@example.com',
street1 => '101 Main Street',
city => 'Friendship',
state => 'AR',
zip => 12345,
country => 'US',
},
purchase_totals => {
total => 9000,
currency => 'USD',
},
}
Returns:
1 on success and 0 otherwise
This method performs the "Normal Authorization" transaction. It combines "Authorization Only" and "Post Authorization".
Parameters:
{
reference_code => 44544,
bill_to => {
first_name => 'John",
last_name => 'Doe',
email => 'john.doe@example.com',
street1 => '101 Main Street',
city => 'Friendship',
state => 'AR',
zip => 12345,
country => 'US',
},
purchase_totals => {
total => 9000,
currency => 'USD',
},
}
Returns:
1 on success and 0 otherwise
this method performs a "Credit" transaction.
Parameters:
(For typical credits)
{ reference_code => 44544, bill_to => { first_name => 'John", last_name => 'Doe', email => 'john.doe@example.com', street1 => '101 Main Street', city => 'Friendship', state => 'AR', zip => 12345, country => 'US', }, purchase_totals => { total => 9000, currency => 'USD', }, }
(For follow-on credits)
{ reference_code => 44544, service => { request_id => 1010101 }, # Generated by CyberSource purchase_totals => { total => 9000, currency => 'USD', }, }
Returns:
1 on success and 0 otherwise
This method performs a "Post Authorization" transaction.
Parameters:
{ reference_code => 44544, service => { request_id => 1010101 }, # Generated by CyberSource purchase_totals => { total => 9000, currency => 'USD', }, }
Returns:
1 on success and 0 otherwise
This method performs a "Void" transaction
Parameters:
{ reference_code => 44544, service => { request_id => 1010101 }, # Generated by CyberSource purchase_totals => { total => 9000, currency => 'USD', }, }
Returns:
1 on success and 0 otherwise

Please report any bugs or feature requests on the bugtracker website https://github.com/hostgator/Business-OnlinePayment-CyberSource/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.


This software is copyright (c) 2012 by HostGator.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.