You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The correct way to define PMErrorType would be to use NS_ENUM macro like this:
typedefNS_ENUM(NSInteger, PMErrorType)
{
UNKNOWN=0, /*Initial value*/WRONG_PARMETERS=1, /*You have supplied wrong parameters. You use message for details.*/HTTP_CONNECTION=2, /*There was an error while connecting to the PayMill Service.*/API=3, /*The PAYMILL API returned an unexpected result.*/SAFESTORE=4, /*The PAYMILL safe store returned an error. Check the PMSafeStoreErrorCodeKey in the user info dictionary for the specific error. */BRIDGE=5, /*The PAYMILL JS-Bridge returned an a payment method related error code. Check the PMBridgeErrorCodeKey in the user info dictionary for the specific error. */NOT_INIT=6, /*You did not initialize the SDK.*/INTERNAL=7, /*This should never happen. If you encounter it, please send email [email protected] .*/
};
Because
enum PMErrorType
is defined in a very oldschool way, it's not being correctly exposed to Swift and can't be used in aswitch
statement.The correct way to define
PMErrorType
would be to useNS_ENUM
macro like this:More info on
NS_ENUM
macro and Swift/ObjC interoperability: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithCAPIs.htmlThe text was updated successfully, but these errors were encountered: