Business::PayPal::SDK is 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};
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.
This document assumes you have an understanding of the java SDK and API provided by PayPal.
All methods take a single hashref as an argument. All methods return a hashref, or undef if there is an internal failure of some sort. Check $ret->{ack} to see if the call to PayPal was successful. If $ret->{ack} is not 'Success' than you can check the $res->{ErrorCodes}, this will be an hashref with the key being the error code from paypal and the value is the 'getLongMessage' from the error. Check $obj->error for description of failure.
Product's homepage
Requirements:
· Perl