BTPaymentFlowDriverDelegate

Objective-C

@protocol BTPaymentFlowDriverDelegate

Swift

protocol BTPaymentFlowDriverDelegate

Protocol for payment flow processing via BTPaymentFlowRequestDelegate.

  • Use when payment URL is ready for processing.

    Declaration

    Objective-C

    - (void)onPaymentWithURL:(NSURL *_Nullable)url error:(NSError *_Nullable)error;

    Swift

    func onPayment(with url: URL?, error: Error?)
  • Use when the payment flow was canceled.

    Declaration

    Objective-C

    - (void)onPaymentCancel;

    Swift

    func onPaymentCancel()
  • Use when the payment flow has completed or encountered an error.

    Declaration

    Objective-C

    - (void)onPaymentComplete:(BTPaymentFlowResult *_Nullable)result
                        error:(NSError *_Nullable)error;

    Swift

    func onPaymentComplete(_ result: BTPaymentFlowResult?, error: Error?)

    Parameters

    result

    The BTPaymentFlowResult of the payment flow.

    error

    NSError containing details of the error.

  • Returns the base return URL scheme used by the driver.

    Declaration

    Objective-C

    - (nonnull NSString *)returnURLScheme;

    Swift

    func returnURLScheme() -> String

    Return Value

    A NSString representing the base return URL scheme used by the driver.

  • Returns the BTAPIClient used by the BTPaymentFlowDriverDelegate.

    Declaration

    Objective-C

    - (nonnull BTAPIClient *)apiClient;

    Swift

    func apiClient() -> BTAPIClient

    Return Value

    The BTAPIClient used by the driver.