Update documentation and examples, add new nominal accounts features and authentication methods

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-01-24 17:18:59 +03:00
parent 2964c391b5
commit bb5f91d399
13 changed files with 290 additions and 157 deletions

View File

@@ -23,6 +23,8 @@ use Spatie\LaravelData\DataCollection;
*/
// 1. Инициализация SDK
// Сертификаты (Transport Certs):
// Получены от банка (Sandbox) или сгенерированы вами и активированы банком (Production).
$baas = AlfaBank::baas(
certificatePath: 'transport.crt',
privateKeyPath: 'transport.key'
@@ -34,6 +36,8 @@ $signKey = file_get_contents('signing.key');
try {
// Auth: Nominal Accounts require H2H Flow
// client_id: Из Портала разработчика
// client_secret: Из Портала разработчика (глаз) или сгенерирован через SDK (examples/14_generate_client_secret.php)
$auth = AlfaBank::auth(
'client_id', 'client_secret', 'https://callback',
'transport.crt', 'transport.key'