LUPaymentQRCodeGenerator Class Reference
Inherits from | NSObject |
Declared in | LUPaymentQRCodeGenerator.h LUPaymentQRCodeGenerator.m |
Overview
LUPaymentQRCodeGenerator
is used to build QR codes for users' payment tokens. All LevelUp QR
codes include a unique identifier for the current user, but may optionally include a tip percentage
or the ID of a color that the user would like the LevelUp docks to glow.
Glow Colors
The current table of colors is:
- 0: #00FF00 “Soothing Green”
- 1: #BAFF48 “Atomic Lime”
- 2: #FF0002 “Tango Red”
- 3: #0030F8 “Galactic Blue”
- 4: #7800F7 “Purple Haze”
- 5: #FFFC48 “Yellow Submarine”
- 6: #00E4FD “Arctic Teal”
- 7: #FF00C6 “Sick Flamingo”
- 8: #00FF84 “Mint Julep”
- 9: #FF721C “Ninja Orange”
Class Methods
QRCodeFromPaymentToken:
Generates a UIImage
containing a QR code with a payment token.
+ (UIImage *)QRCodeFromPaymentToken:(NSString *)paymentToken
Parameters
- paymentToken
The payment token to use when generating the QR code.
Return Value
A UIImage
containing the QR code.
Discussion
Generates a UIImage
containing a QR code with a payment token.
Declared In
LUPaymentQRCodeGenerator.h
QRCodeFromPaymentToken:withTipAmountInUSCents:
Generates a UIImage
containing a QR code with a payment token and a tip percentage.
+ (UIImage *)QRCodeFromPaymentToken:(NSString *)paymentToken withTipAmountInUSCents:(NSInteger)tipAmount
Parameters
- paymentToken
The payment token to use when generating the QR code.
- tipAmount
A tip amount in US cents. The largest possible tip that can be encoded is $453.59.
Return Value
A UIImage
containing the QR code.
Discussion
Generates a UIImage
containing a QR code with a payment token and a tip percentage.
Declared In
LUPaymentQRCodeGenerator.h
QRCodeFromPaymentToken:withTipAmountInUSCents:glowColorID:
Generates a UIImage
containing a QR code with a payment token and a tip percentage.
+ (UIImage *)QRCodeFromPaymentToken:(NSString *)paymentToken withTipAmountInUSCents:(NSInteger)tipAmount glowColorID:(NSInteger)glowColorID
Parameters
- paymentToken
The payment token to use when generating the QR code.
- tipAmount
A tip amount in US cents. The largest possible tip that can be encoded is $453.59.
- glowColorID
The ID of a color.
Return Value
A UIImage
containing the QR code.
Discussion
Generates a UIImage
containing a QR code with a payment token and a tip percentage.
Declared In
LUPaymentQRCodeGenerator.h
QRCodeFromPaymentToken:withTipPercentage:
Generates a UIImage
containing a QR code with a payment token and a tip percentage.
+ (UIImage *)QRCodeFromPaymentToken:(NSString *)paymentToken withTipPercentage:(NSInteger)tipPercentage
Parameters
- paymentToken
The payment token to use when generating the QR code.
- tipPercentage
A tip percentage. For example 100% is represented as 100. The largest possible percent that can be encoded is 1295%.
Return Value
A UIImage
containing the QR code.
Discussion
Generates a UIImage
containing a QR code with a payment token and a tip percentage.
Declared In
LUPaymentQRCodeGenerator.h
QRCodeFromPaymentToken:withTipPercentage:glowColorID:
Generates a UIImage
containing a QR code with a payment token, tip percentage and glow color ID.
+ (UIImage *)QRCodeFromPaymentToken:(NSString *)paymentToken withTipPercentage:(NSInteger)tipPercentage glowColorID:(NSInteger)glowColorID
Parameters
- paymentToken
The payment token to use when generating the QR code.
- tipPercentage
A tip percentage. For example 100% is represented as 100. The largest possible percent that can be encoded is 1295%.
- glowColorID
The ID of a color.
Return Value
A UIImage
containing the QR code.
Discussion
Generates a UIImage
containing a QR code with a payment token, tip percentage and glow color ID.
Declared In
LUPaymentQRCodeGenerator.h