This package adds a simple way to integrate PayPal payments into your Laravel application.
- A configured Laravel database connection
- PHP 8.2 or higher
- Laravel 10.0 or higher
composer require sytxlabs/laravel-paypal
php artisan vendor:publish --tag="sytxlabs-paypal-config"
the configuration file is located at config/paypal.php
php artisan vendor:publish --tag="sytxlabs-paypal-migrations"
php artisan migrate
use SytxLabs\PayPal\PayPalOrder;
$paypalOrder = new PayPalOrder();
$paypalOrder->addProduct(new Product('Product 1', 10.00, 1));
$paypalOrder->createOrder();
$paypalOrder->approveOrderRedirect();
or get the approval link
$paypalOrder->getApprovalLink();
$paypalOrder->captureOrder();
$paypalOrder->captureOrder()->getOrderStatus();
The MIT License (MIT). Please see License File for more information.