Busine...Request(3pm)

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

πŸ’– 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 currencyID setting is 'USD' if you don't say otherwise πŸ’΅
  • the default CompleteType setting 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 🌈


πŸ‘‘ AUTHORS πŸ‘‘

the legends themselves:

  • 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.

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