BankIDOrderStatus
final class BankIDOrderStatus implements JsonSerializable, ArrayAccess, Countable
Frontend transport and presentation value object for a BankID order.
Aggregates order polling state for the frontend modal dialog, including animated QR code string, deep link app URL, translated user message, and plugin outcome data.
Methods
Constructs a new BankIDOrderStatus instance.
Creates an order start status instance.
Creates a pending collect status instance.
Creates a completed status instance.
Creates a failed status instance.
Creates a cancelled status instance.
Creates an empty status instance (used when already cancelled).
Gets the order status string.
Gets the order reference.
Gets the BankID hint code.
Gets the resolved status or error message string.
Gets the raw message (TranslatableMarkup or string).
Gets the QR code data string.
Gets the auto-start app link URL.
Gets the client data array.
Gets the auto start token.
Gets the QR start token.
Gets the BankID error code.
Checks if status is pending.
Checks if status is complete.
Checks if status is failed.
Checks if status is OK (e.g. cancelled).
Checks if the status represents an empty response.
Converts the status object to an associative array.
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
Details
at line 44
__construct(string $status, string|null $orderRef = NULL, string|null $hintCode = NULL, TranslatableMarkup|string|null $message = NULL, string|null $qrData = NULL, string|null $appLink = NULL, array|null $data = NULL, string|null $autoStartToken = NULL, string|null $qrStartToken = NULL, string|null $errorCode = NULL)
Constructs a new BankIDOrderStatus instance.
at line 76
static BankIDOrderStatus
createStart(string $orderRef, string $qrData, string $appLink, string|null $autoStartToken = NULL, string|null $qrStartToken = NULL, TranslatableMarkup|string|null $message = NULL)
Creates an order start status instance.
at line 112
static BankIDOrderStatus
createPending(string $orderRef, string|null $hintCode, TranslatableMarkup|string|null $message, string|null $qrData = NULL, string|null $appLink = NULL)
Creates a pending collect status instance.
at line 142
static BankIDOrderStatus
createComplete(string $orderRef, TranslatableMarkup|string|null $message, array|null $data = NULL)
Creates a completed status instance.
at line 176
static BankIDOrderStatus
createFailed(TranslatableMarkup|string|null $message, string|null $orderRef = NULL, string|null $hintCode = NULL, string|null $errorCode = NULL, array|null $data = NULL, string|null $qrData = NULL, string|null $appLink = NULL)
Creates a failed status instance.
at line 208
static BankIDOrderStatus
createCancelled(string|null $orderRef = NULL, array|null $data = NULL)
Creates a cancelled status instance.
at line 225
static BankIDOrderStatus
createEmpty()
Creates an empty status instance (used when already cancelled).
at line 232
string
getStatus()
Gets the order status string.
at line 239
string|null
getOrderRef()
Gets the order reference.
at line 246
string|null
getHintCode()
Gets the BankID hint code.
at line 253
string|null
getMessage()
Gets the resolved status or error message string.
at line 260
TranslatableMarkup|string|null
getMessageMarkup()
Gets the raw message (TranslatableMarkup or string).
at line 267
string|null
getQrData()
Gets the QR code data string.
at line 274
string|null
getAppLink()
Gets the auto-start app link URL.
at line 284
array|null
getData()
Gets the client data array.
at line 291
string|null
getAutoStartToken()
Gets the auto start token.
at line 298
string|null
getQrStartToken()
Gets the QR start token.
at line 305
string|null
getErrorCode()
Gets the BankID error code.
at line 312
bool
isPending()
Checks if status is pending.
at line 319
bool
isComplete()
Checks if status is complete.
at line 326
bool
isFailed()
Checks if status is failed.
at line 333
bool
isOk()
Checks if status is OK (e.g. cancelled).
at line 340
bool
isEmpty()
Checks if the status represents an empty response.
at line 350
array
toArray()
Converts the status object to an associative array.
at line 360
array
jsonSerialize()
{@inheritdoc}
at line 401
int
count()
{@inheritdoc}
at line 408
bool
offsetExists(mixed $offset)
{@inheritdoc}
at line 415
mixed
offsetGet(mixed $offset)
{@inheritdoc}
at line 422
void
offsetSet(mixed $offset, mixed $value)
{@inheritdoc}
at line 429
void
offsetUnset(mixed $offset)
{@inheritdoc}