PaymentRequestReceiver

public protocol PaymentRequestReceiver

A protocol that defines a receiver for payment requests.

This protocol is generic over a Payload type, ensuring that any conforming type can only succeed with its specific, required data structure.

  • The specific type of payload this receiver expects.

    Declaration

    Swift

    associatedtype Payload
  • A closure that handles successful payment processing.

    Declaration

    Swift

    var onSuccess: (Payload) async -> PaymentProcessResult { get }

    Parameters

    payload

    The payload containing payment details, specific to this receiver.

    Return Value

    A PaymentProcessResult upon completion.

  • A closure that handles payment failures.

    Declaration

    Swift

    var onFailure: () -> Void { get }