-
Notifications
You must be signed in to change notification settings - Fork 48
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
Error: Stripe.js token was not passed! Report this message to the site administrator.(ext ver. 1.9.1) #76
Comments
Same issue for me I'm afraid. CiviCRM 4.5.6 |
@andywozhere Before you submit the form, do you see any errors in your browser's JS console? If you're using Chrome, be sure to check 'Preserve Log' so the console doesn't clear out after each each page load. I'm sure there's an equivalent in all the others.... |
@Swingline0 Yes there are a few Javascript errors. It looks like it is omething to do with JQuery. Errors as follow: Two errors on Common.js line 196 // Theme classes for unattached elements
$.fn.select2.defaults.dropdownCssClass = $.ui.dialog.prototype.options.dialogClass = 'crm-container';
us function) (anonymous function) error on Common.js line 1077 })(jQuery, _); Also : Two errors on en_GB.js line 14 CRM.formatMoney('init', "\u20ac 1,234.56"); (anonymous function) error on en_GB.js line 73 })(jQuery); |
@Swingline0 Sorry those were after I submitted the form. Before I submitted the form I am told that the file at /wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/js/civicrm_stripe.js?r=GoZZa cannot be found. |
And presumably that file does exist on that path in your install? |
@Upperholme yep |
@Upperholme @Swingline0 Solved (for me anyway). Incorrect resource URL. For me the resource URL was /wp-content/plugins/files/civicrm/custom_ext |
@andywozhere Thanks for the update! Is this where CiviCRM puts extensions by default in WP? Or is that a directory you set up? |
@drastik You have to set it up there, but it is the folder recommended on http://wiki.civicrm.org/confluence/display/CRMDOC/Extensions. One concern I had was that the URL is written to https://domain.org//wp-content/plugins/files/civicrm/custom_ext which doesn't feel quite right... but it seems to work anyway! |
@andywozhere Right, yes it gets re-written with domain name in there. You can fix it now, (removing the extra /) I've seen some versions of Civi are doing this. |
I'm getting this too, trying to troubleshoot. I'm using: No Javascript errors, I fill out the form and I see the variable being passed from the form:
I don't see any XHR requests going to stripe at all, this is likely the problem. The create customer api call, or whatever this plugin is using isn't working. I'll keep troubleshooting, I'll update here if I find out anything interesting. |
Did some more in depth debugging - It appears in chrome at least, if you also enable the pay by check option in your contribution form the detection of whether you're paying by credit card or not isn't working. This part in particular:
My quick fix was to disable pay by check, since we don't need that right away, but I'll work on a pull request to update this code to make it work. Hope this helps! |
Same issue for me on :
I get the error in two circumstances:
No errors appear in the Javascript console. I was testing in Chrome as well. Thanks @MicahStevens for your suggested quick fix. I took the route of for now disabling pay later and PayPal. Long term that won't work for us unfortunately. |
Same issue here, on:
I get the error on one contrib page, but not on another. The differences that I can see are:
I don't know if any of these are a clue to what's causing the problem. No JS errors in the browser console. (Firefox) Both pages are error-free with extension version 1.7. I was testing the newer version out of the hope that it would help us with recurring contributions, which have been a problem. |
I can confirm the same on a new install from the zip file Github provides (extension 4.6-dev, listed in info.xml as v.1.9.1), on Drupal 7.36 with CiviCRM 4.6.3. (With or without the confirmation page, the same result -- only the error appears after the confirmation page is submitted if that page is enabled, otherwise immediately upon contribution page form submission). The key factor seems to be the Pay Later option (it works if it is not enabled). I have not tested with a second payment processor option. |
Unfortunately the Pay Later option does not seem to be the culprit in my
case.
|
I've been having the same issue. As long as the "pay later" option is enabled, it's throwing the "Stripe.js token was not passed!" error. Once I removed that option, Stripe processed a live payment just fine. Wordpress 4.2.2 |
I'm having the same issue as well. I turned off the Pay Later option, which prevents the error from appearing but also does not process the contribution (just refreshes the page with a blank form, or, if Confirmation Page is enabled, returns user back to the blank form). Wordpress 4.2.2 EDIT: |
I get this issue, drupal 7.39, civicrm 4.6.8. No other payment processors enabled, no pay later. |
We had the same issues as described above, Drupal 7.39, CiviCRM 4.6.8, pay_later enabled. Our "hotfix" #97 patching civicrm_stripe.js did the trick, STRIPE's working perfectly now. I am, however, not quite sure what this bit of code was intended for in the first place. |
Same issue - drupal 7.39, civicrm 4.6.8 pay later enabled. The pull request in #97 did not work, but disabling pay later did work. |
Due to changes in CiviCRM you can no longer count on hidden_processor field being present. See https://issues.civicrm.org/jira/browse/CRM-15743
There seem to be a few different reasons why people are getting this error. For the "Pay Later" reason - I think i fixed it with this pull request: #99 CiviCRM has changed the availability of the hidden_processor field in 4.6 - so that would explain why it works in 4.5 and not in 4.6 (see https://issues.civicrm.org/jira/browse/CRM-15743) |
issue #76: Handle pay later in civi 4.6 (remove hidden_processor check).
OK, So I am finally able to turn my attention back to this issue. My most recent testing has been that I am now not able to reproduce this issue. That said, I am not able to get Credit Card to be automagically selected either despite the fact that it is the default (and only) payment processor on our site but that is a separate issue. Peace - Anthony |
I've been following this thread for several months now. @h-c-c thanks for your work on this! I tried the latest 4.7-dev and I think it solved the problem of having more than one form of payment along with Stripe. I did run in to another issue, though. If Stripe is the only form of payment, and someone uses a 100% discount code (CiviDiscount), I get an error because Stripe expects payment info and of course the user isn't putting it in for $0. |
Thanks for the thanks, @peoute! And thanks for the report! I can reproduce this error. Wow, this beast needs e2e (end to end) unit tests so badly, to cover the many combinations and permutations of use cases. Also, I would have started a new issue for this since the actual error message doesn't at all resemble "Stripe.js token was not passed". A good issue title might be something like: "Contribution fails with 100% discount and only Stripe" |
We encountered this error on a contribution page (eg. civicrm/contribute/transact?id=543545) where there was also an unrelated webform in the sidebar. Both forms appear to have had stripe attached to them, but of course this caused an error where Stripe died since it could not be attached more than once. The result was the stripe-token was not populated and the user-facing error was the cryptic 'Stripe.js token not passed'. |
If you are still having trouble with stripe.js not passed please try my branch which fixes all known instances of this issue: https://github.com/mattwire/com.drastikbydesign.stripe/tree/4.7-mjwconsulting-dev-squashed If using with drupal webform_civicrm you also need to apply colemanw/webform_civicrm#100 |
@mattwire in your fork have you considered modal forms when viewing a contact (e.g. /civicrm/contact/view?reset=1&cid=31761)? The civicrm-stripe.js file doesn't get loaded because there's no payment processor available until someone clicks to add a membership/contribution. |
@herbdool I don't think I understand... You can use stripe with any of the backend "submit credit card payment" contribution functions for event, membership and contribution. Is there some other way you are trying to make a payment? |
@mattwire now that I've tested our patches again against 4.7.3 #219 (comment) I'm not having a problem with the modals. For the record, by modal here I mean that by default clicking "Submit credit card payment" will have a popup modal. And this is configurable in Civi settings so that you can also have it refresh for the form instead of showing the form in a modal. In my original testing it was working in the latter but not the former. |
@herbdool So I think that the "modals" work fine in my branch - did you find otherwise? |
@mattwire like I said above, I initially had problems but with our patches (as listed in the other thread) worked. Can't confirm with your current fork. We were trying to stay on the main extension but see what we could patch. You seem to have put a lot of work into your fork but too bad we haven't reconciled the two. |
is anyone running it on Joomla 3.8.8 / CiviCRM 5.1.2. ? Jun 03 22:11:05 [info] Stripe_Error create_customer: Array |
@hair-transplant Can you test the wordpress-dev branch of my fork: https://github.com/mattwire/com.drastikbydesign.stripe/tree/wordpress_dev - I've added a couple of fixes for wordpress, which may also fix the Joomla issues you were having. |
Took the fork and updated the following files: Did use test credit data from Stripe Error message: Logfile: Array One more thing: |
@hair-transplant Please can you paste a copy of all the debug that is printed in your browser console when you submit a payment and it fails? That will tell us where it is failing. Also, be REALLY sure that your browser is not using a cached version of any files (eg. civicrm_stripe.js) |
Okay, so I did log the console a) with code from 5.x.zip Couple of issues can be seen. Seems to be related to the event manager module, but difficult for me to interprete. |
@hair-transplant Thanks for the console log. That's exactly what I need. I will take a look at this in the next few days and get back to you hopefully with a fix. |
Its STRIPE "live key", Paypal , Stripe "test key" and "Pay later" option. |
@hair-transplant Please can you test the latest release 5.0.beta3 here: https://github.com/mattwire/com.drastikbydesign.stripe/releases/tag/5.0.beta3 I haven't specifically tried to fix your issue yet, but I did test on Joomla with contribution pages and that was working. If it still does not work for Joomla event pages let me know and I will look in more detail. |
Hi guys, I was getting the Old location: /wp-content/plugins/files/civicrm/ext Putting it out there in case it helps others. The extensions directory can be changed from Administer > System Settings > Directories. |
Having similar issue - the extensions directory was already in your 'new' location but found some instructions on a different branch that helped: Your CiviCRM 'Resource URLs' must be set to the extensions directory This fixed it for me. |
Thanks for these ideas -- I also already have the extensions in the new location (which is where they've always been for me), but I have two Stripe payment processors configured and I'm getting the resource missing error on one, but not the other. I'm attaching a screenshot of my settings -- the top "CiviCRM Resource URL" setting is set in a config file from back when I migrated things from a dev site to a production instance (just deleted the site URL). If I open up the help is tells me these are the expanded values: When I try to submit something from the CiviCRM admin using the payment processor that doesn't work, I get redirected to a 404: Here's the error in the CiviCRM logs: And here's the error I see on the Stripe side when I try to run a contribution through the payment processor that isn't working: Response body For what it's worth I did have the webhook URL incorrect when I first started testing this second payment processor but I fixed that several days ago. Just throwing that out there in case something is cached somewhere and I need to clear something out. |
Thanks for the suggestion -- changed to that and unfortunately same behavior. It didn't break the payment processor that works, but it didn't fix the one that doesn't. |
In my case the problem apparently was due to the fact that I was using an older Stripe API on the payment processor that wasn't working. Upgrading that fixed the token issue so now I just have a different issue to contend with that I think is related to the fact that I've been on alphas and betas of the Stripe extension as it's been getting updated. Thanks for all the help! |
Well, spoke too soon. I got a "DB error - already exists" error after upgrading the Stripe API, but once I removed my existing record from the civicrm_stripe_customers table I'm back to the no such token error and get routed to a 404 in WordPress after attempting to submit a contribution. I guess I'll triple-check everything between the payment processor that works and the one that doesn't. |
With the newest CiviCRM version of the module https://lab.civicrm.org/extensions/stripe.git, I found after upgrading that I would receive a similar error. I fixed it by dropping the triggers associated with the civicrm_stripe_customers table, as the entry would create but the trigger would fail. |
Thanks! I'll look into that. So you just removed all the triggers associated with that table? |
@drastik I am getting this error [Stripe.js token was not passed! Report this message to the site administrator.] when using the Stripe processor with a real credit card number as well as a test credit card number on a live contribution page. Also, I don't know how to write code. :(
CiviCRM 4.4.5
Wordpress 3.9.3
Stripe Extension 1.9.1
The text was updated successfully, but these errors were encountered: