PaygateError

public enum PaygateError : Error, Equatable

PaygateError defines the possible errors that can occur when interacting with the NexiPaygate SDK.

This enum conforms to the Error and Equatable protocols, enabling it to be used for error handling and comparison. The errors encapsulate a range of potential issues, from generic request failures to specific HTTP response status codes.

  • Cases:
    • threeDS: Wraps errors that occur during the 3D Secure authentication process.
    • api: Wraps errors related to network API failures and response validation.
    • paymentProcessing: Wraps general payment processing errors within the SDK.
    • applePayProcessing: Wraps errors specific to Apple Pay transaction handling.
  • Errors related to 3DS (Netcetera)

    • initializationFailed: Indicates an error due to failed initialization ThreeDS module.
    • serviceInvalid: Indicates that the 3DS service instance is invalid or unavailable.
    • challengeRuntimeError: Represents a runtime error that occurred during the 3DS challenge process.
    • challengeFlowFailed: Indicates that the overall 3DS challenge flow failed to complete successfully.
    See more

    Declaration

    Swift

    public enum ThreeDSError : Error, Equatable
  • Errors related to API failures (PaygateError)

    • unsupportedRequestType: Indicates that the request type is not supported by the API handler.
    • invalidResponse: Indicates an error due to an invalid or unexpected response format from the server.
    • requestFailed(Error): Indicates that a network request has failed due to an underlying error (e.g., connectivity).
    • badRequest(PaygateBadRequestError): Corresponds to a 400 Bad Request, wrapping specific details about invalid parameters.
    • unprocessableEntity(PaygateUnprocessableEntity): Corresponds to a 422 Unprocessable Entity, where the request was well-formed but couldn’t be processed logically.
    • internalServerError(PaygateInternalError): Corresponds to a 500 Internal Server Error, wrapping server-side error details.
    See more

    Declaration

    Swift

    public enum APIError : Error, Equatable
  • Errors related to Apple Pay processing

    • invalidOrderData: Indicates that the provided order data for Apple Pay is incomplete or invalid.
    • internalFailure: Represents a generic internal failure during the Apple Pay setup or transaction.
    See more

    Declaration

    Swift

    public enum ApplePayProcessingError : Error, Equatable
  • Errors related to general payment processing

    • invalidRequest: Indicates that the payment request parameters are invalid or missing required fields.
    • internalFailure: Represents a generic internal failure within the payment processing logic.
    See more

    Declaration

    Swift

    public enum PaymentProcessingError : Error, Equatable
  • Main error cases that wrap other categories Wraps a ThreeDSError occurring during 3D Secure authentication.

    Declaration

    Swift

    case threeDS(ThreeDSError)
  • Wraps an APIError occurring during network communication with the Payment Gateway.

    Declaration

    Swift

    case api(APIError)
  • Wraps a PaymentProcessingError for general payment logic failures.

    Declaration

    Swift

    case paymentProcessing(PaymentProcessingError)
  • Wraps an ApplePayProcessingError specific to Apple Pay transactions.

    Declaration

    Swift

    case applePayProcessing(ApplePayProcessingError)