Busine...Request(3pm)
π Business::PayPal::API::CaptureRequest β the vibe β¨
okay bestie, so this is Busine...Request(3pm) from the User Contributed Perl Documentation β yes the name is literally abbreviated with dots, that's just how Perl manpages roll, we don't question it π
. Anyway, buckle up, we're doing PayPal SOAP stuff together.
πΈ NAME πΈ
Business::PayPal::API::CaptureRequest β the PayPal CaptureRequest API, in Perl, for you, specifically π
β VERSION β
version 0.77 β that's the one, no cap.
β¨ SYNOPSIS β¨
here's the whole entrance, exactly as it goes down:
use Business::PayPal::API::CaptureRequest;
## see Business::PayPal::API documentation for parameters
my $pp = new Business::PayPal::API::DoCaptureRequest ( ... );
my %response = $pp->DoCaptureRequest( AuthorizationID => $transid,
CompleteType => 'Complete',
Amount => '13.00',
Note => "Give the fiddler his due." );
not me noticing the synopsis says new Business::PayPal::API::DoCaptureRequest while the package is Business::PayPal::API::CaptureRequest β I said what I said, I'm reporting it verbatim, that's literally my job π«Ά. Also "Give the fiddler his due." bestie that note is art.
π¦ DESCRIPTION π¦
Business::PayPal::API::DoCaptureRequest implements PayPal's CaptureRequest 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 details on how to use the PayPal sandbox, go peek at Business::PayPal::API (it's giving very much "read the other doc first, queen").
π CaptureRequest π
This one implements PayPal's CaptureRequest API call. The supported parameters include:
AuthorizationID
CompleteType (defaults to 'Complete' unless set to 'NotComplete')
Amount
currencyID (Currently must be the default, 'USD')
Note ("String, < 255 char, indicating information about the charges.")
all of that is as described in the PayPal "Web Services API Reference" document, periodt.
- the default
currencyIDsetting is'USD'if you don't say otherwise π΅ - the default
CompleteTypesetting is'Complete'if you don't say otherwise β
It returns a hash containing the results of the transaction. icon behavior honestly.
Example, so you can see the whole thing in the wild:
my %resp = $pp->DoCaptureRequest (
AuthorizationID => $auth_id,
CompleteType => 'NotComplete',
Amount => '15.00',
CurrencyID => 'USD',
);
if( $resp{Ack} eq 'Failure' ) {
for my $error ( @{$response{Errors}} ) {
warn "Error: " . $error->{LongMessage} . "\n";
}
}
lowkey obsessed with how this example sets CompleteType => 'NotComplete'. your girl contains multitudes π
π ERROR HANDLING π
Don't panic β just read the ERROR HANDLING section of Business::PayPal::API and it'll tell you everything you need on handling errors. it's the group chat we're all in for error lore π«Ά
π EXPORT π
None by default. That's it. Nothing gets exported unless you ask. it's giving "boundaries, we love her" β¨
π SEE ALSO π
- <https://developer.paypal.com/en_US/pdf/PP_APIReference.pdf> β the sacred text, go read it π
π AUTHORS π
the legends themselves:
- Scott Wiersdorf
<scott@perlcode.org> - Danny Hembree
<danny@dynamical.org> - Bradley M. Kuhn
<bkuhn@ebb.org>
π§ 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. fr fr, free as in go wild (within those terms, bestie).
okay and for the cute little sign-off, per the footer: this whole thing lives under perl v5.36.0, dated 2022-08-28, and that's the Busine...Request(3pm) tea. slay, hydrate, and always read your Business::PayPal::API docs first π
ππ¦
π¦ 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