WePay iOS SDK  7.0.0-prerelease-1
WPConfig Class Reference

#import <WPConfig.h>

Inheritance diagram for WPConfig:

Instance Methods

(instancetype) - initWithClientId:environment:
 
(instancetype) - initWithClientId:environment:useLocation:useTestEMVCards:callDelegateMethodsOnMainThread:restartTransactionAfterSuccess:restartTransactionAfterGeneralError:restartTransactionAfterOtherErrors:stopCardReaderAfterOperation:logLevel:
 

Properties

NSString * clientId
 
NSString * environment
 
BOOL useLocation
 
BOOL useTestEMVCards
 
BOOL callDelegateMethodsOnMainThread
 
BOOL restartTransactionAfterSuccess
 
BOOL restartTransactionAfterGeneralError
 
BOOL restartTransactionAfterOtherErrors
 
BOOL stopCardReaderAfterOperation
 
NSString * logLevel
 
WPMockConfigmockConfig
 

Detailed Description

The configuration object used for initializing a WePay instance.

Method Documentation

◆ initWithClientId:environment:()

- (instancetype) initWithClientId: (NSString *)  clientId
environment: (NSString *)  environment 

A convenience initializer

Parameters
clientIdYour WePay clientId.
environmentThe 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
clientIdYour WePay clientId.
environmentThe environment to be used, one of (kWPEnvironmentStage, kWPEnvironmentProduction).
useLocationFlag to determine if we should use location services.
useTestEMVCardsFlag to determine if we should use test EMV cards.
callDelegateMethodsOnMainThreadFlag to determine if delegate methods should be called on the main(UI) thread.
restartTransactionAfterSuccessFlag to determine if the transaction should automatically restart after a successful read.
restartTransactionAfterGeneralErrorFlag to determine if the transaction should automatically restart after a general error (domain:kWPErrorCategoryCardReader, errorCode:WPErrorCardReaderGeneralError).
restartTransactionAfterOtherErrorsFlag to determine if the transaction should automatically restart after an error other than general error.
stopCardReaderAfterOperationFlag 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.

Property Documentation

◆ 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

- (NSString*) clientId
readnonatomicstrong

Your WePay clientId for the specified environment

◆ environment

- (NSString*) environment
readnonatomicstrong

The environment to be used, one of (staging, production)

◆ logLevel

- (NSString*) logLevel
readwritenonatomicstrong

The log level to be used, one of (all, none). Defaults to kWPLogLevelAll.

◆ mockConfig

- (WPMockConfig*) mockConfig
readwritenonatomicstrong

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

- (BOOL) useLocation
readwritenonatomicassign

Determines if we should use location services. Defaults to NO.

◆ useTestEMVCards

- (BOOL) useTestEMVCards
readwritenonatomicassign

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: