Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar committed Jul 9, 2023
1 parent 1b3c7e0 commit 55b0aa8
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 85 deletions.
158 changes: 90 additions & 68 deletions .editorconfig

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Andrey Helldar
Copyright (c) 2023 Andrey Helldar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sber QR Cashier Driver

<img src="https://preview.dragon-code.pro/cashier-provider/sber-qr.svg?brand=laravel" alt="Sber QR Cashier Driver"/>
<img src="https://preview.dragon-code.pro/cashier-provider/sber-qr.svg?brand=laravel&mode=dark" alt="Sber QR Cashier Driver"/>

[![Stable Version][badge_stable]][link_packagist]
[![Unstable Version][badge_unstable]][link_packagist]
Expand Down
46 changes: 35 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "cashier-provider/sber-qr",
"description": "Driver for payment with QR codes via Sber (see cashier-provider/core)",
"type": "library",
"license": "MIT",
"type": "library",
"keywords": [
"andrey-helldar",
"helldar",
Expand All @@ -15,27 +15,48 @@
"authors": [
{
"name": "Andrey Helldar",
"email": "[email protected]"
"email": "[email protected]",
"homepage": "https://github.com/andrey-helldar"
}
],
"support": {
"issues": "https://github.com/cashier-provider/sber-qr/issues",
"source": "https://github.com/cashier-provider/sber-qr"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/TheDragonCode"
},
{
"type": "open_collective",
"url": "https://opencollective.com/dragon-code"
},
{
"type": "boosty",
"url": "https://boosty.to/dragon-code"
},
{
"type": "yoomoney",
"url": "https://yoomoney.ru/to/410012608840929"
}
],
"require": {
"php": "^7.3|^8.0",
"cashier-provider/core": "^2.0",
"cashier-provider/sber-auth": "^2.0",
"php": "^7.3 || ^8.0",
"cashier-provider/core": "^3.0",
"cashier-provider/sber-auth": "^3.0",
"psr/http-message": "^1.0"
},
"require-dev": {
"ext-json": "*",
"dragon-code/support": "^5.0",
"illuminate/database": "^6.0|^7.0|^8.0",
"orchestra/testbench": "^4.0|^5.0|^6.0",
"illuminate/database": "^6.0 || ^7.0 || ^8.0",
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0",
"phpunit/phpunit": "^9.0",
"symfony/var-dumper": "^4.0|^5.0"
"symfony/var-dumper": "^4.0 || ^5.0"
},
"minimum-stability": "stable",
"prefer-stable": true,
"autoload": {
"psr-4": {
"CashierProvider\\Sber\\QrCode\\": "src"
Expand All @@ -47,9 +68,12 @@
}
},
"config": {
"allow-plugins": {
"dragon-code/codestyler": true,
"ergebnis/composer-normalize": true,
"friendsofphp/php-cs-fixer": true
},
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "stable",
"prefer-stable": true
}
}
2 changes: 1 addition & 1 deletion tests/Helpers/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function testDefaultReason()
$this->throw(10000, 'Foo Bar');
}

protected function throw($code, string $reason = null)
protected function throw($code, ?string $reason = null)
{
$this->manager()->throw($this->uri(), $code, [
'Message' => $reason,
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected function getEnvironmentSetup($app)
]);
}

protected function model(Details $details = null, int $status_id = 0): EloquentModel
protected function model(?Details $details = null, int $status_id = 0): EloquentModel
{
$model = PaymentConfig::getModel();

Expand Down Expand Up @@ -127,7 +127,7 @@ protected function detailsRelation(EloquentModel $model, ?Details $details): Cas
}

/**
* @param \CashierProvider\Sber\QrCode\Requests\BaseRequest|string $request
* @param \CashierProvider\Sber\QrCode\Requests\BaseRequest|string $request
*
* @return \DragonCode\Contracts\Cashier\Http\Request
*/
Expand Down

0 comments on commit 55b0aa8

Please sign in to comment.