PaymentProcessResult

public enum PaymentProcessResult : Equatable

The result of a payment process flow.

This enum encapsulates the possible outcomes of attempting a payment transaction, including success, user cancellation, or failure due to an error.

  • Indicates that the payment process completed successfully.

    Declaration

    Swift

    case success(paymentDetails: PaymentAPIResponse?, paymentId: PaymentID?)

    Parameters

    paymentDetails

    The detailed response from the payment API, if available.

    paymentId

    The unique identifier for the successful transaction.

  • Indicates that the payment process was cancelled by the user or the system.

    Declaration

    Swift

    case cancellation(paymentDetails: PaymentAPIResponse?, paymentId: PaymentID?)

    Parameters

    paymentDetails

    The detailed response from the payment API related to the cancellation, if available.

    paymentId

    The unique identifier for the transaction that was cancelled.

  • Indicates that the payment process failed due to an error.

    Declaration

    Swift

    case failure(paymentError: PaymentProcessError, transactionID: PaymentID?)

    Parameters

    paymentError

    The specific error that caused the failure.

    transactionID

    The unique identifier for the failed transaction attempt, if one was generated.