fix(formating)

This commit is contained in:
Anatoliy Poloz
2026-01-28 03:36:26 +03:00
parent 1723177949
commit b15d29f8e9
313 changed files with 1863 additions and 1533 deletions

View File

@@ -18,20 +18,20 @@ $baas = AlfaBank::baas(
try {
echo "Authenticating...\n";
// AUTHENTICATION:
// client_id: From Developer Portal (App Settings)
// client_secret: From Developer Portal (App Settings -> Key Icon) OR generated via SDK (examples/14_generate_client_secret.php)
// METHOD A: Standard Client Credentials (for simple services)
// $baas->login(
// clientId: 'your-client-id-uuid',
// clientSecret: 'your-client-secret-string'
// );
// METHOD B: Authorization Code Flow (H2H) (REQUIRED for Nominal Accounts)
// See examples/13_h2h_auth_service.php for the full setup
// We re-initialize with auth credentials if we didn't pass them initially
$baas = AlfaBank::baas(
certificatePath: __DIR__ . '/certs/client.cer',
@@ -41,7 +41,7 @@ try {
clientSecret: 'your-client-secret',
redirectUri: 'https://...'
);
// Now you can use OAuth methods:
// $url = $baas->getAuthorizationUrl();
// or
@@ -51,17 +51,16 @@ try {
// 2. Create a Beneficiary (Counterparty)
echo "Creating Beneficiary...\n";
// In a real app, use the DTOs
// $payload = new CreateBeneficiaryRequestData(...);
// $baas->send(new CreateBeneficiaryRequest($payload));
echo "Beneficiary Request Sent (Mock).\n";
} catch (\Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
echo 'Error: ' . $e->getMessage() . "\n";
if ($e instanceof \Apoloz\AlfaBank\Exceptions\AlfaBankException) {
echo "API Code: " . $e->getErrorCode() . "\n";
echo 'API Code: ' . $e->getErrorCode() . "\n";
}
}