• Resolved Jin

    (@annfoo)


    Hey there

    Could someone please help me with this credit card stripe issue? Would really appreciate any help.

    This problem first came about a few days ago and I do not know why. Whenever someone uses a credit card to order, they receive this error (shown on the webpage at checkout):

    Payment Failed ( You passed an empty string for ‘payment_method’. We assume empty values are an attempt to unset a parameter; however ‘payment_method’ cannot be unset. You should remove ‘payment_method’ from your request or supply a non-empty value. ).Refresh and try again

    I have checked the Woocommerce log and this is the error that I see under Woocommerce –> Status –> Log:

    (
    [code] => parameter_invalid_empty
    [doc_url] => https://stripe.com/docs/error-codes/parameter-invalid-empty
    [message] => You passed an empty string for 'payment_method'. We assume empty values are an attempt to unset a parameter; however 'payment_method' cannot be unset. You should remove 'payment_method' from your request or supply a non-empty value.
    [param] => payment_method
    [type] => invalid_request_error
    )

    1. I disabled all plugins to identify if the problem is resulting with a clashign plugin but the problem still exists

    2. Paypal still works on my websites so I dont think the issue is with Woocommerce

    3. I have tried to use other Stripe plugins (eg Woocommerce Stripe plugin) but the problem still exists

    Could someone please help me? The stripe settings is currently on test-mode so anyone can use the test credit card details to test it out

    https://stripe.com/docs/testing

    Really appreciate the help, thank you!
    Jin

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Jin,

    That’s pretty odd and I still suspect that some plugin or customization in your site is generating this conflict, as by default, the “payment_method” parameter shouldn’t be empty.

    Can you also try to switch to a default WordPress theme to see if the issue persists? If it’s solved, I’d suggest you to check your theme’s functions.php file as there will be likely some customizations that alter the cart there.

    Also, can you please check if you’re using the latest version of WooCommerce and Stripe?

    Finally, if the issue persists, I’d suggest you to enable WordPress debug log functionality and check if any errors are logged in wp-content/debug.log file when replicating this issue.

    You can read more about how to enable WP_Debug here:
    http://codex.wordpress.org/Editing_wp-config.php#Debug

    Here are the basic steps:

    1. Login to your site through FTP
    2. Make a backup of wp-config.php
    3. Open this file and add the code below
    4. Save and re-upload this file

    Find this line of code: define('WP_DEBUG', false);

    Change it be this:

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    
    // Disable display of errors and warnings 
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors',0);

    Thanks so much!

    Hi there @annfoo,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Receiving a parameter_invalid_empty error when using credit card stripe’ is closed to new replies.