Busine...Search(3pm)

πŸ“¦
version 0.77 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Business::PayPal::API::TransactionSearch β€” the whole vibe πŸ’–

okay bestie, pull up a chair 🫢 this is a perl manual page from the User Contributed Perl Documentation collection, section 3pm, and it's all about the Business::PayPal::API::TransactionSearch module β€” aka the PayPal TransactionSearch API. yes. THAT one. let's go ✨


✨ VERSION ✨

we're on version 0.77, babes. iconic. πŸ’…


🌸 SYNOPSIS 🌸

here's the whole flex, copy it exactly, no typos bestie:

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',
);

literally the blueprint. πŸ™ˆ


πŸ¦‹ DESCRIPTION πŸ¦‹

so. 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 🧚. for the deets on how to use that sandbox, go peek at Business::PayPal::API β€” that's where all the tea is.


πŸ’œ TransactionSearch πŸ’œ

this one implements PayPal's TransactionSearch API call. the supported parameters include:

  • StartDate (required, no skips bestie)
  • EndDate
  • Payer
  • Receiver
  • TransactionID
  • PayerName
  • AuctionItemNumber
  • InvoiceID
  • TransactionClass
  • Amount
  • CurrencyCode
  • Status

all of those are as described in the PayPal "Web Services API Reference" document. iykyk πŸ“–

the syntax for StartDate is:

YYYY-MM-DDTHH:MM:SSZ

and okay important: 'T' and 'Z' are literal characters 'T' and 'Z' respectively 🌈. like, actually the letter T and the letter Z. no cap. for example:

2005-12-22T08:51:28Z

it 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 🌟

here's the moment you've been waiting for:

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";
}

look at her go πŸŽ€


😭 ERROR HANDLING 😭

when things go sideways (and sometimes they do, bestie, we don't gatekeep), go read the ERROR HANDLING section of Business::PayPal::API β€” that's where the info on handling errors lives. 🫢


πŸ™ˆ EXPORT πŸ™ˆ

None by default. nothing exported, she's lowkey and self-contained. that's the whole section. periodt. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


🌈 AUTHORS 🌈

these absolute legends built this thing, show some respect:

  • Scott Wiersdorf <scott@perlcode.org>
  • Danny Hembree <danny@dynamical.org>
  • Bradley M. Kuhn <bkuhn@ebb.org>

this software is copyright (c) 2006-2017 by Scott Wiersdorf, Danny Hembree, Bradley M. Kuhn.

and it's free software β€” you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay. 🫢


lowkey a whole mood. go forth and search those transactions, bestie. 🌸

and that's the page πŸ’– this beauty comes to you via perl v5.36.0, dated 2022-08-28, and yeah β€” that's the Busine...Search(3pm) footer energy, shortened title and all. mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from