Business::PayPal::API::TransactionSearch(3pm)

Business::PayPal::API::TransactionSearch3pm

Paypal transactionsearch api

Usage

    use Business::PayPal::API::TransactionSearch;
    # see Business::PayPal::API documentation for parameters
    my $pp = Business::PayPal::API::TransactionSearch->new( ... );
    my $transactions = $pp->TransactionSearch(
        StartDate     => '1998-01-01T00:00:00Z',
        TransactionID => $transid,
    );
    my $received = $pp->TransactionSearch(
        StartDate        => '2015-11-13T00:00:00Z',
        EndDate          => '2015-11-13T00:00:00Z',
        Status           => 'Success',
        TransactionClass => 'Received',
    );

Version

version 0.77

Overview

Business::PayPal::API::TransactionSearch implements PayPal's TransactionSearch API using SOAP::Lite to make direct API calls to PayPal's SOAP API server. It also implements support for testing via PayPal's sandbox. Please see Business::PayPal::API for details on using the PayPal sandbox.

TransactionSearch

Implements PayPal's TransactionSearch API call. Supported parameters include:

  StartDate (required)
  EndDate
  Payer
  Receiver
  TransactionID
  PayerName
  AuctionItemNumber
  InvoiceID
  TransactionClass
  Amount
  CurrencyCode
  Status

as described in the PayPal "Web Services API Reference" document. The syntax for StartDate is:

  YYYY-MM-DDTHH:MM:SSZ

'T' and 'Z' are literal characters 'T' and 'Z' respectively, e.g.:

  2005-12-22T08:51:28Z

Returns a list reference containing up to 100 matching records (as per the PayPal Web Services API). Each record is a hash reference with the following fields:

  Timestamp
  Timezone
  Type
  Payer
  PayerDisplayName
  TransactionID
  Status
  GrossAmount
  FeeAmount
  NetAmount

Example:

    my $records = $pp->TransactionSearch(
        StartDate => '2006-03-21T22:29:55Z',
        InvoiceID => '599294993',
    );
    for my $rec ( @$records ) {
        print "Record:\n";
        print "TransactionID: " . $rec->{TransactionID} . "\n";
        print "Payer Email: " . $rec->{Payer} . "\n";
        print "Amount: " . $rec->{GrossAmount} . "\n\n";
    }

Error handling

See the ERROR HANDLING section of Business::PayPal::API for information on handling errors.

Export

None by default.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 6 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12–13