OPPSecurityPolicy

@interface OPPSecurityPolicy : NSObject

Class which is used to apply security policy mode for the set of payment methods.

  • Creates security policy for the list of payment methods with specified mode.

    Declaration

    Objective-C

    + (nonnull instancetype)
        securityPolicyWithPaymentBrands:(nonnull NSArray<NSString *> *)paymentBrands
                                   mode:(OPPSecurityPolicyMode)mode;

    Swift

    convenience init(paymentBrands: [String], mode: OPPSecurityPolicyMode)

    Parameters

    paymentBrands

    List of payment brands. Note that Apple Pay will be ignored, because device authentication is mandatory for this payment method.

    mode

    Mode of security policy which will be applied to the paymentBrands.

  • Creates security policy for tokens with specified mode.

    Declaration

    Objective-C

    + (nonnull instancetype)securityPolicyForTokensWithMode:
        (OPPSecurityPolicyMode)mode;

    Swift

    convenience init(forTokensWith mode: OPPSecurityPolicyMode)

    Parameters

    mode

    Mode of security policy which will be applied for all tokens.

  • The mode of security policy.

    Declaration

    Objective-C

    @property (nonatomic, readonly) OPPSecurityPolicyMode mode;

    Swift

    var mode: OPPSecurityPolicyMode { get }
  • The list of payment brands.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSArray<NSString *> *paymentBrands;

    Swift

    var paymentBrands: [String]? { get }
  • The flag that defines whether mode is applied to paymentBrands or to all tokens.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isTokenPolicy) BOOL tokenPolicy;

    Swift

    var isTokenPolicy: Bool { get }