PBBAAppUtils

@interface PBBAAppUtils : NSObject

The utils class with helper methods.

  • Check if at least one PBBA enabled CFI app is installed on the current device.

    You must whitelist first the ‘zapp’ scheme in your Info.plist file under the LSApplicationQueriesSchemes key.

    Declaration

    Objective-C

    + (BOOL)isCFIAppAvailable;

    Swift

    class func isCFIAppAvailable() -> Bool

    Return Value

    YES if CFI app is installed.

  • Open the PBBA enabled CFI app.

    Declaration

    Objective-C

    + (BOOL)openBankingApp:(nonnull NSString *)secureToken;

    Swift

    class func openBankingApp(secureToken: String) -> Bool

    Parameters

    secureToken

    The secure token to retrieve the transaction details.

    Return Value

    YES if the process of hand-off to CFI app was successful.

  • Deprecated

    Please use ‘showPBBAPopup:secureToken:brn:expiryInterval:delegate:’ method instead.

    Show PBBA popup view controller.

    It opens the CFI app automatically (without displaying the popup) if the device has CFI app installed and the user has tapped ‘Open banking app’ button. Before opening the CFI app automatically it will also close any instance of error PBBAPopupViewController which is presented.

    Declaration

    Objective-C

    + (nullable PBBAPopupViewController *)
        showPBBAPopup:(nonnull UIViewController *)presenter
          secureToken:(nonnull NSString *)secureToken
                  brn:(nonnull NSString *)brn
             delegate:(nullable id<PBBAPopupViewControllerDelegate>)delegate;

    Swift

    class func showPBBAPopup(presenter: UIViewController, secureToken: String, brn: String, delegate: PBBAPopupViewControllerDelegate?) -> PBBAPopupViewController?

    Parameters

    presenter

    The presenter controller which will present the popup view controller.

    secureToken

    The human friendly transaction retrieval identifier issued by Zapp.

    brn

    The Basket Reference Number for entry in the CFI app on the consumer’s device.

    expiryInterval

    The time interval defined by the zapp core in order to confirm the payment.

    delegate

    The popup view controller delegate.

    Return Value

    An instance of PBBAPopupViewController which has been presented.

  • Undocumented

    Declaration

    Objective-C

    + (nullable PBBAPopupViewController *)showPBBAPopup:(nonnull UIViewController *)presenter
                                            secureToken:(nonnull NSString *)secureToken
                                                    brn:(nonnull NSString *)brn
                                         expiryInterval:(NSUInteger) expiryInterval
                                               delegate:(nullable id<PBBAPopupViewControllerDelegate>)delegate
    NS_SWIFT_NAME(showPBBAPopup(presenter:secureToken:brn:expiryInterval:delegate:));

    Swift

    class func showPBBAPopup(presenter: UIViewController, secureToken: String, brn: String, expiryInterval: UInt, delegate: PBBAPopupViewControllerDelegate?) -> PBBAPopupViewController?
  • Show PBBA error popup view controller.

    Declaration

    Objective-C

    + (nullable PBBAPopupViewController *)
        showPBBAErrorPopup:(nonnull UIViewController *)presenter
                 errorCode:(nullable NSString *)errorCode
                errorTitle:(nullable NSString *)errorTitle
              errorMessage:(nonnull NSString *)errorMessage
                  delegate:(nullable id<PBBAPopupViewControllerDelegate>)delegate;

    Swift

    class func showPBBAErrorPopup(presenter: UIViewController, errorCode: String?, errorTitle: String?, errorMessage: String, delegate: PBBAPopupViewControllerDelegate?) -> PBBAPopupViewController?

    Parameters

    presenter

    The presenter controller which will present the popup view controller.

    errorCode

    The error code to be displayed inside the popup.

    errorTitle

    The error title to be displayed inside the popup.

    errorMessage

    The error message to be displayed inside the popup.

    delegate

    The popup view controller delegate.

    Return Value

    An instance of PBBAPopupViewController which has been presented.

  • Show PBBA More About popup view controller.

    It opens the More about PBBA popup, containing bank logos

    Declaration

    Objective-C

    + (nullable PBBAPopupViewController *)
        showPBBAMoreAboutPopup:(nonnull UIViewController *)presenter
              withLogosService:(PBBABankLogosService *)logosService;

    Swift

    class func showPBBAMoreAboutPopup(presenter: UIViewController, withLogosService logosService: PBBABankLogosService!) -> PBBAPopupViewController?

    Parameters

    presenter

    The presenter controller which will present the popup view controller.

    logosService

    The logos service which will provide the popup with bank logos.

    Return Value

    An instance of PBBAMoreAboutViewController which has been presented.

  • API to get PBBA integrated button component.

    Declaration

    Objective-C

    + (UIView *)getCustomUXConfigurationsWithWidth:(CGFloat)width
                                           andType:(PBBACustomUXType)customUXType;

    Swift

    class func getCustomUXConfigurations(withWidth width: CGFloat, andType customUXType: PBBACustomUXType) -> UIView!

    Parameters

    width

    for integrated button.

    customUXType

    PBBACustomUXType enum for CustomUXType.

    Return Value

    UIVIew instance based on the configurations for PBBA branding logo cfi logos and More About button.