class BankIDRequestException extends BankIDException

Exception thrown when a BankID request fails or returns an API error.

Methods

__construct(string $message, string $errorCode, string|null $details = NULL, string|null $orderRef = NULL, string|null $userMessage = NULL, int $code = 0, Throwable|null $previous = NULL)

Constructs a new BankIDRequestException.

string
getErrorCode()

Gets the BankID error code.

string|null
getDetails()

Gets the details from the API.

string|null
getOrderRef()

Gets the order reference if available.

string|null
getUserMessage()

Gets the user-facing message.

Details

at line 30
__construct(string $message, string $errorCode, string|null $details = NULL, string|null $orderRef = NULL, string|null $userMessage = NULL, int $code = 0, Throwable|null $previous = NULL)

Constructs a new BankIDRequestException.

Parameters

string $message

The exception message.

string $errorCode

The BankID error code (e.g. alreadyInProgress, invalidParameters).

string|null $details

Optional details from the API.

string|null $orderRef

Optional order reference if present.

string|null $userMessage

Optional resolved user-facing message.

int $code

The exception code.

Throwable|null $previous

The previous exception.

at line 48
string getErrorCode()

Gets the BankID error code.

Return Value

string

The error code.

at line 58
string|null getDetails()

Gets the details from the API.

Return Value

string|null

The details string or NULL.

at line 68
string|null getOrderRef()

Gets the order reference if available.

Return Value

string|null

The order reference or NULL.

at line 78
string|null getUserMessage()

Gets the user-facing message.

Return Value

string|null

The user message, or NULL if not set.