Busine...assPay(3pm)

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

πŸ’– Busine...assPay(3pm) β€” the User Contributed Perl Documentation moment

okay bestie, so this is Business::PayPal::API::MassPay, and it's giving payroll day but make it SOAP. Let me tell you everything, no gatekeeping πŸ’…


✨ NAME ✨

Business::PayPal::API::MassPay β€” the PayPal MassPay API, wrapped up cute for you πŸŽ€


🌸 VERSION 🌸

version 0.77


πŸ¦‹ SYNOPSIS πŸ¦‹

use Business::PayPal::API::MassPay;

## see Business::PayPal::API documentation for parameters
my $pp = Business::PayPal::API::MassPay->new( ... );

my %response = $pp->MassPay(
    EmailSubject => "Here's your moola",
    MassPayItems => [
        {   ReceiverEmail => 'joe@somewhere.tld',
            Amount        => '95.44',
            Note          => 'Thanks for your stuff!'
        },
        {   ReceiverEmail => 'bob@elsewhere.tld',
            Amount        => '15.31',
            Note          => 'We owe you one'
        },
    ]
);

like, that's it. that's the whole vibe. you make the object, you tell it who gets the bag, and you send it. periodt πŸ’Έ


🌈 DESCRIPTION 🌈

Business::PayPal::API::MassPay implements PayPal's Mass Pay 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. (yes queen, sandbox testing, we love a safe little practice arena 🧚)

Please see Business::PayPal::API for details on using the PayPal sandbox β€” that's where the tea on sandbox setup lives, iykyk.

πŸ’œ MassPay πŸ’œ

Implements PayPal's Mass Pay API call. The supported parameters include:

EmailSubject
MassPayItems

The MassPayItem parameter is a list reference of hashrefs, and each one of those hashrefs contains the following fields:

ReceiverEmail
Amount
UniqueId
Note

as described in the PayPal "Web Services API Reference" document. (that's where you go if you want the canonical lore πŸ“–)

Returns a hash containing the generic response structure (as per the PayPal Web Services API).

Example:

my %resp = $pp->MassPay( EmailSubject => "This is the subject",
                         MassPayItems => [ { ReceiverEmail => 'joe@test.tld',
                                             Amount => '24.00',
                                             UniqueId => "123456",
                                             Note => "Enjoy the money. Don't spend it all in one place." } ] );

unless( $resp{Ack} !~ /Success/ ) {
  die "Failed: " . $resp{Errors}[0]{LongMessage} . "\n";
}

okay but notice how it checks $resp{Ack} against /Success/ before celebrating β€” that's the responsible main character move 🫢

😭 ERROR HANDLING 😭

See the ERROR HANDLING section of Business::PayPal::API for information on handling errors. like, don't just sit there when it breaks, bestie, go read that section.


⭐ EXPORT ⭐

None by default. (she's lowkey, she doesn't push anything into your namespace without being asked 🌸)


πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

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

three absolute icons, fr fr πŸ’–


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

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

so yeah, it's free, go forth and redistribute, just keep the same terms as Perl 5 itself πŸ’…


πŸ’€ reminder bestie: the whole thing lives in the User Contributed Perl Documentation section of the manual, which is perl v5.36.0, dated 2022-08-28, and its manual page name is Busine...assPay(3pm) β€” you're welcome, mwah 🫢✨
πŸ“¦ where this page comes from