PartialPaymentDelegate

public protocol PartialPaymentDelegate : AnyObject

Describes the methods a delegate of the payment component needs to implement.

  • Invoked when the payment component needs a balance check call to be done by the merchant.

    Declaration

    Swift

    func checkBalance(with data: PaymentComponentData,
                      completion: @escaping (Result<Balance, Error>) -> Void)

    Parameters

    data

    The data supplied by the payment component.

    completion

    The completion closure called when the balance is checked.

  • Invoked when the payment component needs a partial payment order object.

    Declaration

    Swift

    func requestOrder(_ completion: @escaping (Result<PartialPaymentOrder, Error>) -> Void)

    Parameters

    completion

    The completion closure called when the order object.

  • Invoked when the payment component needs to cancel the order.

    Declaration

    Swift

    func cancelOrder(_ order: PartialPaymentOrder)

    Parameters

    order

    The order object.