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

JS code is causing civicrm event signup to throw no token error #89

Open
randomseb opened this issue Jun 27, 2015 · 2 comments
Open

JS code is causing civicrm event signup to throw no token error #89

randomseb opened this issue Jun 27, 2015 · 2 comments

Comments

@randomseb
Copy link

After some debugging as to why I kept getting no token errors, I found the culprit code in the civicrm_stripe.js - I have added the debug alerts below, and even though there were indeed pricesets the code would still return true here thus skipping the whole token generation.

alert("DEBUG: no priceset?");
if ($form.find("#priceset input[type='radio']:checked").data('amount') == 0) {
alert("DEBUG: why is there no priceset?");
return true;
}

Commenting out this return caused the code to work as expected and a token was generated and passed on.

It's worth noting that I have several price items and the last item is 0$ so perhaps the JS above is triggering on that item and so needs to be a bit more discerning?

Next on my list to debug is how come it is taking several minutes to respond to the stripe.com communication at the end of the signup process (I may have caused a loop with my debugging.. oops)

@mattwire
Copy link
Contributor

mattwire commented Sep 3, 2015

Duplicate of #76?

@randomseb
Copy link
Author

Why yes, most likely it is.. Also of note the dev version was causing a similar issue but the code was different - but it still had trouble with the 3 pricesets per event I had, build more or less like this:

  • room type (multiple choice with a value)
  • optional component (add on)
  • teacher fee (sometimes has a value, sometimes is 0$, which seems to be what triggers the "return true" in the code I pasted in the first post)

As for the loop condition I mentioned at the end of the post, that was the receipt pdf generation code of the base modules memory leaking out, and not related to stripe

scardinius pushed a commit to WeMoveEU/com.drastikbydesign.stripe that referenced this issue Sep 25, 2019
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