ekadesign/sber-auth

Sber API Authorization Driver


Keywords
auth, Bank, billing, cashier, helldar, sber, andrey-helldar
License
MIT

Documentation

Sber Cashier Authorization Driver

Sber Cashier Authorization Driver

Stable Version Unstable Version Total Downloads License

Note: This driver doesn't need to be installed in the application. I's needed to implement Sber bank authorization for Cashier drivers.

Installation

To get the latest version of Sber Cashier Authorization Driver, simply require the project using Composer:

$ composer require cashier-provider/sber-auth

Or manually update require block of composer.json and run composer update.

{
    "require": {
        "cashier-provider/sber-auth": "^2.0"
    }
}

Using

namespace CashierProvider\Sber\QrCode\Requests;

use CashierProvider\Core\Http\Request;
use CashierProvider\Sber\Auth\Auth;
use CashierProvider\Sber\QrCode\Constants\Body;
use CashierProvider\Sber\QrCode\Constants\Scopes;

class Create extends Request
{
    protected $path = '/ru/prod/order/v3/creation';

    // You need to provide a link to the authorization class:
    protected $auth = Auth::class;

    // You need to specify a scope to receive a token by auth:
    protected $auth_extra = [
        Body::SCOPE => Scopes::CREATE,
    ];
}

It's all. Enjoy 😎