drastik / com.drastikbydesign.stripe

CMS Independent Stripe payment processor for CiviCRM 4.x
Other
35 stars 48 forks source link

Stripe.js token was not passed #179

Open jmiller-meaewellness opened 7 years ago

jmiller-meaewellness commented 7 years ago

Receiving this erro. Stripe: 4.7.1 CiviCRM: 4.6.24 Joomla: 3.6.5

All settings appear to be correct. I've tried multiple fixes and patches that I Have come across but still nothing. I have played with the file permissions as well.

Anyone have any insight on this? I would be willing to let someone into our dev environment to play with it.

h-c-c commented 7 years ago

Does your Extension Resource URL something like this?

http://example.com/sites/default/files/civicrm/your-extensions-directory

drastik commented 7 years ago

Try the latest version directly here from GitHub (will have to download and place in your extensions dir)

jmiller-meaewellness commented 7 years ago

@drastik I have already attempt to use the newest version form here.

@h-c-c No it is correct at https://domain.org/media/civicrm/extensions/ those urls require the domain...and when you save if it's not there it will auto fill them.

h-c-c commented 7 years ago

@jmiller-camtanhelps I just installed the latest Joomla (Eww) and latest CiviCRM LTS release ( 4.6.25). I can make transactions without the issue.

I noticed that in your example resource url, you're using https. Did you tick the option for ssl?
screen shot 2017-01-26 at 3 25 45 pm

jmiller-meaewellness commented 7 years ago

Yes I did. Jonathan

On Thu, Jan 26, 2017 at 2:28 PM, Peter Hartmann notifications@github.com wrote:

@jmiller-camtanhelps https://github.com/jmiller-camtanhelps I just installed the latest Joomla (Eww) and latest CiviCRM LTS release ( 4.6.25). I can make transactions without the issue.

I noticed that in your example resource url, you're using https. Did you tick the option for ssl? [image: screen shot 2017-01-26 at 3 25 45 pm] https://cloud.githubusercontent.com/assets/5252344/22349056/00301418-e3dc-11e6-867b-22c4346a1fd8.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/drastik/com.drastikbydesign.stripe/issues/179#issuecomment-275504046, or mute the thread https://github.com/notifications/unsubscribe-auth/AYL5bPJWsULClYr6ry5Ph6Ii4AzbGhn8ks5rWQHlgaJpZM4LuU3O .

--

Jonathan Miller Chief Digital Officer Cell: 931-494-0583

--

http://camtanhelps.org Clarksville Area Minister's Technical Assistance Network http://camtanhelps.org 1325 Dodd Steet, Clarksville, TN 37040

Visit us on http://facebook.com/camtanhelps

Confidentiality Notice : This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Clarksville Area Minister's Technical Assistance Network is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company.

jmiller-meaewellness commented 7 years ago

@h-c-c I didn't see the security update for civiCRM 4.6.25...going to upgrade and see if that fixes it.

jmiller-meaewellness commented 7 years ago

@h-c-c I didn't see the security update for civiCRM 4.6.25...going to upgrade and see if that fixes it.

That still didn't work. I'm going to do a clean install of Joomla and install only civicrm, and see what happens. I've seen this issue a few places, and it seems intermittent, but no concrete reason why. Would be nice to find a decent solution.

jmiller-meaewellness commented 7 years ago

Didn't mean to close...

jmiller-meaewellness commented 7 years ago

Yep does it in a clean environment as well. If you would like to login and fiddle around I have a second dev setup with the clean install, shoot me a message. Our site is live and we would like this fixed....

On Thu, Jan 26, 2017 at 3:27 PM, Jonathan Miller jmiller@camtanhelps.org wrote:

Yes I did. Jonathan

On Thu, Jan 26, 2017 at 2:28 PM, Peter Hartmann notifications@github.com wrote:

@jmiller-camtanhelps https://github.com/jmiller-camtanhelps I just installed the latest Joomla (Eww) and latest CiviCRM LTS release ( 4.6.25). I can make transactions without the issue.

