Download the PHP package brightcweb/paypal without Composer
On this page you can find all versions of the php package brightcweb/paypal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download brightcweb/paypal
More information about brightcweb/paypal
Files in brightcweb/paypal
Package paypal
Short Description A professional PayPal integration package for Laravel applications, suitable for any Laravel application, such as NGO'S, e-commerces and more
License MIT
Informations about the package paypal
BrightCWeb PayPal Integration Package
Brightcweb/Paypal is a Laravel package that simplifies PayPal integration for your e-commerce system or donation platform. With this package, you can handle payments efficiently while maintaining the flexibility to customize routes, views, and authentication requirements.
Features
- Seamless PayPal checkout integration.
- Customizable success and cancellation routes.
- Records all payment transactions in the
Brightcwebpayment
table. - Optionally enforce user authentication before checkout.
- Pre-built, modifiable views for success and cancellation pages.
Installation
Install the package via Composer:
Publish the package configuration assets:
Run the migrations to create the Brightcwebpayment
table:
Add the following entries to your .env
file:
Clear and cache the configuration:
Usage
Controller Setup
- In your controller, import the PayPal class and inject it into the constructor:
Checkout Endpoint
Create a route and controller method for initiating the checkout process. Example:
Define the route in web.php
:
Success and Cancel Routes
Add routes for handling successful and canceled payments:
Define these routes in web.php
:
Add these routes in your .env
file:
Views Customization
The package includes default views for success and cancellation located in vendor/brightcwebpaypal
. Feel free to modify or rename them according to your needs.
Authentication
This package allows you to decide whether users should be authenticated before proceeding with checkout or not. You can customize your middleware as needed.
Key Features
Payment Recording
Every successful payment is recorded in the Brightcwebpayment
table for easy tracking.
Optional Authentication
You have full control over whether users need to be authenticated before initiating a checkout or not. This package works perfectly without authentication, which is useful in scenarios where registration is not required for checkout.
Clearing and Caching Configuration
Whenever you make changes to your .env
file or configuration, remember to run the following commands:
Notes
- Ensure that your PayPal credentials in the
.env
file are correct. - Ensure that
PAYPAL_SUCCESS_ROUTE
andPAYPAL_CANCELLED_ROUTE
are correctly set in your.env
file. - Always test your integration in PayPal's sandbox environment before going live.
- Use
php artisan optimize:clear
if you encounter any cache-related issues.
Support
For support, please send us an email at: chikanwazuo@gmail.com
License
This package is open-sourced software licensed under the MIT license.
Contributing
We welcome contributions to enhance this package. Please contact us at chikanwazuo@gmail.com for any inquiries or contributions.
Conclusion
The Brightcweb PayPal Package is an excellent tool for integrating a payment gateway into your Laravel application, suitable for any project requiring PayPal payment integration.