Guillaume Aubert

NAME

Business::CyberSource::Report - Factory class for modules that retrieve CyberSource's XML reports.

VERSION

Version 1.1.8

SYNOPSIS

        use Business::CyberSource::Report;
        use Business::CyberSource::Report::Test;

        # Generate a report factory.
        my $report_factory = Business::CyberSource::Report->new(
                merchant_id           => $merchant_id,
                username              => $username,
                password              => $password,
                use_production_system => $use_production_system,
        );

        # Use the factory to get a Business::CyberSource::Report::Test object with
        # the correct connection parameters.
        my $test_report = $report_factory->build( 'test' );

        # Retrieve a list of the report modules that have been loaded in memory,
        # either via "use" or a require by build()
        my $available_reports = $report_factory->list_loaded();

METHODS

new()

Create a new Business::CyberSource::Report factory object.

        my $report_factory = Business::CyberSource::Report->new(
                merchant_id           => $merchant_id,
                username              => $username,
                password              => $password,
                use_production_system => $use_production_system,
        );

Parameters:

  • merchant_id: a merchant ID provided by CyberSource.

  • username/password: login access information you can create in CyberSource's production Business Center. The access will be automatically available then in the test Business Center. Don't forget to give that user reporting permissions.

  • use_production_system: whether queries should be sent to the production system (1) or the test system (0). Off by default.

list_loaded()

Return a list of report modules that have been loaded, either via a "use" or dynamically when calling build().

        my $loaded_report_modules = $report_factory->list_loaded();

build()

Create a Business::CyberSource::Report::* object with the correct connection parameters.

        # Use the factory to get a Business::CyberSource::Report::Test object with
        # the correct connection parameters.
        my $test_report = $report_factory->build( 'SingleTransaction' );

Parameters:

  • The submodule name, such as SingleTransaction for Business::CyberSource::Report::SingleTransaction.

ACCESSORS

get_username()

Return the username to use to connect to the service.

        my $username = $report_factory->get_username();

get_password()

Return the password to use to connect to the service.

        my $password = $report_factory->get_password();

get_merchant_id()

Return the merchant ID to use to connect to the service.

        my $merchant_id = $report_factory->get_merchant_id();

use_production_system()

Return a boolean indicating whether the production system is used in queries. Otherwise, the Test Business Center is used.

        my $use_production_system = $report_factory->use_production_system();

BUGS

Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/Business-CyberSource-Report/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

        perldoc Business::CyberSource::Report

You can also look for information at:

AUTHOR

Guillaume Aubert, <aubertg at cpan.org>.

ACKNOWLEDGEMENTS

I originally developed this project for ThinkGeek (http://www.thinkgeek.com/). Thanks for allowing me to open-source it!

COPYRIGHT & LICENSE

Copyright 2011-2014 Guillaume Aubert.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/