Comments (4)
Hi Kevin,
We're sorry to hear that you're experiencing issues with our SDK. We can see from our end that for your app you are using our SDK in headless mode and which errors are being raised, those being phone_number_invalid
, phone_number_length_invalid
and cvv_invalid
.
Frames.NetworkError error 0
is a validation error returned from our backend. Note that in headless mode we currently do not validate input data before making the token request. We recommend these steps to avoid these errors in future:
Phone number validation
The tokens API has strict limits on phone number lengths. Please see here
We use PhoneNumberKit to validate phone numbers on our prebuilt UI, but only basic validation is required.
CVV Validation
We recommend using Frames.CardUtils.isValid(cvv: String, cardType: CardType)
to validate CVVs before making calls to Frames.CheckoutAPIClient.createCardToken()
.
Reading errors after token request
It is also possible to react to errors returned from our SDK and prompt the user to fix invalid fields. Please see below:
checkoutApiClient.createCardToken(card: card) { result in
if case .failure(.checkout(_, _, let errorCodes)) = result {
for errorCode in errorCodes {
switch errorCode {
case "card_number_invalid":
// handle error
case "cvv_invalid":
// handle error
case "card_expired":
// handle error
case "payment_method_invalid":
// handle error
case "card_expiry_year_invalid":
// handle error
case "request_json_invalid":
// handle error
case "card_expiry_year_required":
// handle error
case "card_expiry_month_invalid":
// handle error
case "phone_number_invalid":
// handle error
case "phone_number_length_invalid":
// handle error
default:
continue
}
}
}
}
from frames-ios.
Thank you for your prompt response Harry. We'll update our implementation based on your response and extend our error logging.
from frames-ios.
Hi @kevinpalser, please let us know if you need more support. Thanks
from frames-ios.
Hi @kevinpalser - closing this now, but please do let us know if there's anything else we can do to help.
from frames-ios.
Related Issues (20)
- ThreedsWebViewControllerDelegate not called HOT 1
- Frames Cocoapod integration is broken from 4.0.2 HOT 5
- merchant certificate not found HOT 4
- Localisation UI issue in TextField Alignment HOT 7
- Back Button and Accepted Cards not showing on TestFlight Build HOT 5
- Does headless mode have been removed in 4.0 ? HOT 4
- Support of alternative payment methods HOT 1
- Text color in Text fields isn't updated after changing Light/Dark mode HOT 4
- 3ds redirection not working HOT 2
- Remove Billing Info (name , address etc) from form.
- PhoneNumberKit dependency update HOT 5
- Expiry date textfield doesn't append '/' which lead to invalid date format error - Frames 4.0.4, Xcode 14.3 HOT 2
- Expiry date textfield doesn't append '/' which lead to invalid date format error - Frames 4.0.4, Xcode 14.3 HOT 1
- Users can submit the Pay button twice before 3DS view pops up HOT 4
- Support for app extension HOT 7
- Crash when use payment view HOT 15
- Problem with customisation. HOT 18
- Payment page alignment or text based on language switching is not updating HOT 6
- apple pay token got card_expired error HOT 1
- Crash with Apple Pay and version 4.3.3 of Frames and 2.0.3 of Risk SDKs HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frames-ios.