You can install the package via composer:
composer require myagmarsurensedjav/simple-paymentAnd run the following installer command
php artisan simple-payment:installYou can publish the config file with:
php artisan vendor:publish --tag="simple-payment-config"This is the contents of the published config file:
<?php
// config for MyagmarsurenSedjav/SimplePayment
return [
'default' => env('SIMPLE_PAYMENT_DEFAULT', 'qpay'),
'drivers' => [
'qpay' => [
'env' => env('QPAY_ENV', 'fake'),
'username' => env('QPAY_USERNAME'),
'password' => env('QPAY_PASSWORD'),
'invoice_code' => env('QPAY_INVOICE_CODE'),
],
'golomt' => [
'env' => env('GOLOMT_ENV', 'fake'),
'access_token' => env('GOLOMT_ACCESS_TOKEN'),
'hash_key' => env('GOLOMT_HASH_KEY'),
],
],
'user_model' => 'App\Models\User',
'notification_middleware' => [
// 'api'
],
'return_middlewares' => [
// 'web'
],
];Optionally, you can publish the views using
php artisan vendor:publish --tag="simple-payment-views"MyagmarsurenSedjav\SimplePayment\Contracts\Payable interface should be implemented by the model that will be paid.
use MyagmarsurenSedjav\SimplePayment\Facades\SimplePayment;
Route::get('/invoices/{invoice}/payment', function (Invoice $invoice) {
return SimplePayment::create($invoice);
});If you need specific driver, you can use driver method.
SimplePayment::driver('socialpay')->create($invoice);composer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.