Skip to content

Latest commit

 

History

History
76 lines (46 loc) · 1.65 KB

README.md

File metadata and controls

76 lines (46 loc) · 1.65 KB
  • Starts
  • Forks Total Downloads

laravelir/paymentable

A multi driver ir payment laravel package

Installation

  1. Run the command below to add this paymentable:
composer require laravelir/paymentable
  1. Open your config/app.php and add the following to the providers / aliases array:
Laravelir\Paymentable\Providers\PaymentableServiceProvider::class, // provider
'Cart' => Laravelir\Cart\Facade\Cart::class, // alias
  1. Run the command below to install the package:
php artisan paymentable:install

Drivers

Usage

$user = auth()->user;
$amount = 5000; // toman
$paymentResult = Paymentable::payment($user, $toman);

if($paymentResult->is_success()) {
    $transactionId = $paymentResult->transactionId();

    return $paymentResult->redirectToGateway();
}

// callback

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.