Magento shows error message when trying to make payment with PayPal

Boon Chye Phang
Boon Chye Phang used Ask the Experts™
on
In my Magento 1.9.3.3 community, there were some customers trying to make payment by PayPal but seeing the error "There was an error processing your order. Please contact us or try again later". In exception log found the following:
exception 'Exception' with message 'PayPal response hasn't required fields.' in C:\Web\mystore\app\code\core\Mage\Paypal\Model\Api\Nvp.php:996
Stack trace:
C:\Web\mystore\app\code\core\Mage\Paypal\Model\Api\Nvp.php(644): Mage_Paypal_Model_Api_Nvp->call('DoExpressChecko...', Array)
C:\Web\mystore\app\code\core\Mage\Paypal\Model\Express.php(581): Mage_Paypal_Model_Api_Nvp->callDoExpressCheckoutPayment()
C:\Web\mystore\app\code\core\Mage\Paypal\Model\Express.php(377): Mage_Paypal_Model_Express->_placeOrder(Object(Mage_Sales_Model_Order_Payment), '987')
C:\Web\mystore\app\code\core\Mage\Sales\Model\Order\Payment.php(443): Mage_Paypal_Model_Express->capture(Object(Mage_Sales_Model_Order_Payment), '987')
C:\Web\mystore\app\code\core\Mage\Sales\Model\Order\Invoice.php(395): Mage_Sales_Model_Order_Payment->capture(Object(Mage_Sales_Model_Order_Invoice))
C:\Web\mystore\app\code\core\Mage\Sales\Model\Order\Payment.php(608): Mage_Sales_Model_Order_Invoice->capture()
C:\Web\mystore\app\code\core\Mage\Sales\Model\Order\Payment.php(410): Mage_Sales_Model_Order_Payment->_invoice()
C:\Web\mystore\app\code\core\Mage\Sales\Model\Order\Payment.php(348): Mage_Sales_Model_Order_Payment->capture(NULL)
C:\Web\mystore\app\code\core\Mage\Sales\Model\Order.php(896): Mage_Sales_Model_Order_Payment->place()
C:\Web\mystore\app\code\core\Mage\Sales\Model\Order.php(1114): Mage_Sales_Model_Order->_placePayment()
[internal function]: Mage_Sales_Model_Order->place()
C:\Web\mystore\app\code\core\Mage\Core\Model\Resource\Transaction.php(105): call_user_func(Array)
C:\Web\mystore\app\code\core\Mage\Core\Model\Resource\Transaction.php(159): Mage_Core_Model_Resource_Transaction->_runCallbacks()
C:\Web\mystore\app\code\core\Mage\Sales\Model\Service\Quote.php(189): Mage_Core_Model_Resource_Transaction->save()
C:\Web\mystore\app\code\core\Mage\Sales\Model\Service\Quote.php(249): Mage_Sales_Model_Service_Quote->submitOrder()
C:\Web\mystore\app\code\core\Mage\Paypal\Model\Express\Checkout.php(599): Mage_Sales_Model_Service_Quote->submitAll()
C:\Web\mystore\app\code\core\Mage\Paypal\Controller\Express\Abstract.php(320): Mage_Paypal_Model_Express_Checkout->place('EC-70681376N394...')
C:\Web\mystore\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Paypal_Controller_Express_Abstract->placeOrderAction()
C:\Web\mystore\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('placeOrder')
C:\Web\mystore\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
C:\Web\mystore\app\code\core\Mage\Core\Model\App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
C:\Web\mystore\app\Mage.php(684): Mage_Core_Model_App->run(Array)
C:\Web\mystore\sg\index.php(81): Mage::run('sg', 'website')
{main}

Open in new window


How do I know what was wrong and fix it?

I tried to add adding log as mentioned in this forum https://community.magento.com/t5/Payments-PayPal/PayPal-response-hasn-t-required-fields-AMT-field-is-deprecated/td-p/51852 and seeing the same log message "PayPal response hasn't required fields - AMT". But there is no solution yet.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018

Commented:
Post your actual site URL for testing.

You may be caught in the SSL (really TLS) change that began occurring on 2018-06-29 + has now rolled in to almost all PayPal accounts.

PayPal now requires sites initiating payments to PayPal (via links or in your case Magento) only run TLSv1.2+, so only v1.2 + v1.3 are allowed.

If any other protocols are supported by your site, you'll likely see 100% errors initiating payments + the errors won't make sense.

Look at the https://www.ssllabs.com/ssltest/analyze.html?d=davidfavor.com&latest SSL report + change your SSL config to produce identical results - A+ with 4x 100 detail scores - then... likely... your PayPal payments will magically resume working.
Can you check the debug log and confirm if you are getting correct response from paypal? This seems to be problem with error transaction.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial