The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Business::PayPal::SDK - An interface to paypals SDK's.

SYNOPSIS

  use Business::PayPal::SDK;
  my $pp = new Business::PayPal::SDK(
    {
      paypal_apiid => "sdk-seller_api1.sdk.com",
      paypal_apipw => "12345678",
      paypal_cert => "paypal_java_sdk/samples/Cert/sdk-seller.p12",
      paypal_certpw => "password",
      paypal_env => "sandbox",
      java_sdk_dir => "/path/to/paypals/java/sdk",
    }
  );

  my $res = $pp->SetExpressCheckout(
    {
      OrderTotal => '10.00',
      ReturnURL => 'http:://mydomain.com/myreturn',
      CancelURL => 'http:://mydomain.com/mycancel',
    }
  );

  print $res->{token};

DESCRIPTION

Business::PayPal::SDK is a perl interface to the SDK provided by paypal (http://www.paypal.com/sdk). You can use this module to implement paypal pro and paypal express transactions in perl. On the back end this modules uses Inline::Java to interface directly with the paypals java sdk. Consequently you will need to get a J2SDK and Inline::Java installed. This was done for 2 reasons. 1) Speed of development, didnt have to deal with all the SOAP stuff. 2) Easier maintanance regarding future changes. That is to say, I only have to make sure I keep this compatiable with paypals SDK, not thier underlying protocol changes.

All methods take a single hashref as an argument. All methods return a hashref, or undef if there is a failure. Check $obj->error for description of failure.

Public Methods

$resp = DoExpressCheckoutPayment({ arg => value, args => value })

$resp = GetExpressCheckoutDetails({ args => value, args => value })

$resp = SetExpressCheckout({ args => value, args => value })

$resp = DoDirectPayment({ args => value, args => value })

NOTES

This modules is currently in development, not all methods in the paypal SDK are implemented yet.

BUGS

Non that I am aware of yet. :) Please email if you find any.

AUTHOR

Jacob Boswell <jacob@s56.net>

Also thanks to Rob Brown for assistance.

COPYRIGHT

Business::PayPal::SDK is Copyright(c) 2005 Jacob Boswell. All rights reserved You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.