MerchantRequestReceiver
public final class MerchantRequestReceiver<Payload> : PaymentRequestReceiver
A concrete, generic implementation of PaymentRequestReceiver.
This class is generic over a Payload type, allowing it to be configured
to process a specific kind of payment request.
-
The closure executed upon successful payment processing.
Declaration
Swift
public var onSuccess: (Payload) async -> PaymentProcessResultParameters
payloadThe payload containing payment details of the generic
Payloadtype.Return Value
A
PaymentProcessResultafter processing the request. -
The closure executed when the payment process fails.
Declaration
Swift
public var onFailure: () -> Void -
Initializes a
MerchantRequestReceiverwith success and failure handlers.Declaration
Swift
public init( onSuccess: @escaping (Payload) async -> PaymentProcessResult, onFailure: @escaping () -> Void )Parameters
onSuccessA closure handling successful payment processing for the specific
Payload.onFailureA closure handling payment failures.