Busine...Request(3pm)
π³ Busine...Request(3pm) β aka Business::PayPal::API::AuthorizationRequest
okay bestie, listen up, we're in the User Contributed Perl Documentation section and this little gem is called Business::PayPal::API::AuthorizationRequest. It's giving "I take your money and I do it over SOAP" energy and honestly? iconic. π
β¨ NAME β¨
Business::PayPal::API::AuthorizationRequest β the PayPal AuthorizationRequest API, but make it Perl. π«Ά
π VERSION π
version 0.77 β yes she's got a number, yes she's proud of it. π
πΈ SYNOPSIS πΈ
here's the vibe, copy-paste ready, no cap:
use Business::PayPal::API::AuthorizationRequest;
## see Business::PayPal::API documentation for parameters
my $pp = new Business::PayPal::API::DoAuthorizationRequest ( ... );
my %response = $pp->DoAuthorizationRequest (
TransactionID => $transid,
CurrencyID => $currencyID,
Amount => $amout,
);
β οΈ note: that's$amoutup there, not$amount. That's literally what the original says. Not me mis-typing, not you mis-reading. We respect the source in this house. π
π¦ DESCRIPTION π¦
So Business::PayPal::API::AuthorizationRequest implements PayPal's AuthorizationRequest API, and the way it does that is by using SOAP::Lite to make direct API calls to PayPal's SOAP API server. Direct. No middleman. Main character energy fr fr. π₯
It also implements support for testing via PayPal's sandbox (yes bestie, you can rehearse the whole thing before you go live, we love a rehearsal). Please see Business::PayPal::API for details on using the PayPal sandbox. π§
BIG IMPORTANT ONE: this request is only used with"Order"type Authorizations. An"Order"must first be placed using the ExpressCheckout module. DirectPayment authorizations can only be used for"Basic"authorizations. No mixing and matching, periodt. π
π AuthorizationRequest
This here implements PayPal's AuthorizationRequest API call. The supported parameters include:
TransactionID
Amount
currencyID (defaults to 'USD' if not supplied)
...as described in the PayPal "Web Services API Reference" document. And just so it's crystal clear: the default currencyID setting is 'USD' if not otherwise specified. π΅
It returns a hash containing the results of the transaction. That's the good stuff. π
Example time, look at her go:
my %resp = $pp->DoAuthorizationRequest (
TransactionID => $trans_id,
Amount => '15.00',
);
unless( $resp{Ack} ne 'Success' ) {
for my $error ( @{$response{Errors}} ) {
warn "Error: " . $error->{LongMessage} . "\n";
}
}
π ERROR HANDLING
See the ERROR HANDLING section of Business::PayPal::API for information on handling errors. She's not gonna repeat herself, go read the other page bestie. π«Ά
π EXPORT
None by default. Nada. Zero. Nothing gets exported unless you ask. π
β SEE ALSO β
- <https://developer.paypal.com/en_US/pdf/PP_APIReference.pdf> β the sacred texts, go read them π
π AUTHORS π
The legends who built her:
- Scott Wiersdorf
<scott@perlcode.org> - Danny Hembree
<danny@dynamical.org> - Bradley M. Kuhn
<bkuhn@ebb.org>
three icons, one module. we stan. π
π COPYRIGHT AND LICENSE π
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. Free as in freedom, slay. ποΈ
and that's the whole page bestie β¨ β brought to you by perl v5.36.0, dated 2022-08-28, filed under Busine...Request(3pm) because apparently even man pages get truncated names. she's mysterious like that. mwah ππ
π¦ where this page comes from
- ubuntu noble: libbusiness-paypal-api-perl 0.77-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbusiness-paypal-api-perl 0.77-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbusiness-paypal-api-perl 0.77-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms