• Hello-
    I’ve recently done a full theme update for a client and updated their very outdated php. Somehow, someway, for some reason, when customers enter their credit card information and click the Place an Order button on the client site, the site spins for a few seconds and then presents an error message toward the top of the page that says “Payment error: There was a problem connecting to the payment gateway.”

    I’m not a web developer by trade, but I know enough to be dangerous, but not enough to get me out of a jam like this. I’ve scoured the internet tirelessly but can’t find a solution.

    Wordpress 5.8.1
    Astra v.3.7.3
    Elementor v3.4.4
    WooCommerce PayPal Pro Version 4.4.7
    Wordfence 7.5.5
    PHP 7.4.24

    I’ve also disabled all plugins and slowly reactivated them. Currently the only ones active on my staging site are listed above. No dice.

    I’ve also increased the max_input_time to 1000, max_execution_time to 300, upload_max_filesize to 64M, post_max_file_size to 64M, memory_limit to 256M, and upload_max_size to 64M. I did this all because I was getting errors in my paypal log file saying “Error cURL error 28:” which I know is a timeout error.

    When I was trying to troubleshoot this error on the live site, I was using real payment data and the real Paypal API credentials. I have the ability to generate the refunds, don’t worry. I’ve been using sandbox Paypal API credentials and sandbox credit card # for testing this on my staging site. The only successful payment I’ve received in the past 3 weeks is when I used the sandbox CC# to pay when the real Paypal API credentials were set up. That was 2.5 weeks ago…

    I’ve also contacted my webhost (GoDaddy) and they suspect it is one of the plugins I’m using, but I’m running as lean as I can with those. Staring at log files and tracking down what they mean is like banging my head against a wall.

    Any help that anyone can provide would be extremely appreciated. Thank you in advance!

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Serge

    (@sergiuspro)

    Hi, does cURL itself work on the server? mod_security doesn’t block cURL calls?

    So far it seems to me that the problem is in the server configuration, not in WordPress

    Thread Starter tkress1

    (@tkress1)

    How do I go about checking/testing that? Is that a setting I should be able to find on cPanel? I see there is a MOD Security app or whatever on cPanel but the only think I can do is turn it on/off for my domains.

    Serge

    (@sergiuspro)

    you can check if CURL works with this code.

    echo '<pre>';
    var_dump(curl_version());
    echo '</pre>';
    Thread Starter tkress1

    (@tkress1)

    Thanks!

    Where am I putting that code to run it? cPanel > Terminal and creating a command line? Or can I activate the Snippets plugin on WordPress and add a new snippet with that code in there? This backend stuff is still pretty new to me. It’s best to assume I know nothing, and you may need to spell things out a bit.

    Serge

    (@sergiuspro)

    yes, Code Snippets plugin, will be the easiest way for you. please write what will output this code

    Thread Starter tkress1

    (@tkress1)

    Ok, it’s a snippet and I’ve saved it and activated it. It’s set to run everywhere. So do I run another test order on my staging site? What should I be seeing as a result, and where should I be looking to know if cURL calls are blocked?

    Serge

    (@sergiuspro)

    no, this code should output information about CURL. To understand whether CURL is installed correctly on the server or not

    Thread Starter tkress1

    (@tkress1)

    Where should I be looking? I feel like I’m not looking in the right place. So on my site’s WordPress admin dashboard, I went to the Snippets plugin, added a new snippet with that code you sent me, and activated it. I’m not sure where I should be seeing the output message of that code snippet.

    Thread Starter tkress1

    (@tkress1)

    So I found another thing I could do to probably get a similar answer to the cURL support. Following the steps on this Frontline Dev siteI created a php file to show me all the php info and put it in my root folder.

    I got a page full of php information, and when I scroll down to cURL support, it says cURL support is enabled, and v7.69.1 is what’s being used.

    So…what else should I check?

    Thread Starter tkress1

    (@tkress1)

    Maybe I’ll be throwing this question out into the darkness of space, but I still cannot figure out what’s preventing my payment gateway connection. When I look in the WooCommerce logs, all I see is a cURL 28 error.

    When I go into cPanel > FileManager and dig through directory to find the error_log file, I see:

    12-Oct-2021 18:14:35 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().
    [12-Oct-2021 18:19:22 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().
    [12-Oct-2021 18:25:47 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().
    [12-Oct-2021 18:25:47 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().
    [12-Oct-2021 18:31:13 UTC] PHP Warning:  array_column() expects parameter 1 to be array, string given in /home/emmpaccom/public_html/emmpac-staging/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/RemoteInboxNotifications/Transformers/ArrayColumn.php on line 27
    [12-Oct-2021 18:31:13 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/emmpaccom/public_html/emmpac-staging/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/RemoteInboxNotifications/Transformers/Count.php on line 24
    [12-Oct-2021 18:32:07 UTC] PHP Warning:  array_column() expects parameter 1 to be array, string given in /home/emmpaccom/public_html/emmpac-staging/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/RemoteInboxNotifications/Transformers/ArrayColumn.php on line 27
    [12-Oct-2021 18:32:07 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/emmpaccom/public_html/emmpac-staging/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/RemoteInboxNotifications/Transformers/Count.php on line 24
    [12-Oct-2021 18:35:32 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().
    [12-Oct-2021 18:36:17 UTC] PHP Warning:  array_column() expects parameter 1 to be array, string given in /home/emmpaccom/public_html/emmpac-staging/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/RemoteInboxNotifications/Transformers/ArrayColumn.php on line 27
    [12-Oct-2021 18:36:17 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /home/emmpaccom/public_html/emmpac-staging/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/RemoteInboxNotifications/Transformers/Count.php on line 24
    [12-Oct-2021 19:12:23 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().
    [12-Oct-2021 19:22:09 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().
    [12-Oct-2021 19:31:04 UTC] The WC_Abstract_Legacy_Order::get_product_from_item function is deprecated since version 4.4.0. Replace with $item->get_product().

    I don’t know what any of that means. I’ve looked up that WC_Abstract_Legacy_Order message but I’m not sure how to go about fixing it.

    Also, I went to cPanel > Metrics > Errors to see if there was anything in there, and I see this error over and over again:

    Permission denied: [client 109.237.103.118:33882] AH00529: /home/emmpaccom/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/emmpaccom/public_html/' is executable

    I don’t have the faintest clue where to start my search for answers anymore. I’ve deleted and re-downloaded my Astra theme, deleted a bunch of plugins I thought could be the culprits, turned my Wordfence plugin on and off between running test payments, but to no avail. I don’t know/can’t tell if it has anything to do with my Paypal APIs (I do NOT have SoapClient installed, btw, if that matters) but I have no idea if the errors mentioned above are indicative of the Paypal API connection not working, or something else entirely.

    If there is somewhere else I’m not looking to see a more indicative answer to what could be causing the issue, I’d love to know where.

    • This reply was modified 3 years, 1 month ago by tkress1.
    • This reply was modified 3 years, 1 month ago by tkress1.
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Payment Gateway error with Paypal Pro and WooCommerce’ is closed to new replies.