PaymentApiException constructor
PaymentApiException(})
Creates a new PaymentApiException with the specified details.
The message
should describe the API error.
The statusCode
is the HTTP status code from the response.
The responseBody
is the raw response from the server.
The errorCode
is the specific error code returned by the API.
Implementation
PaymentApiException(
super.message, {
super.cause,
super.statusCode,
super.responseBody,
super.errorCode,
}) : super(
errorType: errorCode == 'ERR_PAYMENT_ORDER_NOT_FOUND'
? PaymentErrorType.invalidOrderId
: PaymentErrorType.api,
);