NAME

Business::CyberSource::RequestFactory - CyberSource Request Factory Module

VERSION

version 0.004008

SYNOPSIS

        use Business::CyberSource::RequestFactory;

        my $factory = Business::CyberSource::RequestFactory->new;

        my $request_obj = $factory->create(
                'Authorization',
                {
                        reference_code => '42',
                        first_name     => 'Caleb',
                        last_name      => 'Cushing',
                        street         => 'somewhere',
                        city           => 'Houston',
                        state          => 'TX',
                        zip            => '77064',
                        country        => 'US',
                        email          => 'xenoterracide@gmail.com',
                        total          => 5.00,
                        currency       => 'USD',
                        credit_card    => '4111111111111111',
                        cc_exp_month   => '09',
                        cc_exp_year    => '2013',
                }
        );

DESCRIPTION

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.

METHODS

new

create

        $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::.

        my $req = $factory->create(
                        'Capture',
                        {
                                first_name => 'John',
                                last_name  => 'Smith',
                                ...
                        }
                );

SEE ALSO

BUGS

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.

AUTHOR

Caleb Cushing <xenoterracide@gmail.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2011 by Caleb Cushing.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)