WePay iOS SDK
7.0.0-prerelease-1
|
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."); |
#define | WPInvalidCardDataErrorMessage NSLocalizedStringFromTable(@"Invalid card data.", @"WePay", @"Invalid card data."); |
#define | WPCardNotSupportedErrorMessage NSLocalizedStringFromTable(@"This card is not supported.", @"WePay", @"This card is not supported."); |
#define | WPInvalidApplicationIdErrorMessage NSLocalizedStringFromTable(@"Invalid application ID selected.", @"WePay", @"Invalid application ID selected."); |
#define | WPDeclinedByCardErrorMessage NSLocalizedStringFromTable(@"The transaction was declined by the card.", @"WePay", @"The transaction was declined by the card."); |
#define | WPCardBlockedErrorMessage NSLocalizedStringFromTable(@"This card has been blocked.", @"WePay", @"This card has been blocked."); |
#define | WPDeclinedByIssuerErrorMessage NSLocalizedStringFromTable(@"The transaction was declined by the issuer bank.", @"WePay", @"The transaction was declined by the issuer bank."); |
#define | WPIssuerUnreachableErrorMessage NSLocalizedStringFromTable(@"The issuing bank could not be reached.", @"WePay", @"The issuing bank could not be reached."); |
#define | WPInvalidAuthInfoErrorMessage NSLocalizedStringFromTable(@"The provided auth info is invalid.", @"WePay", @"The provided auth info is invalid."); |
#define | WPAuthInfoNotProvidedErrorMessage NSLocalizedStringFromTable(@"Auth info was not provided.", @"WePay", @"Auth info was not provided."); |
#define | WPPaymentMethodCannotBeTokenizedErrorMessage NSLocalizedStringFromTable(@"This payment method cannot be tokenized.", @"WePay", @"This payment method cannot be tokenized."); |
#define | WPFailedToGetBatteryLevelErrorMessage NSLocalizedStringFromTable(@"Battery level could not be determined.", @"WePay", @"Battery level could not be determined."); |
#define | WPCardReaderNotConnectedErrorMessage NSLocalizedStringFromTable(@"Card reader is not connected.", @"WePay", @"Card reader is not connected."); |
#define | WPCardReaderModelNotSupportedErrorMessage NSLocalizedStringFromTable(@"This card reader model is not supported.", @"WePay", @"This card reader model is not supported."); |
#define | WPErrorInvalidTransactionAmountErrorMessage NSLocalizedStringFromTable(@"The provided transaction amount is invalid.", @"WePay", @"The provided transaction amount is invalid."); |
#define | WPErrorInvalidTransactionCurrencyCodeErrorMessage NSLocalizedStringFromTable(@"The provided currency code is invalid.", @"WePay", @"The provided currency code is invalid."); |
#define | WPErrorInvalidTransactionAccountIDErrorMessage NSLocalizedStringFromTable(@"The provided account ID is invalid.", @"WePay", @"The provided account ID is invalid."); |
#define | WPErrorInvalidCardReaderSelectionErrorMessage NSLocalizedStringFromTable(@"Card reader selection is invalid.", @"WePay", @"Card reader selection is invalid."); |
#define | WPErrorCardReaderBatteryTooLowErrorMessage NSLocalizedStringFromTable(@"The card reader battery does not have enough charge. Please charge before using.", @"WePay", @"The card reader battery does not have enough charge. Please charge before using."); |
#define | WPErrorCardReaderUnableToConnectErrorMessage NSLocalizedStringFromTable(@"Please make sure you’re using a supported card reader and that it is fully charged.", @"WePay", @"Please make sure you’re using a supported card reader and that it is fully charged."); |
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 |
FOUNDATION_EXPORT NSString *const | kWPErrorCategoryCardSDK |
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 WPAuthInfoNotProvidedErrorMessage NSLocalizedStringFromTable(@"Auth info was not provided.", @"WePay", @"Auth info was not provided."); |
The localizable user facing message for WPErrorAuthInfoNotProvided, that can be retrieved by calling [error localizedDescription].
#define WPCardBlockedErrorMessage NSLocalizedStringFromTable(@"This card has been blocked.", @"WePay", @"This card has been blocked."); |
The localizable user facing message for WPErrorCardBlocked, that can be retrieved by calling [error localizedDescription].
#define WPCardNotSupportedErrorMessage NSLocalizedStringFromTable(@"This card is not supported.", @"WePay", @"This card is not supported."); |
The localizable user facing message for WPErrorCardNotSupported, that can be retrieved by calling [error localizedDescription].
#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 WPCardReaderModelNotSupportedErrorMessage NSLocalizedStringFromTable(@"This card reader model is not supported.", @"WePay", @"This card reader model is not supported."); |
The localizable user facing message for WPErrorCardReaderModelNotSupported, that can be retrieved by calling [error localizedDescription].
#define WPCardReaderNotConnectedErrorMessage NSLocalizedStringFromTable(@"Card reader is not connected.", @"WePay", @"Card reader is not connected."); |
The localizable user facing message for WPErrorCardReaderNotConnected, 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 WPDeclinedByCardErrorMessage NSLocalizedStringFromTable(@"The transaction was declined by the card.", @"WePay", @"The transaction was declined by the card."); |
The localizable user facing message for WPErrorDeclinedByCard, that can be retrieved by calling [error localizedDescription].
#define WPDeclinedByIssuerErrorMessage NSLocalizedStringFromTable(@"The transaction was declined by the issuer bank.", @"WePay", @"The transaction was declined by the issuer bank."); |
The localizable user facing message for WPErrorDeclinedByIssuer, that can be retrieved by calling [error localizedDescription].
#define WPErrorCardReaderBatteryTooLowErrorMessage NSLocalizedStringFromTable(@"The card reader battery does not have enough charge. Please charge before using.", @"WePay", @"The card reader battery does not have enough charge. Please charge before using."); |
The localizable user facing message for WPErrorCardReaderBatteryTooLow, that can be retrieved by calling [error localizedDescription].
#define WPErrorCardReaderUnableToConnectErrorMessage NSLocalizedStringFromTable(@"Please make sure you’re using a supported card reader and that it is fully charged.", @"WePay", @"Please make sure you’re using a supported card reader and that it is fully charged."); |
The localizable user facing message for WPErrorCardReaderUnsupportedOrBatteryTooLow, that can be retrieved by calling [error localizedDescription].
#define WPErrorInvalidCardReaderSelectionErrorMessage NSLocalizedStringFromTable(@"Card reader selection is invalid.", @"WePay", @"Card reader selection is invalid."); |
The localizable user facing message for WPErrorInvalidCardReaderSelection, that can be retrieved by calling [error localizedDescription].
#define WPErrorInvalidTransactionAccountIDErrorMessage NSLocalizedStringFromTable(@"The provided account ID is invalid.", @"WePay", @"The provided account ID is invalid."); |
The localizable user facing message for WPErrorInvalidTransactionAccountID, that can be retrieved by calling [error localizedDescription].
#define WPErrorInvalidTransactionAmountErrorMessage NSLocalizedStringFromTable(@"The provided transaction amount is invalid.", @"WePay", @"The provided transaction amount is invalid."); |
The localizable user facing message for WPErrorInvalidTransactionAmount, that can be retrieved by calling [error localizedDescription].
#define WPErrorInvalidTransactionCurrencyCodeErrorMessage NSLocalizedStringFromTable(@"The provided currency code is invalid.", @"WePay", @"The provided currency code is invalid."); |
The localizable user facing message for WPErrorInvalidTransactionCurrencyCode, that can be retrieved by calling [error localizedDescription].
#define WPFailedToGetBatteryLevelErrorMessage NSLocalizedStringFromTable(@"Battery level could not be determined.", @"WePay", @"Battery level could not be determined."); |
The localizable user facing message for WPErrorFailedToGetBatteryLevel, that can be retrieved by calling [error localizedDescription].
#define WPInvalidApplicationIdErrorMessage NSLocalizedStringFromTable(@"Invalid application ID selected.", @"WePay", @"Invalid application ID selected."); |
The localizable user facing message for WPErrorInvalidApplicationId, that can be retrieved by calling [error localizedDescription].
#define WPInvalidAuthInfoErrorMessage NSLocalizedStringFromTable(@"The provided auth info is invalid.", @"WePay", @"The provided auth info is invalid."); |
The localizable user facing message for WPErrorInvalidAuthInfo, that can be retrieved by calling [error localizedDescription].
#define WPInvalidCardDataErrorMessage NSLocalizedStringFromTable(@"Invalid card data.", @"WePay", @"Invalid card data."); |
The localizable user facing message for WPErrorInvalidCardData, that can be retrieved by calling [error localizedDescription].
#define WPIssuerUnreachableErrorMessage NSLocalizedStringFromTable(@"The issuing bank could not be reached.", @"WePay", @"The issuing bank could not be reached."); |
The localizable user facing message for WPErrorIssuerUnreachable, 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 WPPaymentMethodCannotBeTokenizedErrorMessage NSLocalizedStringFromTable(@"This payment method cannot be tokenized.", @"WePay", @"This payment method cannot be tokenized."); |
The localizable user facing message for WPErrorPaymentMethodCannotBeTokenized, 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 kWPErrorCategoryCardSDK |
The value used in the NSError's userInfo dictionary to return the "sdk" 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.