aliwebto / easy-payment
Laravel Payment Package For Iranian
v1.0.0
2023-07-29 16:09 UTC
Requires
- php: ^7.4|^8.0
- illuminate/support: ^8.0|^9.0|^10.0
Requires (Dev)
- laravel/pint: ^1.10
- orchestra/testbench: ^6.28
- pestphp/pest: ^1.23
- phpunit/phpunit: ^9.0
README
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
Installation
You can install the package via composer:
composer require aliwebto/easy-payment php artisan vendor:publish --provider="Aliwebto\EasyPayment\EasyPaymentServiceProvider" php artisan migrat // set your configs to config/easy-payment.php
Usage
// payable model - use Payable trait in your payable model Ex: invoice. use \Aliwebto\EasyPayment\Payable; // you have to make a payable model like invoice and relate it to users . then create invoice and pass to easy payment // create transaction and get data use Aliwebto\EasyPayment\EasyPayment $payable = \App\Models\Invoice::find(1); $amount = $payable->price; $description = "description of payment"; $easyPayments = EasyPayment::pay($payable,$amount,$description); return redirect($easyPayments["pay_url"]); // check transaction is paid use Aliwebto\EasyPayment\EasyPayment $payable = \App\Models\Product::find(1); $payable->isPaid(); // bool
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email aliwebto@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.