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

Stripe checkout fails when using a stored credit card number #16

Closed
milesegan opened this issue Sep 4, 2019 · 5 comments · Fixed by #17
Closed

Stripe checkout fails when using a stored credit card number #16

milesegan opened this issue Sep 4, 2019 · 5 comments · Fixed by #17

Comments

@milesegan
Copy link

We're using this gem to implement stripe checkout and it works fine the first time the user places an order. But on subsequent checkouts it fails if the user selects the "Use an existing card on file" option on the payments page. It looks to me like the gem expects the user to enter a credit card every time but maybe I'm misreading the code. We get this JS error in the console:

TypeError: element.data is not a function
enableElement (jquery_ujs.self-784a997f6726036b1993eb2217c9cb558e1cbb801c6da88105588c56f13b466a.js?body=1:383)
(anonymous) (payment:363)
setTimeout (async)
(anonymous) (payment:362)
Promise.then (async)
(anonymous) (payment:359)
dispatch (jquery3.self-e200ee796ef24add7054280d843a80de75392557bb4248241e870fac0914c0c1.js?body=1:5238)
elemData.handle (jquery3.self-e200ee796ef24add7054280d843a80de75392557bb4248241e870fac0914c0c1.js?body=1:5045)```
@kennyadsl
Copy link
Member

kennyadsl commented Sep 20, 2019

@milesegan are you using Stripe v2 or v3? With which Solidus version?

@milesegan
Copy link
Author

@kennyadsl We're using Solidus 2.9.1 with stripe v3.

@kennyadsl
Copy link
Member

I think I found the issue. Using v3, card checks are always executed, even when an existing card is selected. We should enable that JS, only when a user wants to add a new card. I plan to work on this during next week.

@milesegan
Copy link
Author

That's great. Thanks for looking into this!

@kennyadsl
Copy link
Member

Opened #17, which should fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants