How to diagnose «An error occured on the server. Please try to place the order again»?

order-payment-processor
checkout
paypal-credit
payment-method-interface
order-payment
paypal

(Jyoti Rai) #1

Hi.
I am trying to place order with credit card payment method and but i stuck with this error ->
“An error occured on the server. Please try to place the order again”

In back-end i have configured the Payflow Paypal Payment Method(Payments Pro)


(Dmitry Fedyuk) #2

Log the exception here or set a breakpoint:


(Jyoti Rai) #3

This error log exception.I want to fix this…Can you please help me in that?

How i can fix this


(Dmitry Fedyuk) #4

To fix it you should log it first, because it is impossible to fix an unknown exception.


(Jyoti Rai) #5

With this i am also facing this issue while placing order
"400 Bad Request errors on ****rest/default/V1/carts/mine/payment-information"

In response i m getting this error

{“message”:“An error occurred on the server. Please try to place the order again.”,“trace”:"#0 /chroot/home/thompso2/thompsondev.tracyntimmy.com/html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Checkout\Model\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(54492, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))\n#1 /chroot/home/thompso2/thompsondev.tracyntimmy.com/html/var/generation/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(26): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callPlugins(‘savePaymentInfo…’, Array, Array)\n#2 [internal function]: Magento\Checkout\Model\PaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder(54492, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))\n#3 /chroot/home/thompso2/thompsondev.tracyntimmy.com/html/vendor/magento/module-webapi/Controller/Rest.php(307): call_user_func_array(Array, Array)\n#4 /chroot/home/thompso2/thompsondev.tracyntimmy.com/html/vendor/magento/module-webapi/Controller/Rest.php(216): Magento\Webapi\Controller\Rest->processApiRequest()\n#5 /chroot/home/thompso2/thompsondev.tracyntimmy.com/html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))\n#6 /chroot/home/thompso2/thompsondev.tracyntimmy.com/html/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#7 /chroot/home/thompso2/thompsondev.tracyntimmy.com/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()\n#8 /chroot/home/thompso2/thompsondev.tracyntimmy.com/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))\n#9 {main}"}


(Dmitry Fedyuk) #6

Try to log the previous exception. E.g.:

} catch (\Exception $e) {
	if ($e->getPrevious()) {
		$this->getLogger()->critical($e->getPrevious());
	}
	$this->getLogger()->critical($e);
	throw new CouldNotSaveException(
		__('An error occurred on the server. Please try to place the order again.'),
		$e
	);
}

(sIiiS) #7

It seems magento has problem in payment methods when you logged as customer!
try to checkout as guest and you can see there is no error!!


(Vinod Kumar) #8

@sIiiS, have you fixed the issue?

I am facing the same issue in magento 2.1.5