This class contains utility methods that may be needed to integrate with the SDK.
More...
#import <ChipDnaMobileUtils.h>
Inherits NSObject.
This class contains utility methods that may be needed to integrate with the SDK.
- Author
- Creditcall Ltd
- Copyright
- Copyright Creditcall Limited 2010 - 2018.
◆ isValidAmount:
| + (BOOL) isValidAmount: |
|
(NSString *) |
amount |
|
Check whether an amount has a valid format. It has to be non nil, in minor units and have a maximum of 7 numeric digits.
- Parameters
-
| amount | The amount number to be validated. |
- Returns
- YES if amount is valid, otherwise NO.
◆ isValidEmailAddress:
| + (BOOL) isValidEmailAddress: |
|
(NSString *) |
email |
|
Check whether a email address has a valid format.
- Parameters
-
| email | The email address to be validated. |
- Returns
- YES if email is valid, otherwise NO.
◆ isValidPhoneNumber:
| + (BOOL) isValidPhoneNumber: |
|
(NSString *) |
phoneNumber |
|
Check whether a phone number has a valid format.
- Parameters
-
| phoneNumber | The phone number to be validated. |
- Returns
- YES if phone number is valid, otherwise NO.
◆ isValidReference:
| + (BOOL) isValidReference: |
|
(NSString *) |
reference |
|
Check whether a reference string has a valid format. It has to contain only UTF-8 characters and have a maximum of 50 characters.
- Parameters
-
| reference | The reference number to be validated. |
- Returns
- YES if reference is valid, otherwise NO.
◆ isValidTerminalID:
| + (BOOL) isValidTerminalID: |
|
(NSString *) |
terminalID |
|
Check whether the terminal ID has a valid format.
This must be 8 characters long and only contain numeric characters.
- Parameters
-
| terminalID | The terminal ID to be validated. |
- Returns
- YES if terminal ID is valid, otherwise NO.
◆ isValidTransactionKey:
| + (BOOL) isValidTransactionKey: |
|
(NSString *) |
transactionKey |
|
Check whether the transaction key has a valid format.
This should be between 1 and 20 characters long and contain only alpha numeric characters.
- Parameters
-
| transactionKey | The transaction key to be validated. |
- Returns
- YES if transaction key is valid, otherwise NO.
◆ padLeft:paddingCharacter:desiredLength:
| + (NSString *) padLeft: |
|
(NSString *) |
originalString |
| paddingCharacter: |
|
(char) |
paddingCharacter |
| desiredLength: |
|
(int) |
desiredLength |
|
|
| |
Pad a string on the left to a desired length with a character of choice.
- Parameters
-
| originalString | The original string to be padded. |
| paddingCharacter | The character the string is to be padded with. |
| desiredLength | The desired legth of the new, padded string. |
- Returns
- The padded string.
◆ padRight:paddingCharacter:desiredLength:
| + (NSString *) padRight: |
|
(NSString *) |
originalString |
| paddingCharacter: |
|
(char) |
paddingCharacter |
| desiredLength: |
|
(int) |
desiredLength |
|
|
| |
Pad a string on the left to a desired length with a character of choice.
- Parameters
-
| originalString | The original string to be padded. |
| paddingCharacter | The character the string is to be padded with. |
| desiredLength | The desired legth of the new, padded string. |
- Returns
- The padded string.
◆ processSignature:error:
| + (UIImage *) processSignature: |
|
(UIImage *) |
signatureImage |
| error: |
|
(NSString **) |
error |
|
|
| |
Validate and resize a signature image.
Method can be called prior to calling ChipDnaMobile#continueSignatureVerification: to resize and validate a captured singature.
- Parameters
-
| signatureImage | Image of captured signature |
| error | If signature fails validation the error parameter will be filled with the error which occured. |
- Returns
- The validated resized image. If validation fails nil will be returned.
The documentation for this class was generated from the following file: