BankIDResponseFactory
class BankIDResponseFactory implements BankIDResponseFactoryInterface
Factory for creating BankIDResponse instances from HTTP responses and errors.
Methods
Creates a BankIDResponse from a successful HTTP start response.
Creates a BankIDResponse from a successful HTTP collect response.
Creates a BankIDResponse from a successful HTTP cancel response.
Throws a BankIDRequestException from a caught throwable or API error.
Throws a BankIDRequestException when the client cannot be configured.
Decodes a PSR-7 response body to an array.
Details
at line 21
BankIDResponse
fromStartResponse(ResponseInterface $response)
Creates a BankIDResponse from a successful HTTP start response.
at line 45
BankIDResponse
fromCollectResponse(ResponseInterface $response)
Creates a BankIDResponse from a successful HTTP collect response.
at line 74
BankIDResponse
fromCancelResponse(ResponseInterface $response, string $orderRef)
Creates a BankIDResponse from a successful HTTP cancel response.
at line 82
never
fromThrowable(Throwable $e, string|null $orderRef = NULL)
Throws a BankIDRequestException from a caught throwable or API error.
at line 139
never
fromClientConfigurationError(string $message = 'BankID client could not be configured. Please verify key settings.')
Throws a BankIDRequestException when the client cannot be configured.
at line 155
protected array
decodeResponse(ResponseInterface $response)
Decodes a PSR-7 response body to an array.