BTVenmoDriver

Objective-C

@interface BTVenmoDriver : NSObject <BTAppContextSwitchDriver>

Swift

class BTVenmoDriver : NSObject, BTAppContextSwitchDriver

Used to process Venmo payments

  • Initialize a new Venmo driver instance.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAPIClient:(nonnull BTAPIClient *)apiClient;

    Swift

    init(apiClient: BTAPIClient)

    Parameters

    apiClient

    The API client

  • Unavailable

    Please use initWithAPIClient:

    Base initializer - do not use.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Initiates Venmo login via app switch, which returns a BTVenmoAccountNonce when successful.

    Declaration

    Objective-C

    - (void)tokenizeVenmoAccountWithVenmoRequest:
                (nonnull BTVenmoRequest *)venmoRequest
                                      completion:
                                          (nonnull void (^)(
                                              BTVenmoAccountNonce *_Nullable,
                                              NSError *_Nullable))completionBlock;

    Swift

    func tokenizeVenmoAccount(with venmoRequest: BTVenmoRequest) async throws -> BTVenmoAccountNonce

    Parameters

    venmoRequest

    A Venmo request.

    completionBlock

    This completion will be invoked when app switch is complete or an error occurs. On success, you will receive an instance of BTVenmoAccountNonce; on failure, an error; on user cancellation, you will receive nil for both parameters.

  • Returns true if the proper Venmo app is installed and configured correctly, returns false otherwise.

    Declaration

    Objective-C

    - (BOOL)isiOSAppAvailableForAppSwitch;

    Swift

    func isiOSAppAvailableForAppSwitch() -> Bool
  • Switches to the iTunes App Store to download the Venmo app.

    Declaration

    Objective-C

    - (void)openVenmoAppPageInAppStore;

    Swift

    func openVenmoAppPageInAppStore()