You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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
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)
The text was updated successfully, but these errors were encountered: