Business::OnlinePayment::CyberSource::Client - CyberSource Client object for Business::OnlinePayment::CyberSource
version 3.000007
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".
this method performs a "Credit" transaction.
(For typical credits)
(For follow-on credits)
{ reference_code => 44544, service => { request_id => 1010101 }, # Generated by CyberSource purchase_totals => { total => 9000, currency => 'USD', }, }
This method performs a "Post Authorization" transaction.
This method performs a "Void" transaction
Please report any bugs or feature requests on the bugtracker website https://github.com/hgdev/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.
Jad Wauthier <Jadrien dot Wauthier at GMail dot com>
Caleb Cushing <xenoterracide@gmail.com>
Peter Bowen <peter@bowenfamily.org>
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.
To install Business::OnlinePayment::CyberSource, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::OnlinePayment::CyberSource
CPAN shell
perl -MCPAN -e shell install Business::OnlinePayment::CyberSource
For more information on module installation, please visit the detailed CPAN module installation guide.