Business::CyberSource::Factory::Request - CyberSource Request Factory Module
version 0.006010
use Business::CyberSource::Factory::Request; use Business::CyberSource::CreditCard; my $factory = Business::CyberSource::Factory::Request->new; my $credit_card = Business::CyberSource::CreditCard->new({ account_number => '411111111111111', expiration => { month => '05', year => '2012' } }); my $request_obj = $factory->create( 'Authorization', { reference_code => '42', bill_to => { first_name => 'Caleb', last_name => 'Cushing', street => '100 somewhere st', city => 'Houston', state => 'TX', postal_code => '77064', country => 'US', email => 'xenoterracide@gmail.com', }, purchase_totals => { currency => 'USD', total => 5.00, }, card => { account_number => '4111111111111111', expiration => { month => 9, year => 2025, }, }, } );
This Module is to provide a replacement for what Business::CyberSource::Request originally was, a factory. Once backwards compatibility is no longer needed this code may be removed.
$factory->create( $implementation, { ... } )
Create a new request object. create takes a request implementation and a hashref to pass to the implementation's new method. The implementation string accepts any implementation whose package name is prefixed by Business::CyberSource::Request::.
create
new
Business::CyberSource::Request::
my $req = $factory->create( 'Capture', { first_name => 'John', last_name => 'Smith', ... } );
MooseX::AbstractFactory
Please report any bugs or feature requests on the bugtracker website https://github.com/xenoterracide/Business-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.
Caleb Cushing <xenoterracide@gmail.com>
This software is Copyright (c) 2012 by HostGator.com.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Business::CyberSource, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::CyberSource
CPAN shell
perl -MCPAN -e shell install Business::CyberSource
For more information on module installation, please visit the detailed CPAN module installation guide.