OPPChinaUnionPayPaymentParams

@interface OPPChinaUnionPayPaymentParams : OPPPaymentParams

Class to encapsulate all necessary transaction parameters for performing a China UnionPay (UPOP) transaction.

  • Creates an object representing a China UnionPay transaction.

    Declaration

    Objective-C

    + (nullable instancetype)
        chinaUnionPayPaymentParamsWithCheckoutID:(nonnull NSString *)checkoutID
                                          holder:(nullable NSString *)holder
                                           error:
                                               (NSError *_Nullable *_Nullable)error;

    Parameters

    checkoutID

    The checkout ID of the transaction. Must be not nil or empty.

    holder

    Holder of the card account.

    error

    The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) and NSLocalizedDescription to identify the reason of failure.

    Return Value

    Returns an object representing a China UnionPay transaction.

  • Creates an object representing a China UnionPay transaction.

    Declaration

    Objective-C

    - (nullable instancetype)initWithCheckoutID:(nonnull NSString *)checkoutID
                                         holder:(nullable NSString *)holder
                                          error:
                                              (NSError *_Nullable *_Nullable)error;

    Swift

    init(checkoutID: String, holder: String?) throws

    Parameters

    checkoutID

    The checkout ID of the transaction. Must be not nil or empty.

    holder

    Holder of the card account.

    error

    The error that occurred while validating payment parameters. See code attribute (OPPErrorCode) and NSLocalizedDescription to identify the reason of failure.

    Return Value

    Returns an object representing a China UnionPay transaction.

  • Holder of the account. The length must be greater than 3 characters and less then 128 character.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull holder;

    Swift

    var holder: String { get }
  • Checks if the holder name is filled with sufficient data to perform a transaction.

    Declaration

    Objective-C

    + (BOOL)isHolderValid:(nonnull NSString *)holder;

    Swift

    class func isHolderValid(_ holder: String) -> Bool

    Parameters

    holder

    Holder of the card account.

    Return Value

    YES if the holder name length greater than 3 characters and less than 128 character.