v9

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-05-05502770.7 KB
Exceptions

AuthenticationException — échec OAuth2

Levée quand l'authentification OAuth2 échoue (identifiants invalides, token expiré non renouvelable).

use QrCommunication\VivaMerchant\Exceptions\AuthenticationException;

try {
    $viva->account->info();
} catch (AuthenticationException $e) {
    echo $e->getMessage(); // 'OAuth2 authentication failed: ...'
    // httpStatus = 401
}
get/Exceptions/AuthenticationException

Response

Classe AuthenticationException