digitwires / payway
Payment Helper of Payment Gateways
Requires
- php: ^8.1
- ext-http: *
- guzzlehttp/guzzle: ^7.5.0
- laravel/framework: 10.*
README
A simple Laravel implementation for all payment providers.
Installation
You can install the package via composer:
composer require digitwires/payway
This is the contents of the published config file:
php artisan vendor:publish --tag="payway-config"
This is the contents of the published lang file:
php artisan vendor:publish --tag="payway-lang"
List of contents
List of available providers
You can navigate to the Payment Providers Docs file to see their examples or click on the links below.
Usage
Pay Invoices
The following example shows how to use the package with any payment provider.
$payway = new PaypalGateway(); // OR any available payment class $payway->initPayment([ 'amount' => 100, 'user_id' => '111', 'user_first_name' => 'John', 'user_last_name' => 'Doe', 'user_email' => 'john@example.com', 'user_phone' => '+11234567890', 'source' => 'website', 'currency' => 'USD', ]);
Verify Payments
The following example shows how to verify payments with any payment provider.
$payway = new PaypalGateway(); // OR any available payment class $payway->verifyPayment($request)
Available Providers
use Digitwires\Payway\Classes\PaypalGateway; use Digitwires\Payway\Classes\PaytabsGateway; use Digitwires\Payway\Classes\PaymobGateway;
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
If you discover a security vulnerability within this package, please email ahmed_noreldin@outlook.com
Credits
License
The MIT License (MIT). Please see License File for more information.