https://github.com/lee-to/laravel-cashbox
https://github.com/lee-to/laravel-cashbox
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lee-to/laravel-cashbox
- Owner: lee-to
- License: mit
- Created: 2021-02-15T12:10:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-16T16:42:03.000Z (over 3 years ago)
- Last Synced: 2025-03-26T09:01:44.135Z (3 months ago)
- Language: PHP
- Size: 40 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-cashbox beta
## Install
- composer require lee-to/laravel-cashbox- php artisan vendor:publish --provider="Leeto\CashBox\Providers\CashBoxServiceProvider"
- php artisan cashbox:install
- configure config/cashbox.php
### Available payment gateways
- YooKassa (config/cashbox.php credentials - id(shopId), key(shopPassword))
- KassaCom (config/cashbox.php credentials - login, secret, key(api-key))### Usage
##### Create payment url
```php
app("payment")->setPaymentDescription("Premium");
app("payment")->setReturnUrl(route("home"));
app("payment")->setAmount(100);
app("payment")->setParams([
"user_id" => auth()->id(),
]);return redirect(app("payment")->createPayment());
```##### Capture payment
```php
return response()->json(app("payment")->capturePayment(function ($paymentParams, $paymentToken, $bankCard) {
}));
```##### Tests
- vendor/bin/phpunit tests