• Didn’t feel right having to pay someone to fix their own plugin.. especially being a dev myself 🙂 So here is how to fix the Invalid Token error:

    -stripe.php line 2103, replace:

    $needle      = "});" .
    					"}" .
    					"jQuery(document).ready(function($){" .
    					"gformInitSpinner_{$form_id}();";

    with

    $needle      = "} );}jQuery(document).ready(function($){gformInitSpinner_{$form_id}();";

    – The error is essentially the new gforms plugin has ONE extra space somewhere where the search and replace happens (right after the first } bracker ). This will allow the stripe js to be inserted again.

    – This fix still requires that the form be in Ajax mode, as the insertion point is based on the gform ajax js code.

    BONUS

    In the backend, my keys would show up as invalid when I put them in. If you are having this issue, try this fix:

    – stripe.php near line 663, replace:

    Stripe_Token::create( array(
    																		 'card'     => array(
    																			 'number'    => '4242424242424242',
    																			 'exp_month' => 3,
    																			 'exp_year'  => $year,
    																			 'cvc'       => 314
    																		 ),
    																		 'currency' => 'usd' ) );

    with

    Stripe_Token::create( array(
    																		 'card'     => array(
    																			 'number'    => '4242424242424242',
    																			 'exp_month' => 3,
    																			 'exp_year'  => $year,
    																			 'cvc'       => 314
    																		 )) );
Viewing 8 replies - 1 through 8 (of 8 total)
  • thanks so much for the fix; I just had a client sign a contract for me only to find my invoice form no longer worked. I’m willing to pay for a premium plugin but this one is free so it should either be upgraded to premium or the fixes should be made available.

    Awesome! Thanks so much.

    Beauty, thanks for the code, totomobile!

    Great job Totomobile? Insterested in forking this code and having your own version? I think most people would love that, since we all know the story behind the current dev of this plugin.

    By the way, does it hang for anyone when making a test purchase?

    Nevermind, it works now. Totmobile, does this work with GravityForms 1.6.9+

    Thanks

    Plugin Author Naomi C. Bush

    (@naomicbush)

    Hi totomobile — wish you would have gotten the whole story before giving out false information about having to pay me to fix the plugin. Anyone who’s contacted me can concur.

    Enjoy the *complete* fix when it’s released here for free later today 🙂

    Plugin Author Naomi C. Bush

    (@naomicbush)

    Hi helms,

    What story would that be? I don’t recall an email from you but please feel free to email me any time if you have a question about what’s going on with the plugin.

    Thread Starter totomobile

    (@totomobile)

    Hi Naomi,

    First I want to say thanks for the plugin. Obviously I had to go through the plugin code and it’s well written and it seems a lot of users are finding it useful. As a developer I appreciate the work you put in an released for free.

    After encountering the token bug myself, it appeared on the forums that to get the fix I would have to contact you and wait for it. I had a short deadline and I prefer being depended on myself than waiting on someone, so I just fixed it myself.

    So anyways, I don’t want to start a polarizing discussion, I just wanted to help people who were having the same issue as me.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Gravity Forms Stripe Add-On] Solution to the Invalid Token Error’ is closed to new replies.