WePay iOS SDK  3.0.0
 All Classes Files Functions Variables Enumerations Enumerator Properties Macros
WPError.h
Go to the documentation of this file.
1 //
2 // WPError.h
3 // WePay
4 //
5 // Created by Chaitanya Bagaria on 12/22/14.
6 // Copyright (c) 2014 WePay. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
27 #pragma mark - WPError constants.
28 
33 FOUNDATION_EXPORT NSString * const kWPErrorAPIDomain;
34 
39 FOUNDATION_EXPORT NSString * const kWPErrorSDKDomain;
40 
44 FOUNDATION_EXPORT NSString * const kWPErrorCategoryKey;
45 
49 FOUNDATION_EXPORT NSString * const kWPErrorCategoryNone;
50 
54 FOUNDATION_EXPORT NSString * const kWPErrorCategoryCardReader;
55 
56 #pragma mark - Error Codes.
57 
62 typedef enum WPErrorCode {
66  WPErrorUnknown = -10000,
67 
68  // -10001 to -10014 are reserved for legacy error codes
69 
74 
79 
84 
89 
94 
99 
104 
105 } WPErrorCode;
106 
107 #pragma mark - User facing messages.
108 
112 #define WPUnexpectedErrorMessage NSLocalizedStringFromTable(@"There was an unexpected error.", @"WePay", @"There was an unexpected error.");
113 
117 #define WPNoDataReturnedErrorMessage NSLocalizedStringFromTable(@"There was no data returned.", @"WePay", @"There was no data returned.");
118 
122 #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.");
123 
127 #define WPCardReaderInitializationErrorMessage NSLocalizedStringFromTable(@"Failed to initialize card reader.", @"WePay", @"Failed to initialize card reader.");
128 
132 #define WPCardReaderTimeoutErrorMessage NSLocalizedStringFromTable(@"Card reader timed out.", @"WePay", @"Card reader timed out.");
133 
137 #define WPSignatureInvalidImageErrorMessage NSLocalizedStringFromTable(@"Inavlid signature image provided.", @"WePay", @"Inavlid signature image provided.");
138 
142 #define WPNameNotFoundErrorMessage NSLocalizedStringFromTable(@"Name not found.", @"WePay", @"Name not found.");
Definition: WPError.h:78
Definition: WPError.h:98
Definition: WPError.h:93
FOUNDATION_EXPORT NSString *const kWPErrorSDKDomain
Definition: WPError.h:39
Definition: WPError.h:73
Definition: WPError.h:88
Definition: WPError.h:66
FOUNDATION_EXPORT NSString *const kWPErrorCategoryNone
Definition: WPError.h:49
FOUNDATION_EXPORT NSString *const kWPErrorCategoryKey
Definition: WPError.h:44
Definition: WPError.h:83
FOUNDATION_EXPORT NSString *const kWPErrorAPIDomain
Definition: WPError.h:33
FOUNDATION_EXPORT NSString *const kWPErrorCategoryCardReader
Definition: WPError.h:54
Definition: WPError.h:103
WPErrorCode
Definition: WPError.h:62