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 following three methods are crashing out when run on iOS. I do not get an error. Calling these functions cause iOS to crash.
validateCardNumber
validateCVC
validateExpiryDate
Here is my ionic info:
cli packages: (/Users/leetcat/.nvm/versions/node/v9.8.0/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 1.3.0
Cordova Platforms : android 7.0.0 browser 4.1.0 ios 4.4.0
Ionic Framework : ionic-angular 3.0.1
System:
ios-deploy : 1.9.2
Node : v9.8.0
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Misc:
backend : pro
I made sure to to make each validation function a knock on and instead used "Await", so I could log any errors between each method. What happens is that it successfully goes through the card number and expiry validation methods, but fails at the CVC validation method.
The highlighted code in Xcode is STPCardValidationState state = [STPCardValidator validationStateForCVC:[command.arguments objectAtIndex:0] cardBrand:STPCardBrandUnknown];
The error being logged is [NSNull rangeOfCharacterFromSet:]: unrecognized selector sent to instance 0x1dd96d9d0
When you check out the Stripe docs I can see that their method for validating the CVC actually takes in both CVC number "cvc" and the card brand "brand". Apparently the brand has another method for finding it, called brandForNumber.
Problematically, this error is occurring regardless of the validity of card details entered. My theory is the the issue is something to do with the card brand not being passed as a parameter correctly. Perhaps exposing the brandForNumber method and making the user pass in the brand as an argument may help to stop this issue?
The following three methods are crashing out when run on iOS. I do not get an error. Calling these functions cause iOS to crash.
validateCardNumber
validateCVC
validateExpiryDate
Here is my ionic info:
I call the methods like this:
The text was updated successfully, but these errors were encountered: