• 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

    https://www.ads-software.com/extend/plugins/gravity-forms-stripe/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter chrome88

    (@chrome88)

    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

    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.

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

    Nice work Ben, thanks for the fix.

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

    Fixed mine as well, thank you.

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

    Thread Starter chrome88

    (@chrome88)

    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?

    ?? 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,.

    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: https://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.

    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!

    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.

    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!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Credit Card Invalid since updating to 1.7.2’ is closed to new replies.