cashier-provider / tinkoff-auth
Tinkoff API Authorization Driver
Fund package maintenance!
TheDragonCode
Open Collective
Boosty
Yoomoney
Installs: 5 996
Dependents: 3
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^7.3 || ^8.0
- ext-json: *
- cashier-provider/core: ^3.0
- dragon-code/contracts: ^2.0
- dragon-code/simple-dto: ^2.2
- dragon-code/support: ^5.0
- illuminate/support: ^6.0 || ^7.0 || ^8.0 || ^9.0
Requires (Dev)
- orchestra/testbench: ^4.0 || ^5.0 || ^6.0 || ^7.0
- phpunit/phpunit: ^9.0
- symfony/var-dumper: ^4.3 || ^5.0 || ^6.0
README
Note: This driver doesn't need to be installed in the application. I's needed to implement Tinkoff bank authorization for Cashier drivers.
Installation
To get the latest version of Tinkoff Auth Cashier Driver
, simply require the project using Composer:
$ composer require cashier-provider/tinkoff-auth
Or manually update require
block of composer.json
and run composer update
.
{ "require": { "cashier-provider/tinkoff-auth": "^2.0" } }
Using
Without Hashed Token
In some cases, for example, to initialize a payment session, it is necessary to transmit terminal_key
and terminal_secret
in clear text. In such cases, the $hash = false
parameter must be specified in the request.
namespace CashierProvider\Tinkoff\QrCode\Requests; use CashierProvider\Core\Http\Request; use CashierProvider\Tinkoff\Auth\Auth; class Init extends Request { // You need to provide a link to the authorization class: protected $auth = Auth::class; protected $hash = false; }
With Hashed Token
In cases where the request must be signed with a special hashed token, you must set the $hash
variable to true
.
namespace CashierProvider\Tinkoff\QrCode\Requests; use CashierProvider\Core\Http\Request; use CashierProvider\Tinkoff\Auth\Auth; class Get extends Request { protected $auth = Auth::class; protected $hash = true; }