McdCardData
@interface McdCardData : NSObject
Provides API for interacting with received card data.
-
Card PAN number
Declaration
Objective-C
@property (nonatomic, copy, readonly, nonnull) NSString *pan;
Return Value
Card PAN number
-
Card CVV
Declaration
Objective-C
@property (nonatomic, copy, readonly, nonnull) NSString *cvv;
Return Value
Card CVV
-
Expiry date in format YYYY-MM-DD
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *expiry;
Return Value
Expiry date in format YYYY-MM-DD
-
Name embossed on the card
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *embossName;
Return Value
Name embossed on the card
-
Constructs card data.
Declaration
Objective-C
+ (nonnull instancetype)cardDataWithPan:(NSString *_Nonnull)pan cvv:(NSString *_Nonnull)cvv;
Parameters
pan
Card PAN number.
cvv
Card CVV.
Return Value
Card data as instance of McdCardData.
-
Constructs card data.
Declaration
Objective-C
+ (nonnull instancetype)cardDataWithPan:(NSString *_Nonnull)pan cvv:(NSString *_Nonnull)cvv expiry:(NSString *_Nonnull)expiry embossName:(NSString *_Nonnull)embossName;
Parameters
pan
Card PAN number.
cvv
Card CVV.
expiry
Expiry date in format YYYY-MM-DD.
embossName
Name embossed on the card.
Return Value
Card data as instance of McdCardData.
-
Constructs card data from values passed in dictionary.
Declaration
Objective-C
+ (nonnull instancetype)cardDataWithDictionary: (NSDictionary *_Nonnull)dictionary;
Parameters
dictionary
Dictionary containing
pan
,cvv
,expiry
andembossName
to create an instance of card data.Return Value
Card data as instance of McdCardData.
-
Verify if card data are valid.
Declaration
Objective-C
- (BOOL)isValid;
Return Value
Bool value if card data are valid.