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

Javascript error doesn't show in interface #250

Open
normancates opened this issue Mar 6, 2018 · 2 comments
Open

Javascript error doesn't show in interface #250

normancates opened this issue Mar 6, 2018 · 2 comments

Comments

@normancates
Copy link

I was having problems with getting this extension to work.

The submit button was failing to work. It just did nothing.

Eventually I found a Javascript error in the Chrome Developer Tools console.

This error was about having spaces in the API key.

My API key had managed to get spaces in it, presumably when I copied it from the Stripe interface. I didn't see the spaces because the text is obfuscated like a password.

If that error had popped up somewhere I could have seen it, it would have saved me a lot of time.

Ultimately, it would be really helpful if such errors were reported to the user. Possibly only when CiviCRM debug mode is on.

Not sure if that problem is on the Stripe JS end...?

Thanks,
Norm

@h-c-c
Copy link
Collaborator

h-c-c commented Mar 7, 2018

At it's core, I feel this error has to do with sanitizing input. Spaces should be striped out. If I understand it correctly, that is a CiviCRM issue, because it's Civi code that accepts the api key when a new pay processor is added, not the extension.

I personally have seen Stripe errors displayed to me, so that's a mystery why you weren't shown an "incorrect api key" error. I just tried mangling my test keys and unfortunately test transactions still work. I'll have to test on a live transaction later on.

@normancates
Copy link
Author

Absolutely, sanitising the data would be helpful. But yeah, if there's other errors that never get shown to the user, then that's still a problem.

Of course, it may just be a problem on my end for some reason. I haven't suppressed JS errors deliberately... But yeah, if other people get the errors popping up, then maybe the problem is on my end...

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

2 participants