WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms + Stripe
Credit Card Invalid since updating to 1.7.2 (14 posts)

  1. chrome88
    Member
    Posted 11 months ago #

    Had Gravity + Stripe working fine. After updating to Gravity Forms to 1.7.2 I started getting a consistent message of Invalid Card Decline. Tried it in Testing mode, Live mode, Test credit card #, real credit cards #. Uploaded a copy of GF 1.6.11 over the current install, then ran another test.

    Voila. Transaction went through ok.

    Only issue is that now after each transaction, I am getting this message:
    Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/[mydomain]/public_html/payments.[mydomain.com]/wp-includes/wp-db.php on line 885

    and i am not getting notifications when the transaction occurs

    may need to do a clean re-install to get it to work unless someone knows how to resolve the incompatibility

    http://wordpress.org/extend/plugins/gravity-forms-stripe/

  2. chrome88
    Member
    Posted 11 months ago #

    deactivated both Gravity Forms and Gravity Form + Stripe, deleted all data as much as possible, re-installed 1.6.11 and was still getting an array error.

    based on another GF issue I had previously, i tried enabling AJAX
    [gravityform id="1" name="Payments" title="false" ajax="true"]

    now everything is working fine. might do a separate install to test again with 1.7.2

  3. benklocek
    Member
    Posted 11 months ago #

    I too realized too late that the current version of this plugin is only slated to work with 1.6.11 of Gravity forms, but thought my debugging might save someone some time later.

    The .submit function that gets added to the page (after stripeResponseHandler) needs to be updated.

    The jQuery selector that gets the card number uses .prev() to select the credit card number from the correct field, unfortunately, that just selects the label. If you use .parent() in it's place, the credit card number is selected.

    Current line in stripe.php (2120):
    "var card_number = jQuery('#gform_{$form_id} span.ginput_cardextras').prev().children(':input').val();" .
    Adjusted:
    "var card_number = jQuery('#gform_{$form_id} span.ginput_cardextras').parent().children(':input').val();" .

    It should all be on one line.

  4. benklocek
    Member
    Posted 11 months ago #

    FYI, I still get the array_key_exists error on line 2384, but everything seems to go though and be logged properly.

  5. B Hays
    Member
    Posted 11 months ago #

    Nice work Ben, thanks for the fix.

  6. bluesignals
    Member
    Posted 11 months ago #

    Thanks benklocek! Changing ".prev" to ".parent" resolved my invalid credit card issue.

  7. Razorfrog Web Design
    Member
    Posted 11 months ago #

    Fixed mine as well, thank you.

  8. eannadams
    Member
    Posted 11 months ago #

    THANK YOU! this worked for me. you absolutely made my day.

  9. chrome88
    Member
    Posted 11 months ago #

    if i ever need to find a needle in a haystack ben, you are definitely the man!

    thanks.

    now i'm worried about other gravity plug-ins imploding. any advice on what to look for?

  10. benklocek
    Member
    Posted 11 months ago #

    :D Glad it helped everyone!

    Just use the tools available: Chrome Devtools, wp_debug, etc. If you're getting errors, it at least gives you a place to start. From there, it's just knowledge and experience,.

  11. WebEndev
    Member
    Posted 11 months ago #

    I am getting the "Invalid credit card number" error in test mode, using Internet Explorer 9 ONLY (I have not checked it on IE8 yet). It works fine in test mode with Chrome and Firefox.

    I am getting this error in console on IE9:

    'jQuery' is undefined
    flat-fee-mls-data-entry-form, line 63 character 675

    Line 63 appears as this: http://screencast.com/t/0l7hvKmDj3f5

    I took a look at stripe.php in version 1.7.2.2 of the plugin and the fix that benklocek mentioned above is now in place in this version. So that will now solve this issue.

    Any help is greatly appreciated!

    EDIT: I just tested IE8 and it works fine. This problem ONLY happens in IE9.

  12. helloari
    Member
    Posted 10 months ago #

    adding ajax="true" to shortcode fixed the problem for me.
    i did not find the PHP code mentioned above - maybe that code changed in Version: 1.7.2.3 of the stripe plugin.

    i searched and didn't find it anywhere in the stripe.php file.

    note i am using the lastest GF 1.7.5
    1.7.4 gave me problems on a different site - so avoid that version.

    note also that i talked to gravity forms folks a few months ago and they said they were fed up with paypal and wanted to only support stripe. my interpretation was that they would either buy the codebase from this plugin or make their own.

    be code safe out there people!

  13. Tevya
    Member
    Posted 7 months ago #

    Any updates here? I'd just like to confirm this plugin is working with the latest 1.7.x versions of GF? Also has anyone else heard about an official Stripe plugin? Either would be great. Thanks.

  14. nickjonezy
    Member
    Posted 7 months ago #

    Hi everyone, I'm so glad I found this thread as I too was having the same error message when transactions were made on my site. Enabling Ajax worked for me - thanks a million!

Reply

You must log in to post.

About this Plugin

About this Topic