gl636474 / NaturesCupboard2

0 stars 0 forks source link

Cannot pay using PayPal #40

Open gl636474 opened 4 years ago

gl636474 commented 4 years ago

Customer reported on Tuesday 8 July that she couldn't pay using PayPal - it just gave an error.

Replateable on live system:

  1. Add anything to cart
  2. Go to checkout
  3. Fill in details and select PayPal and continue
  4. After about a minute, returns to cart page with the following error in red at the top of the page:

Unable to communicate with the PayPal gateway.

gl636474 commented 4 years ago

From exception.log:

2020-07-07T16:54:20+00:00 ERR (3): 
exception 'Exception' with message 'PayPal NVP CURL connection error #28: Connection timed out after 60000 milliseconds' in /var/sites/n/naturescupboard.co.uk/public_html/app/code/core/Mage/Paypal/Model/Api/Nvp.php:984
Stack trace:
#0 /var/sites/n/naturescupboard.co.uk/public_html/app/code/core/Mage/Paypal/Model/Api/Nvp.php(617): Mage_Paypal_Model_Api_Nvp->call('SetExpressCheck...', Array)
#1 /var/sites/n/naturescupboard.co.uk/public_html/app/code/core/Mage/Paypal/Model/Express/Checkout.php(381): Mage_Paypal_Model_Api_Nvp->callSetExpressCheckout()
#2 /var/sites/n/naturescupboard.co.uk/public_html/app/code/core/Mage/Paypal/Controller/Express/Abstract.php(108): Mage_Paypal_Model_Express_Checkout->start('https://natures...', 'https://natures...', false)
#3 /var/sites/n/naturescupboard.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Paypal_Controller_Express_Abstract->startAction()
#4 /var/sites/n/naturescupboard.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('start')
#5 /var/sites/n/naturescupboard.co.uk/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#6 /var/sites/n/naturescupboard.co.uk/public_html/app/code/core/Mage/Core/Model/App.php(381): Mage_Core_Controller_Varien_Front->dispatch()
#7 /var/sites/n/naturescupboard.co.uk/public_html/app/Mage.php(687): Mage_Core_Model_App->run(Array)
#8 /var/sites/n/naturescupboard.co.uk/public_html/index.php(83): Mage::run('', 'store')
#9 {main}
gl636474 commented 4 years ago

Varien_Http_Adapter_Curl error 28 is connection timed out. curl from shell on live system GET https://api.paypal.com/nvp receives a response (a redirect)

gl636474 commented 4 years ago

Enabled debug mode in PayPal system config settings. Resultant log file (**** indicates a valid value redacted from this post):

2020-07-08T09:59:21+00:00 DEBUG (7): Array
(
    [url] => https://api.paypal.com/nvp
    [SetExpressCheckout] => Array
        (
            [PAYMENTACTION] => Sale
            [AMT] => 4.58
            [CURRENCYCODE] => GBP
            [RETURNURL] => https://****/paypal/express/return/
            [CANCELURL] => https://****/paypal/express/cancel/
            [INVNUM] => 200000010
            [SOLUTIONTYPE] => Sole
            [GIROPAYCANCELURL] => https://****/paypal/express/cancel/
            [GIROPAYSUCCESSURL] => https://****/checkout/onepage/success/
            [BANKTXNPENDINGURL] => https://****/checkout/onepage/success/
            [LOCALECODE] => en_GB
            [ITEMAMT] => 4.58
            [TAXAMT] => 0.00
            [SHIPPINGAMT] => 0.00
            [L_NUMBER0] => ****
            [L_NAME0] => Alternative Handmade Soap Fragrance Free Aloe Vera 95g
            [L_QTY0] => 1
            [L_AMT0] => 2.29
            [L_NUMBER1] => ****
            [L_NAME1] => Alternative Handmade Soap Bergamot and Green Tea 95g
            [L_QTY1] => 1
            [L_AMT1] => 2.29
            [BUSINESS] => 
            [NOTETEXT] => 
            [EMAIL] => ****
            [FIRSTNAME] => ****
            [LASTNAME] => ****
            [MIDDLENAME] => 
            [SALUTATION] => 
            [SUFFIX] => 
            [COUNTRYCODE] => GB
            [STATE] => 
            [CITY] => ****
            [STREET] => ****
            [ZIP] => ****
            [PHONENUM] => ****
            [SHIPTOCOUNTRYCODE] => GB
            [SHIPTOSTATE] => 
            [SHIPTOCITY] => ****
            [SHIPTOSTREET] => ****
            [SHIPTOZIP] => ****
            [SHIPTOPHONENUM] => ****
            [SHIPTOSTREET2] => 
            [STREET2] => 
            [SHIPTONAME] => ****
            [ADDROVERRIDE] => 1
            [METHOD] => SetExpressCheckout
            [VERSION] => 72.0
            [USER] => ****
            [PWD] => ****
            [BUTTONSOURCE] => Magento_Cart_Community
        )

    [response] => Array
        (
        )

    [__pid] => 12229
)
gl636474 commented 4 years ago

There is one entry in paypal_cert table and the date stamp is approx 25 mins after the latest (in date) API certificate request from PayPal. Assuming certificate is valid (is encrypted in database). However old certificate is still valid for several months yet.