OPPPaymentButton

@interface OPPPaymentButton : UIButton

Class that extends UIButton in order to esily integrate separate payment methods in the app.

By default button contains appropriate logo if a valid payment method is set. Button can be fully customized as common UIButton.

To create and submit a transaction, use -[OPPCheckoutProvider presentCheckoutWithPaymentBrand:loadingHandler:completionHandler:cancelHandler:] in button action method.

  • Creates and returns payment button initialized with the payment brand.

    Declaration

    Objective-C

    + (nonnull instancetype)paymentButtonWithPaymentBrand:
        (nonnull NSString *)paymentBrand;

    Parameters

    paymentBrand

    Payment brand for the transaction.

  • Creates and returns payment button initialized with the payment method.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPaymentBrand:(nonnull NSString *)paymentBrand;

    Swift

    init(paymentBrand: String)

    Parameters

    paymentBrand

    Payment brand for the transaction.

  • Payment brand for the transaction that is used to display an appropriate logo. Logo will be loaded automatically from the Server. To use your own image for a button, set it before initializing the payment brand.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *_Nonnull paymentBrand;

    Swift

    var paymentBrand: String { get set }