The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Business::CyberSource::Report::SingleTransaction - Interface to CyberSource's Single Transaction report.

VERSION

Version 1.2.0

SYNOPSIS

This module is an interface to the Single Transaction report from CyberSource.

        use Business::CyberSource::Report;

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

        # Build a Business::CyberSource::Report::SingleTransaction object.
        my $single_transaction_report = $report_factory->build( 'SingleTransaction' );

        # Retrieve a Single Transaction report by Request ID.
        $single_transaction_report->retrieve(
                request_id              => $request_id,
                include_extended_detail => $include_extended_detail,
                version                 => $version,
        );

        # Retrieve a Single Transaction report using a combination of merchant
        # reference number and
        $single_transaction_report->retrieve(
                merchant_reference_number => $merchant_reference_number,
                target_date               => $target_date,
                include_extended_detail   => $include_extended_detail,
                version                   => $version,
        );

METHODS

retrieve()

Build and send the request to CyberSource.

        # Retrieve a Single Transaction report by Request ID.
        $single_transaction_report->retrieve(
                request_id              => $request_id,
                include_extended_detail => $include_extended_detail,
                version                 => $version,
        );

        # Retrieve a Single Transaction report using a combination of merchant
        # reference number and target date.
        $single_transaction_report->retrieve(
                merchant_reference_number => $merchant_reference_number,
                target_date               => $target_date,
                include_extended_detail   => $include_extended_detail,
                version                   => $version,
        );

Parameters:

  • request_id (mandatory, if no merchant_reference_number/target_date)

    A request ID from CyberSource.

  • merchant_reference_number/target_date (mandatory, if no request_id)

    The reference number you sent with the original transaction. This is not a number generated by CyberSource. This must be used in conjunction with a target date, with the format YYYYMMDD.

  • include_extended_detail (optional)

    Can be set to 'Predecessor' or 'Related' to retrieve more information about the transactions found.

  • version (default: 1.7)

    CyberSource offers multiple versions of the resulting XML. Available versions are 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7.

    See http://apps.cybersource.com/library/documentation/dev_guides/Reporting_Developers_Guide/html/downloading.htm#downloading_10837_1027265 for more details about the differences.

  • user_agent (optional)

    By default, LWP::UserAgent. This is useful for tests, see the documentation for Test::LWP::UserAgent in particular.

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::SingleTransaction

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-2017 Guillaume Aubert.

This code is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.

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 LICENSE file for more details.