Inherits from REPayment : NSObject
Declared in RECardRequest.h

Overview

Used to describe a payment operation with Card. This object must be used to retrieve a payment token using [Recurly tokenWithRequest: completion:]

Tasks

Properties

cvv

@property (nonatomic, strong) NSString *cvv
Discussion

CVV, card verification value

Declared In

RECardRequest.h

expirationMonth

@property (nonatomic, assign) NSInteger expirationMonth
Discussion

Month of the year. [1-12]

Declared In

RECardRequest.h

expirationYear

@property (nonatomic, assign) NSInteger expirationYear
Discussion

Year, full year number (2020) and short one (20) work.

Declared In

RECardRequest.h

nameOnCard

@property (nonatomic, strong) NSString *nameOnCard
Discussion

Name on card

Declared In

RECardRequest.h

number

@property (nonatomic, strong) NSString *number
Discussion

Card’s number

Declared In

RECardRequest.h

Class Methods

cardTypeForNumber:

+ (RECardType)cardTypeForNumber:(NSString *)cardNumber
Discussion

Parses the card number and returns the card type.

Parameters

cardNumber

Card number

See Also

Declared In

RECardRequest.h

formatCardNumber:

+ (NSString *)formatCardNumber:(NSString *)cardNumber
Discussion

Formattes a card number by adding a separator each 4 numbers.

Formatting “4111111111111111” returns “4111 1111 1111 1111”

Parameters

cardNumber

Card number

Declared In

RECardRequest.h

parseCardNumber:

+ (NSString *)parseCardNumber:(NSString *)cardNumber
Discussion

Parses the card number removing whitespaces and dashes.

Parsing “34 234-34 ” returns “3423434”

Parameters

cardNumber

Card number

Declared In

RECardRequest.h

requestWithCardNumber:CVV:month:year:firstName:lastName:countryCode:

+ (instancetype)requestWithCardNumber:(NSString *)cardNumber CVV:(NSString *)cvv month:(NSInteger)month year:(NSInteger)year firstName:(NSString *)firstName lastName:(NSString *)lastName countryCode:(NSString *)countryCode
Discussion

Initializes a CardRequest with the most common paramaters needed

Parameters

cardNumber

Card number

cvv

Card verification value

month

Month of the year

year

Year

firstName

End use’s first name

lastName

End use’s lirst name

countryCode

Country code.

Declared In

RECardRequest.h

Instance Methods

type

- (RECardType)type