I noticed that in your example resource url, you're using https. Did you tick the option for ssl? [image: screen shot 2017-01-26 at 3 25 45 pm] https://cloud.githubusercontent.com/assets/5252344/22349056/00301418-e3dc-11e6-867b-22c4346a1fd8.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/drastik/com.drastikbydesign.stripe/issues/179#issuecomment-275504046, or mute the thread https://github.com/notifications/unsubscribe-auth/AYL5bPJWsULClYr6ry5Ph6Ii4AzbGhn8ks5rWQHlgaJpZM4LuU3O .

--

Jonathan Miller Chief Digital Officer Cell: 931-494-0583 <(931)%20494-0583>

--

Jonathan Miller Chief Digital Officer Cell: 931-494-0583

--

http://camtanhelps.org Clarksville Area Minister's Technical Assistance Network http://camtanhelps.org 1325 Dodd Steet, Clarksville, TN 37040

Visit us on http://facebook.com/camtanhelps

Confidentiality Notice : This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Clarksville Area Minister's Technical Assistance Network is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company.

thomst commented 7 years ago

I've got this error on: Drupal 7.44 CiviCRM 4.6.21 Extension 4.7.1

Reason for the error was a wrong selector: $form.find('input[name="payment_processor_id"]:checked') Changing it to $form.find('input[name^="payment_processor"]:checked' fixes the issue.

There a multiple places this selector is used. I append a diff here. stripe_#179.txt

arborrow commented 7 years ago

Drupal 7.54, CiviCRM 4.7.19, Stripe 4.7.2

I too seem to have had issues where Stripe is the only payment processor but it is not being selected and thus tossing the stripe.js not being passed error. I have seen this when using discounts. Essentially the Stripe payment processor is not selected by default (perhaps because there is a pay later option). I would be curious if this patch might resolve that issue. If I have time later today I will do some testing.

h-c-c commented 7 years ago

@thomst, please consider upgrading from 4.7.1 to the latest git. The issue you describe was addressed along with others.

@arborrow, please consider contributing by outlining the steps to replicate your issue.

This diff addresses an issue that people have using the extension on CiviCRM 4.6.

arborrow commented 7 years ago

Sure, I am happy to provide an example:

  1. Go to https://ignatianinstitute.org/civicrm/event/register?reset=1&action=preview&id=59
  2. Fill out the form
  3. Enter discount code: magis2017 & Apply
  4. Select the price (I went with the full $360)
  5. Click credit card (not already selected presumably because there is a pay later option)
  6. Fill out the credit card information (with Stripe test card data)
  7. I used the same billing address
  8. Submit the event registration
  9. Review information and hit continue
  10. See the stripe.js error

Let me know if you have any questions or anything you would like me to try. If I change the order and select the credit card (Stripe) first prior to applying the discount then the stripe.js loads and everything works.

p.s. - I also get an error report emailed to me with some backtrace data if that might be of help (using the CiviCRM error reporting extension - https://civicrm.org/extensions/civicrm-error-handler) I can forward that along

h-c-c commented 7 years ago

@arborrow Thank you, but you misunderstand. Can you describe the steps for someone else to replicate the issue? So far, I cannot replicate your issue.

For bugs to be fixed, developers need to replicate the problem on their end. In this CiviCRM context, it means describing very specific instructions for setting up a contribution page in the exact manner that you have. I'm looking for every single decision that was made to set up this page.

arborrow commented 7 years ago

@h-c-c - I am also available via chat.civicrm.org as arborrow

arborrow commented 7 years ago

Sorry, I was hoping that being able to access the actual page and re-create it on our site would be of some help to you. I did not create the page but suspect that if you have a site with a single processor (Stripe), create an event with a price set that has a discount and the pay later option that we should be able to replicate it. If there were some type of demo site we both had access to I would be happy to try to recreate it there. Otherwise, if you have questions about how this particular event is set up I would be happy to look in the database and provide answers.

arborrow commented 7 years ago

Unfortunately js makes my head spin and I get dizzy when trying to sort out what is happening - what I do know is that I can replicate the issue and I can work around it by selecting the credit card (Stripe) processor option before applying the discount. If you look at the page, are you able to create something similar where the credit card option is not selected by default? That seems to be the crux of the issue.

arborrow commented 7 years ago

OK, I was able to recreate the issue on a demo server so I feel that I can answer questions about how to create the event. Here is what I did:

  1. create an event of type workshop, default role is attendee, start date (prior to today), no end date, no max participants, public event, event is active.
  2. I created a new event location, provided email and phone number and checked show location.
  3. For fees, I created a price set (Generic workshop) with 4 price options (none of them were set as the default) and all price options had a financial type of Event Fee. The field type for the price set is select, not required but enabled.
  4. In the event configuration, under the Fees tab, it is a paid event, USD currency, the one payment processor (Stripe) is selected as well as the Enable Pay Later with some text in the Pay Later Instructions. I changed the Fee Label to Tuition (but that is probably inconsequential). Financial type: Event fee and the created Price Set which I called Generic workshop.
  5. Online registration was enabled with no start date but an ending date some time in the future. All the rest should be defaults with no confirmation email being sent.
  6. The discount code I created as an active 10% with no usage limit, I created activation and expiration dates, no organization or price field options, I applied the discount to the event and also the workshop event type (although probably not relevant, the discount was also applied to lifetime membership), and no automatic discount options were chosen.
  7. Then I went to: http://isi.montserratretreat.com/isidemo/civicrm/event/register?reset=1&action=preview&id=8 , entered the discount code and hit apply (page refreshes with discount applied to price options), then selected the $360 option, click on credit card testing radio button, fill in the information and click Continue, verify the information and upon submitting it I get step Stripe.js error.

Hopefully this will help you to recreate it. If not, I have created an admin account on the demo site that I can share with you privately.

h-c-c commented 7 years ago

Thanks, that's helpful.

As it turns out, I can replicate this issue using the above instructions and can work around it by setting a default option in the priceset. Leaving no default option in the priceset seems to affect the selection of the default payprocessor. This is probably not the intended behavior in CiviCRM.

Until a patch for CiviCRM deals with this, my advice for a workaround is to make one of your options default, such as "Register Practicum only".

arborrow commented 7 years ago

I will see if there is an existing issue in CiviCRM and if not create one so that we can work on getting it resolved. I did confirm on the demo site that setting a default price option works around the issue. Thanks for your help in troubleshooting it and coming up with another work around.

h-c-c commented 7 years ago

Sure thing, thanks for the detailed replication instructions!

tttp commented 6 years ago

Hi,

I'm experiencing the same problem, but only on chrome, it works fine on FF.

civi 4.7 stripe (tried both downloaded and from github on the 4.7-dev branch)

I don't see any js error (even when keeping the log). I tried to set stripe as the default Payment Provider

h-c-c commented 6 years ago

Hey @tttp, I spun up a 4.7.29 instance with buildkit and installed the release version. I set up the scenario described by @arborrow, and set Stripe as my default pay-processor (accepting all major cards), and had a default option set in my price set. I cannot replicate this issue in Chrome for both test and live transactions.

I think you may have to go into excruciating detail so that the issue can be replicated. Are you also having trouble with the same workflow, or a different one?

@hair-transplant Buildkit doesn't support Joomla, so it would take me some time to test that. If test transactions work, but not real, that's mysterious. You could try disabling zip code checks in your Radar section. But IIRC these kind of errors aren't expressed with "Stripe.js token was not passed". Are you seeing any events related to failed attempts in Stripe?

hair-transplant commented 6 years ago

I removed my posting in the meantime as it was my silly fault. Exchanged private und public key.... .. And overlooked the small error line saying this. Instead i followed the token message 😔 Works now. Many thx.

Am 24. Januar 2018 19:12:52 MEZ schrieb Peter Hartmann notifications@github.com:

Hey @tttp, I spun up a 4.7.29 instance with buildkit and installed the release version. I set up the scenario described by @arborrow, and set Stripe as my default pay-processor (accepting all major cards), and had a default option set in my price set. I cannot replicate this issue in Chrome for both test and live transactions.

I think you may have to go into excruciating detail so that the issue can be replicated. Are you also having trouble with the same workflow, or a different one?

@hair-transplant Buildkit doesn't support Joomla, so it would take me some time to test that. If test transactions work, but not real, that's mysterious. You could try disabling zip code checks in your Radar section. But IIRC these kind of errors aren't expressed with JS Token not passed. Are you seeing any events related to failed attempts in Stripe?