• Resolved asotec

    (@asotec)


    Howdy everyone

    I have integrated Clover payment gateway on my website.

    It works with WordPress and Woocomerce technology. The problem is that at the time of filling all the fields correctly in checkout and validates that the card is correct, an error appears in the store that says that the order could not be processed.

    The question is not a problem with the Clover payment gateway, because if I go to my Clover dashboard the payment is there, likewise in the orders section of Woocommerce.

    I’ve come to think it might be because of the theme, but I’m not sure where to start checking.

    Thank you in advance for your help.

    Important details:
    – WordPress 6.6.2
    – php 8
    – WooCommerce 9.3.3
    – Theme: Astra pro
    – Template (starter templates): Day Care Services

    Plugins related to shop instaled:
    – Clover Payments for WooCommerce
    – CartFlows
    – Formidable Forms
    – SureCart (deactived)
    – WooPayments (not used)
    – WooCommerce Shipping & Tax (not used)
    – WooCommerce Custom Add To Cart Button
    – WooCommerce Cart Abandonment Recovery (not used)

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Mayuri

    (@mayuripatel)

    Check Browser Console for Errors: Open the browser developer tools (press F12 or right-click and select “Inspect”) and go to the Console tab. Try completing the checkout again and see if any errors appear in the console.

    If you see errors related to JavaScript, it could be a theme or plugin conflict that’s interfering with the payment process.

    Test with a Default Theme: To isolate the issue, switch to a default WordPress theme (e.g., Twenty Twenty-Three) temporarily and test the checkout process. If the payment works without any issues on the default theme, the problem may lie within your current theme.

    Thread Starter asotec

    (@asotec)

    Thanks for your response, I will try this and see whats happen ??

    Thread Starter asotec

    (@asotec)

    Hi again!
    I was able to find the error thanks to your recommendations. I get that it is an error that the ajax checkout resource cannot be loaded and it gives a 500 server error. Now what could I do to solve this?


    This is the error log:

    {
    "result": "failure",
    "messages": "\n\u003Cul class=\"woocommerce-error\" role=\"alert\"\u003E\n\t\t\t\u003Cli\u003E\n\t\t\tWe were unable to process your order, please try again.\t\t\u003C/li\u003E\n\t\u003C/ul\u003E\n",
    "refresh": true,
    "reload": false
    }

    PS: I deactivated all the plugins except woocommerce and the payment gateway and the test is done with a default WordPress theme

    • This reply was modified 1 week, 1 day ago by asotec.
    Mayuri

    (@mayuripatel)

    A 500 server error generally indicates a problem with the server, often related to themes, plugins, or server configurations.

    Enable Debugging in WooCommerce

    • Start by enabling debugging for both WooCommerce and the payment gateway.
      • Go to WooCommerce > Settings > Payments and enable logging for the Clover payment gateway (if available).
      • Also, enable WooCommerce logging by going to WooCommerce > Settings > Advanced > Debug and check the box for enabling log files.
      • After re-testing the checkout process, check the WooCommerce logs (under WooCommerce > Status > Logs) to see if any additional errors or information appear.

    2. Check Server Logs

    • Since this error is a 500 server error, it would be helpful to check the server logs. Most hosting providers have a way to access error logs from the control panel or cPanel. Look for any related issues that might be tied to the AJAX request or database errors.

    3. Theme Issues

    • You’ve already tested with a default WordPress theme, but it’s important to ensure that AJAX functionality is working correctly with the default theme (like Twenty Twenty-Three). If the issue is resolved with the default theme, it might be an issue with your theme’s integration of the WooCommerce checkout process.
      • Check Theme Files: If your theme overrides WooCommerce templates, check if it’s overriding any AJAX-related files like checkout/form-checkout.php. These files might need to be updated or fixed if they are not properly handling AJAX requests.
      • Custom JavaScript: Look for any custom JavaScript in your theme that might be interfering with the AJAX checkout process. Sometimes, custom scripts can conflict with WooCommerce’s native JavaScript functions for processing orders
    • 4. Increase PHP Limits
      • 500 errors can sometimes happen when PHP memory or time limits are exceeded during the checkout process. Try increasing your PHP memory limit and max_execution_time in your wp-config.php or .htaccess file.
        • Example for wp-config.php:
    define('WP_MEMORY_LIMIT', '256M');

    Example for .htaccess:

    php_value max_execution_time 300
    php_value memory_limit 256M

    5. Check WooCommerce AJAX Endpoints

    • If the error specifically mentions an issue with AJAX checkout, you should verify that AJAX endpoints are not blocked or misconfigured.
      • Go to WooCommerce > Settings > Advanced > REST API and make sure it’s enabled for the correct endpoints.
      • Ensure the server isn’t blocking AJAX requests. Some security plugins or server configurations may block requests that seem unfamiliar or contain certain parameters, which could be affecting AJAX calls.
    • 6 .Check WooCommerce AJAX Endpoints
    • If the error specifically mentions an issue with AJAX checkout, you should verify that AJAX endpoints are not blocked or misconfigured.
      • Go to WooCommerce > Settings > Advanced > REST API and make sure it’s enabled for the correct endpoints.
      • Ensure the server isn’t blocking AJAX requests. Some security plugins or server configurations may block requests that seem unfamiliar or contain certain parameters, which could be affecting AJAX calls.
    • 7. Update WooCommerce and Payment Gateway
    • Make sure you’re running the latest versions of WooCommerce and the Clover payment gateway plugin. An outdated plugin could be causing compatibility issues with the latest WordPress version.

    Based on the error log you have provided, the specific error message indicates that the order processing failed with the message “We were unable to process your order, please try again.” This message is a general error message that WooCommerce displays when an order cannot be completed successfully.

    Here are some steps you can take to troubleshoot this issue further:

    1. Validate Payment Gateway Settings:
      Double-check the settings for the Clover payment gateway in WooCommerce to ensure that all required fields are correctly filled out. Make sure that you have entered the correct API keys or credentials for the Clover payment gateway.
    2. Test with Default Theme:
      Switch to a default WordPress theme like Twenty Twenty-One to see if the issue is related to your current theme. If the order processes successfully with the default theme, the problem may be theme-related.
    3. Check for Plugin Conflicts:
      Disable other plugins one by one and test the checkout process to see if any plugin is causing a conflict with the Clover payment gateway. Reactivate the plugins one at a time to identify the conflicting plugin.
    4. Update WooCommerce and Clover Gateway Plugin:
      Ensure that both WooCommerce and the Clover Gateway plugin are updated to the latest versions to address any potential bugs or compatibility issues.
    5. Review Payment Gateway Documentation:
      Refer to the documentation provided by Clover for their payment gateway integration with WooCommerce. They may have specific troubleshooting steps or requirements that could help resolve the issue.
    6. Contact Support:
      Reach out to the support team for both WooCommerce and Clover payment gateway to report the issue. They may be able to provide additional insights or assistance in resolving the problem.
    7. Custom Code or Functions:
      If you have custom functions or code snippets related to the checkout process, check them for any errors or conflicts that could be causing the order processing failure.
    8. Review Server Logs:
      Look into your server’s error logs or enable debugging in WordPress to capture more detailed error messages that could help pinpoint the cause of the issue.

    By following these steps and investigating further based on the details provided in the error log, you may be able to identify the underlying issue causing the order processing failure with the Clover payment gateway in your WooCommerce store.

    Thread Starter asotec

    (@asotec)

    Thanks a lot, the problem has been resolved! ??
    For people who have the same problem, the solution for me was to place the line ; in the wp-config.php file.

    define('WP_MEMORY_LIMIT', '256M')

    Although I also installed the WP Mail Logging and WP Mail SMTP plugins because it can also occur when not having the ability to send emails to clients.

    The answers were very good, so they will help if this is not the case for you

    • This reply was modified 1 week ago by asotec.
    • This reply was modified 1 week ago by asotec.
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.