Contents
1 - Introduction 2 - Installation into Laravel 3 - Taking a Payment as an Order using the Order Builder 4 - Retrieving, Authorizing & Capturing an Order 5 - Handling PayPal Webhooks 6 - Manually Interacting with PayPal WebhooksInstallation into Laravel
Published: May 25, 2024
Author: Andrew Arscott
This package can be installed via Composer. It currently supports up to Laravel 10, however, support for version 11 will be added soon.
To install the package, run the following command:
composer require drewdan/paypal
Next, publish the config file using the following command. The config file will be where you register your callbacks for the Webhook events.
php artisan vendor:publish --tag=drewdan-paypal-config
Now add the following variables into your env file, adding the correct values from your PayPal developer account:
PAYPAL_CLIENT_ID=
PAYPAL_SECRET=
PAYPAL_MODE=LIVE
You can change the mode from LIVE to SANDBOX so you can test the integration instead of running live transactions.