WePay iOS SDK
3.0.0
|
WPError.h serves as documentation for all errors surfaced by the WePay iOS SDK. More...
#import <Foundation/Foundation.h>
Go to the source code of this file.
Macros | |
#define | WPUnexpectedErrorMessage NSLocalizedStringFromTable(@"There was an unexpected error.", @"WePay", @"There was an unexpected error."); |
#define | WPNoDataReturnedErrorMessage NSLocalizedStringFromTable(@"There was no data returned.", @"WePay", @"There was no data returned."); |
#define | WPCardReaderGeneralErrorMessage NSLocalizedStringFromTable(@"Swipe failed due to: (a) uneven swipe speed, (b) fast swipe, (c) slow swipe, or (d) damaged card.", @"WePay", @"Swipe failed due to: (a) uneven swipe speed, (b) fast swipe, (c) slow swipe, or (d) damaged card."); |
#define | WPCardReaderInitializationErrorMessage NSLocalizedStringFromTable(@"Failed to initialize card reader.", @"WePay", @"Failed to initialize card reader."); |
#define | WPCardReaderTimeoutErrorMessage NSLocalizedStringFromTable(@"Card reader timed out.", @"WePay", @"Card reader timed out."); |
#define | WPSignatureInvalidImageErrorMessage NSLocalizedStringFromTable(@"Inavlid signature image provided.", @"WePay", @"Inavlid signature image provided."); |
#define | WPNameNotFoundErrorMessage NSLocalizedStringFromTable(@"Name not found.", @"WePay", @"Name not found."); |
Enumerations | |
enum | WPErrorCode { WPErrorUnknown = -10000, WPErrorNoDataReturned = -10015, WPErrorCardReaderGeneralError = -10016, WPErrorCardReaderInitialization = -10017, WPErrorCardReaderTimeout = -10018, WPErrorCardReaderStatusError = -10019, WPErrorInvalidSignatureImage = -10020, WPErrorNameNotFound = -10021 } |
Variables | |
FOUNDATION_EXPORT NSString *const | kWPErrorAPIDomain |
FOUNDATION_EXPORT NSString *const | kWPErrorSDKDomain |
FOUNDATION_EXPORT NSString *const | kWPErrorCategoryKey |
FOUNDATION_EXPORT NSString *const | kWPErrorCategoryNone |
FOUNDATION_EXPORT NSString *const | kWPErrorCategoryCardReader |
enum WPErrorCode | WPErrorCode |
WPError.h serves as documentation for all errors surfaced by the WePay iOS SDK.
When errors occur, the WePay iOS SDK returns NSError instances to delegate methods. Each error instance has the following components:
The WePay iOS SDK can return errors in various error domains:
See the WPErrorCode section for more details about error codes.
#define WPCardReaderGeneralErrorMessage NSLocalizedStringFromTable(@"Swipe failed due to: (a) uneven swipe speed, (b) fast swipe, (c) slow swipe, or (d) damaged card.", @"WePay", @"Swipe failed due to: (a) uneven swipe speed, (b) fast swipe, (c) slow swipe, or (d) damaged card."); |
The localizable user facing message for WPErrorCardReaderGeneralError, that can be retrieved by calling [error localizedDescription].
#define WPCardReaderInitializationErrorMessage NSLocalizedStringFromTable(@"Failed to initialize card reader.", @"WePay", @"Failed to initialize card reader."); |
The localizable user facing message for WPErrorCardReaderInitialization, that can be retrieved by calling [error localizedDescription].
#define WPCardReaderTimeoutErrorMessage NSLocalizedStringFromTable(@"Card reader timed out.", @"WePay", @"Card reader timed out."); |
The localizable user facing message for WPErrorCardReaderTimeout, that can be retrieved by calling [error localizedDescription].
#define WPNameNotFoundErrorMessage NSLocalizedStringFromTable(@"Name not found.", @"WePay", @"Name not found."); |
The localizable user facing message for WPErrorNameNotFound, that can be retrieved by calling [error localizedDescription].
#define WPNoDataReturnedErrorMessage NSLocalizedStringFromTable(@"There was no data returned.", @"WePay", @"There was no data returned."); |
The localizable user facing message for WPErrorNoDataReturned, that can be retrieved by calling [error localizedDescription].
#define WPSignatureInvalidImageErrorMessage NSLocalizedStringFromTable(@"Inavlid signature image provided.", @"WePay", @"Inavlid signature image provided."); |
The localizable user facing message for WPErrorInavlidSignatureImage, that can be retrieved by calling [error localizedDescription].
#define WPUnexpectedErrorMessage NSLocalizedStringFromTable(@"There was an unexpected error.", @"WePay", @"There was an unexpected error."); |
The localizable user facing message for WPErrorUnknown, that can be retrieved by calling [error localizedDescription].
enum WPErrorCode |
Error codes for NSErrors surfaced by the WePay iOS SDK in the kWPErrorSDKDomain. For a full list of error codes in the kWPErrorAPIDomain, visit https://www.wepay.com/developer/reference/errors
FOUNDATION_EXPORT NSString* const kWPErrorAPIDomain |
The NSError domain of all errors surfaced by the WePay iOS SDK that were returned by the WePay API. For a full list of error codes in the kWPErrorAPIDomain, visit https://www.wepay.com/developer/reference/errors
FOUNDATION_EXPORT NSString* const kWPErrorCategoryCardReader |
The value used in the NSError's userInfo dictionary to return the "card reader" error category.
FOUNDATION_EXPORT NSString* const kWPErrorCategoryKey |
The key used in the NSError's userInfo dictionary to return the error category.
FOUNDATION_EXPORT NSString* const kWPErrorCategoryNone |
The value used in the NSError's userInfo dictionary to return the "none" error category.
FOUNDATION_EXPORT NSString* const kWPErrorSDKDomain |
The NSError domain of all errors returned by the WePay iOS SDK itself. For a full list of error codes in the kWPErrorSDKDomain, look at WPErrorCode.