#import <WPConfig.h>
The configuration object used for initializing a WePay instance.
◆ initWithClientId:environment:()
- (instancetype) initWithClientId: |
|
(NSString *) |
clientId |
environment: |
|
(NSString *) |
environment |
|
|
| |
A convenience initializer
- Parameters
-
clientId | Your WePay clientId. |
environment | The environment to be used, one of (kWPEnvironmentStage, kWPEnvironmentProduction). |
- Returns
- A WPConfig instance which can be used to initialize a WePay instance.
◆ initWithClientId:environment:useLocation:useTestEMVCards:callDelegateMethodsOnMainThread:restartTransactionAfterSuccess:restartTransactionAfterGeneralError:restartTransactionAfterOtherErrors:stopCardReaderAfterOperation:logLevel:()
- (instancetype) initWithClientId: |
|
(NSString *) |
clientId |
environment: |
|
(NSString *) |
environment |
useLocation: |
|
(BOOL) |
useLocation |
useTestEMVCards: |
|
(BOOL) |
useTestEMVCards |
callDelegateMethodsOnMainThread: |
|
(BOOL) |
callDelegateMethodsOnMainThread |
restartTransactionAfterSuccess: |
|
(BOOL) |
restartTransactionAfterSuccess |
restartTransactionAfterGeneralError: |
|
(BOOL) |
restartTransactionAfterGeneralError |
restartTransactionAfterOtherErrors: |
|
(BOOL) |
restartTransactionAfterOtherErrors |
stopCardReaderAfterOperation: |
|
(BOOL) |
stopCardReaderAfterOperation |
logLevel: |
|
(NSString *) |
logLevel |
|
|
| |
The designated initializer
- Parameters
-
clientId | Your WePay clientId. |
environment | The environment to be used, one of (kWPEnvironmentStage, kWPEnvironmentProduction). |
useLocation | Flag to determine if we should use location services. |
useTestEMVCards | Flag to determine if we should use test EMV cards. |
callDelegateMethodsOnMainThread | Flag to determine if delegate methods should be called on the main(UI) thread. |
restartTransactionAfterSuccess | Flag to determine if the transaction should automatically restart after a successful read. |
restartTransactionAfterGeneralError | Flag to determine if the transaction should automatically restart after a general error (domain:kWPErrorCategoryCardReader, errorCode:WPErrorCardReaderGeneralError). |
restartTransactionAfterOtherErrors | Flag to determine if the transaction should automatically restart after an error other than general error. |
stopCardReaderAfterOperation | Flag to determine if the card reader should automatically stop after an operation is completed. |
- Returns
- A WPConfig instance which can be used to initialize a WePay instance.
◆ callDelegateMethodsOnMainThread
- (BOOL) callDelegateMethodsOnMainThread |
|
readwritenonatomicassign |
Determines if delegate methods should be called on the main(UI) thread. If set to NO, delegate methods will be called on a new background thread. Defaults to YES.
◆ clientId
Your WePay clientId for the specified environment
◆ environment
- (NSString*) environment |
|
readnonatomicstrong |
The environment to be used, one of (staging, production)
◆ logLevel
The log level to be used, one of (all, none). Defaults to kWPLogLevelAll.
◆ mockConfig
The configuration for using mock card reader and/or mock WepayClient implementation
◆ restartTransactionAfterGeneralError
- (BOOL) restartTransactionAfterGeneralError |
|
readwritenonatomicassign |
Determines if the transaction should automatically restart after a swipe/dip general error (domain:kWPErrorCategoryCardReader, errorCode:WPErrorCardReaderGeneralError). Defaults to YES.
◆ restartTransactionAfterOtherErrors
- (BOOL) restartTransactionAfterOtherErrors |
|
readwritenonatomicassign |
Determines if the transaction should automatically restart after a swipe/dip error other than general error. Defaults to NO.
◆ restartTransactionAfterSuccess
- (BOOL) restartTransactionAfterSuccess |
|
readwritenonatomicassign |
Determines if the transaction should automatically restart after a successful swipe. The transaction is not restarted after a successful dip. Defaults to NO.
◆ stopCardReaderAfterOperation
- (BOOL) stopCardReaderAfterOperation |
|
readwritenonatomicassign |
Determines if the card reader should automatically stop after an operation is completed. Defaults to YES.
◆ useLocation
Determines if we should use location services. Defaults to NO.
◆ useTestEMVCards
Determines if the card reader should accept test EMV cards. Defaults to NO. This should never be turned on in production.
The documentation for this class was generated from the following file: