aliwebto/easy-payment

Laravel Payment Package For Iranian

v1.0.0 2023-07-29 16:09 UTC

This package is auto-updated.

Last update: 2024-10-29 19:13:27 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

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.