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 gateway not generating Stripe token #299

Open
GarPit opened this issue Nov 20, 2017 · 0 comments
Open

Stripe gateway not generating Stripe token #299

GarPit opened this issue Nov 20, 2017 · 0 comments

Comments

@GarPit
Copy link

GarPit commented Nov 20, 2017

As a result, we'll get Sending credit card numbers directly to the Stripe API is generally unsafe.

So, the problem in JS.

We have this:

Spree.stripePaymentMethod = $('#payment_method_' + 3);

And later:

if Spree.stripePaymentMethod.is(':visible')

And last one returns false in Chrome console, when this payment method is actually visible and $('payment_method_3').is(':visible') returns true.

This is well-known jQuery problem/feature of selectors snapshots - https://stackoverflow.com/questions/11868899/how-can-i-refresh-a-stored-and-snapshotted-jquery-selector-variable

Maybe to store in Spree.stripePaymentMethod just a selector string, not a snapshot?

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

No branches or pull requests

1 participant