BankIDResponse
class BankIDResponse
Upstream API response value object.
Represents a direct response payload from the BankID REST API (auth, sign, collect, or cancel) containing raw protocol fields, hint codes, and completion data.
Constants
| STATUS_OK |
|
| STATUS_COMPLETE |
|
| STATUS_PENDING |
|
| STATUS_FAILED |
|
| HINT_CODE_NO_CLIENT |
|
| HINT_CODE_USER_CANCEL |
|
| HINT_CODE_EXPIRED_TRANSACTION |
|
| HINT_CODE_USER_SIGN |
|
| HINT_CODE_OUTSTANDING_TRANSACTION |
|
| HINT_CODE_STARTED |
|
| HINT_CODE_CERTIFICATE_ERROR |
|
| HINT_CODE_START_FAILED |
|
| HINT_CODE_USER_MRTD |
|
| HINT_CODE_USER_CALL_CONFIRM |
|
| ERROR_CODE_CANCELED |
|
| ERROR_CODE_ALREADY_IN_PROGRESS |
|
| ERROR_CODE_REQUEST_TIMEOUT |
|
| ERROR_CODE_MAINTENANCE |
|
| ERROR_CODE_INTERNAL_ERROR |
|
| ERROR_CODE_INVALID_PARAMETERS |
|
| ERROR_CODE_UNAUTHORIZED |
|
| ERROR_CODE_NOT_FOUND |
|
| ERROR_CODE_METHOD_NOT_ALLOWED |
|
| ERROR_CODE_UNSUPPORTED_MEDIA_TYPE |
|
| ERROR_CODE_CLIENT_CONSTRUCT_ERROR |
|
| RFA1 |
|
| RFA2 |
|
| RFA3 |
|
| RFA4 |
|
| RFA5 |
|
| RFA6 |
|
| RFA8 |
|
| RFA9 |
|
| RFA13 |
|
| RFA14A |
|
| RFA14B |
|
| RFA15A |
|
| RFA15B |
|
| RFA16 |
|
| RFA17A |
|
| RFA17B |
|
| RFA18 |
|
| RFA19 |
|
| RFA20 |
|
| RFA21 |
|
| RFA22 |
|
| RFA23 |
|
Properties
| protected string | $orderRef | The order reference. |
|
| protected string | $status | BankIDResponse status. |
|
| protected string|null | $autoStartToken | The auto start token. |
|
| protected string|null | $qrStartToken | The QR start token. |
|
| protected string|null | $qrStartSecret | The QR start secret. |
|
| protected string|null | $hintCode | The hint code. |
|
| protected string|null | $errorCode | The error code. |
|
| protected string|null | $details | Error details. |
|
| protected array<string, mixed>|null | $completionData | The completion data. |
|
| protected array<string, mixed> | $body | BankIDResponse body. |
Methods
Constructs a new BankIDResponse object.
Creates a response from a raw payload array.
Creates a successful order start response.
Creates a pending collect response.
Creates a completed collect response.
Creates a failed collect response with a hint code.
Creates a successful cancel response.
Checks if the response represents a success/pending state.
Checks if the response represents a failed state.
Get the short name.
Get the body.
Get the status.
Get the order reference.
Get the qr start secret.
Get the qr start token.
Get the completion data.
Get the personalNumber.
Get the error code.
Get the details.
Get the hint code.
Get the auto start token.
Details
at line 135
__construct(string $orderRef, string $status = self::STATUS_OK, array|null $body = NULL)
Constructs a new BankIDResponse object.
at line 164
static BankIDResponse
fromPayload(string $orderRef, string $status, array $payload = [])
Creates a response from a raw payload array.
at line 185
static BankIDResponse
createStart(string $order_ref, string $auto_start_token, string $qr_start_token, string $qr_start_secret, array $payload = [])
Creates a successful order start response.
at line 211
static BankIDResponse
createCollectPending(string $order_ref, string $hint_code, array $payload = [])
Creates a pending collect response.
at line 229
static BankIDResponse
createCollectComplete(string $order_ref, array $completion_data, array $payload = [])
Creates a completed collect response.
at line 247
static BankIDResponse
createCollectFailed(string $order_ref, string $hint_code, array $payload = [])
Creates a failed collect response with a hint code.
at line 263
static BankIDResponse
createCancel(string $order_ref, array $payload = [])
Creates a successful cancel response.
at line 273
bool
isSuccess()
Checks if the response represents a success/pending state.
at line 283
bool
isFailed()
Checks if the response represents a failed state.
at line 290
string|null
getShortName()
Get the short name.
at line 300
array
getBody()
Get the body.
at line 307
string
getStatus()
Get the status.
at line 314
string
getOrderRef()
Get the order reference.
at line 321
string|null
getQrStartSecret()
Get the qr start secret.
at line 328
string|null
getQrStartToken()
Get the qr start token.
at line 338
array|null
getCompletionData()
Get the completion data.
at line 345
string|null
getPersonalNumber()
Get the personalNumber.
at line 358
string|null
getErrorCode()
Get the error code.
at line 365
string|null
getErrorDetails()
Get the details.
at line 372
string|null
getHintCode()
Get the hint code.
at line 379
string|null
getAutoStartToken()
Get the auto start token.