Prosites Cloudflare and Stripe

When I turn on "Live" I get an error about "too many redirects"

I'm using CloudFlare for SSL. It proxies my web server on http port 80, and then SSL to the client.

So my website needs to redirect to https in a different manner than however it's being detected in the plugin.

  • aecnu

    Greetings Jason,

    Is your site itself running on https throughout?

    There are many tickets in the system of people having trouble with cloudflare who are not using SSL either. Even outside WordPress people are complaining about trouble with cludflare SSL:

    If you are not using SSL throughout your whole site, then I would think that the only time it is using SSL is when it is coming from PayPal and the problem would then be between PayPal and cloudflare.

    Please advise what payment gateways you are using.

    Thank you for being a WPMU Dev Member!

    Cheers, Joe

  • Jason

    Thank you for responding Aecnu.

    The title of the post is "Prosites, Cloudflare and Stripe"

    I'm trying to use stripe. However, the method I want to use isn't exactly an option.

    I want to use https, and let cloudflare handle the https.

    I read that article, and I agree with some of it. Cloudflare updates often, and I may have to leave it on a production service, however.

    I want to try the flex SSL option and see how it fairs. The way it works is like this:

    MyServer http -> to cloudflare proxy -> https to end user

    So in short, I need to be running Stripe without force SSL, (It's already SSL by cloudflare...)

  • Jason

    I'm going to break down and edit the plugin if I can't get this working.

    Really, the plugin just needs one single option, namely cloudflare support or something, and when activated, it rewrites all the URLs in HTML, yet DOES NOT do any PHP REDIRECTING.

    Better yet, just a live option without the "Force SSL" part.


    So far I'm using this javascript to enforce the https without redirect errors...
    <script language="JavaScript">
    <!-- begin hide

    function goElseWhere()
    var oldURL = window.location.hostname + window.location.pathname;
    var newURL = "https://" + oldURL;
    window.location = newURL;
    if ("https:" == document.location.protocol) {
    /* secure */
    } else {
    /* unsecure */
    // end hide -->

    And now I should be able to just comment out the https PHP redirect.
    But I should have the choice to turn this on or off....

  • Jason

    I've turned off cloudflare, and am trying to track everything down.

    What I'm seeing now is this error:

    The Stripe Token was not generated correctly. Please try again.


    I have no clue where to start. This is my first time with stripe. I know it's a major setback, but I really like the way it tracks sales. Also, I strongly dislike paypal.

  • aecnu

    Greetings Jason,

    I shall do my best to answer your questions:

    Why is Joe the only one to respond to my support request?

    This I do not know directly but I do know that it seemed you were working it along going where none of us have gone before.

    To attempt to help resolve this ticket one would have to get a cloud flare account, get a stripe account, and to the best of my knowledge this is not a part of the forum mandate. We do like to help any way that we can with WordPress issues but we all have our limits.

    The last reply I received is over a week ago. I'm eager to handle this myself, but I need some direction. Is stripe support non-existent?

    The reason for the long delay in a reply is that the ticket system recognizes every reply to a ticket as - well a reply - and therefore your ticket does not show as aging and the last reply was a short time ago, by you sir.

    If I had not been paying attention to the stream your ticket would have never hit the aging stage of the ticket system and it would appear that there was another reply - no matter whom it came from.

    Have we perhaps any input from Stripe or Cloudflare support regarding these integration issues?

    Please advise.

    Cheers, Joe

  • Jason

    Yes, here's the latest on my issue. Stripe support asked what my error message was after I told them what it was. No further responses from them.

    I turned off cloudflare. That's no longer the issue at all. Easy one, I just removed it from the equation entirely.

    I'm sorry to be "bumping" my own post, but I am very eager to get this out of the way. I didn't realize that keeping it at the top of the list made it low-priority.

    Here's my problem, in test mode everything works fine. In live mode, it says "The Stripe Token was not generated correctly. Please try again."

    I have 4 other people testing for me from their own computers, across the world, and it's the same for them.

    I'm wondering if the stripe module even works at all. Are there any alternatives? Like or anything?

    So for now, i'm backtracking and moving back to paypal, but I utterly despise them. Stripe looks awesome (even if their fees are as high as paypals', possibly more)

    :disappointed: On third thought, and after some research, I'm going to look into hiring a developer to implement Dwolla. They have a free merchant account, with a flat .25 fee for transactions over $10....

    I'd make my money back on that before long...

    Let me look into hiring a developer and I'll get back with ya.


  • aecnu

    Greetings Jason,

    This ticket has taken a very intriguing twist.

    No reason to apologize about how the ticket system works nor your own bumps. Just trying to give you a pointer so to speak so that we may get to your tickets quicker if they are indeed aging.

    I have never heard of Dwolla but i learn something new everyday :slight_smile:

    The Stripe Gateway is a Beta gateway, and therefore it certainly is not considered a production piece.

    I do not know why some people hate PayPal, I have been with them since 1998 without incident and my rate is 30 cents a transaction and 1.9% with or without volume. I have discovered once your account qualifies for the 1.9% rate, even if you fall under it the rate remains.

    However, I wish you total success in achieving Google Checkout integration as you prefer.

    Cheers, Joe

  • Jason

    Thanks for the input Joe. I'm fearful of paypal because I've been on the wrong end of their policies before.

    The froze my account because I had some money basically, and I could raise no response from their support. A letter from my lawyer, and everything was squared away in 48 hours, still without response.

    My business halted, and revenues were lost, and no explanation was ever given.

    How did you Qualify for the 1.9% rate?

  • Dean

    Stripe payments work prefectly in test mode. Using flexible cloudflare ssl. But when I turn on live mode I get a white screen. Some redirect problem I think as when i installed Cloudflare Flexible SSL fix plugin its works fine in production mode, but all links on the admin bar start with https so when the user returns to their upgraded site things go wrong.

    So can I enable live mode in your plugin, but somehow remove the force live https? if I can do that everything would work fine.

    Someone talks about the same issue here but it was never resolved:

    I see that edublogs uses https in the admin area and payment area, would be great to learn about how this was setup.

    • Dean

      This is the code is the flexible cloudflare ssl fix:

      * Plugin Name: CloudFlare Flexible SSL
      * Plugin URI:
      * Description: Fix For CloudFlare Flexible SSL Redirect Loop For WordPress
      * Version: 1.0.0
      * Text Domain: cloudflare-flexible-ssl
      * Author: iControlWP
      * Author URI:

      // Simple 1st version. More to come.
      if ( isset( $_SERVER['HTTP_CF_VISITOR'] ) && strpos( $_SERVER['HTTP_CF_VISITOR'], 'https' ) !== false ) {
      $_SERVER['HTTPS'] = 'on';

      everything works fine when this is turned on except for all links on the admin bar now have https. can the code be modified so that it only effects the payment page i.e. ?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.