doc
 All Classes Functions Variables Properties
Public Member Functions | Properties
EMCreditCard Class Reference

Inherits EMModel.

List of all members.

Public Member Functions

(BOOL) - isValid
(BOOL) - hasValidCardNumberForm
(BOOL) - hasValidCardNumberChecksum
(BOOL) - hasValidDate
(BOOL) - hasValidCVV
(BOOL) - isEqualTo:
(void) - setEqualTo:
(BOOL) - inferCardType:

Properties

NSString * fullName
NSString * cardNumber
NSString * cardType
NSString * expiryMonth
NSString * expiryYear
NSString * cvv
NSString * billAddressId

Member Function Documentation

Returns YES if the cardNumber passes the checksum algorithm.

Returns YES if the credit card type has been set, and the cardNumber meets the criteria for that card type, for example, only Visa cards begin with the number 4.

- (BOOL) hasValidCVV

Returns YES if the card has a valid CVV. Takes cardType into consideration.

- (BOOL) hasValidDate

Returns YES if the expiryMonth and expiryYear on this card are the current month, or later.

- (BOOL) inferCardType: (NSString *)  inputCardNumber

Attemps to infer the card type by examining the given inputCardNumber. Returns YES if the card type was inferred, and set on this EMCreditCard model. Otherwise returns NO if no card type could be inferred.

- (BOOL) isValid

Check to make sure the card is complete and valid

- (void) setEqualTo: (EMCreditCard *)  card

Sets card equal to the card passed in as argument


The documentation for this class was generated from the following files: