openbuildings / paypal
PayPal SDK for ExpressCheckout and AdaptivePayments. Supports recurring payments, simple payments, parallel payments and chained payments.
Installs: 173 941
Dependents: 0
Suggesters: 0
Security: 0
Stars: 29
Watchers: 16
Forks: 24
Open Issues: 5
Requires
- php: ^7.1
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2024-11-11 22:10:49 UTC
README
PayPal SDK for ExpressCheckout and Adaptive Payments.
Features:
- recurring payments
- simple payments
- parallel payments
- chained payments
Installation
You could use this library in your project by running:
php composer.phar install
Usage
Here is a simple usage example performing a payment with ExpressCheckout:
// Get a Payment instance using the ExpressCheckout driver $payment = OpenBuildings\PayPal\Payment::instance('ExpressCheckout'); // Set the order $payment->order(array( 'items_price' => 10, 'shipping_price' => 3, 'total_price' => 13 )); // Set additional params needed for ExpressCheckout $payment->return_url('example.com/success'); $payment->cancel_url('example.com/success'); // Send a SetExpressCheckout API call $response = $payment->set_express_checkout(); // Finish the payment with the token and the payer id received. $payment->do_express_checkout_payment($response['TOKEN'], $response['PAYERID']);
Documentation
Contributing
Read the Contribution guidelines.
License
Licensed under BSD-3-Clause open-source license.