Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty Card Number produce a null is not an object error #20

Open
dani-z opened this issue Nov 15, 2022 · 0 comments
Open

Empty Card Number produce a null is not an object error #20

dani-z opened this issue Nov 15, 2022 · 0 comments

Comments

@dani-z
Copy link
Contributor

dani-z commented Nov 15, 2022

Hi everyone,

We are integrating with Checkout.com using This Frames SDK and noticed that, when I am not adding any card number and tapping the Pay button I am seeing the error below.

 INFO  Emitting "cardTokenizationFailed" [TypeError: null is not an object (evaluating 'state.cardNumber.replace')]

On a quick glance at the code, most probably val here is null / undefined so replace will fail.
https://github.com/checkout/frames-react-native/blob/main/src/components/CardNumber.tsx#L29

An easy guard there should fix the issue.

LE: it is actually happening for Expire date as well

 INFO  Emitting "cardTokenizationFailed" [TypeError: null is not an object (evaluating 'state.expiryDate.split')]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant