Magento 2: An error occurred on the server. Please try to place the order again

When user want to checkout sometimes i got below message.

enter image description here

After correction of Billing & Shipping Address Sometimes user able to place order some times not.

Due to this customer not able to order.

What will be the perfect solution for this?

Solutions

If the magento version is > 2.4 then check service elasticsearch is in running state.

You may echo the actual error message on this file: vendor/magento/module-payment/view/frontend/templates/transparent/iframe.phtml if you did not extend the file yet or if you did you may edit this on app/design/[vendor]/[theme]/ go to line 42 and replace this

   message: $t('An error occurred on the server. Please try to place the order again.')

with this

    message: $t('<?php echo $params['error_msg'];?>')

In my case, when the customer purchased using Credit card via Payapal Gateway I was able to trace the error message on this file vendor/magento/module-paypal/Model/Payflow/Service/Response/Validator/ResponseValidator.php

The payment was actualy declined with the response code ESPONSE_CODE_FRAUDSERVICE_FILTER but magento will display the default error message instead of showing Fraud Error message.

Please go to vendor/magento/module-checkout/Model/PaymentInformationManagement.php Functions: savePaymentInformationAndPlaceOrder() Change line 85 and 90 with follow code:

throw new CouldNotSaveException( __($e->getMessage()), $e );

After that, please try to checkout and you can see the error message.

Similar questions

Braintree Integration "Unable to place order. Please try again later." - Magento 2.1-rc3
I'm working the Braintree integration, I have Magento 2.1-rc3 installed. Two issues are happening: 1) Error: "Unable to place order. Please try again later." and Magento redirect to Shopping Cart again. In this case I checked the debug.log and it shows the status of Submitted to Settlement, it is communicating normally with Braintree, I can find th...
PayPal Payflow Link Show Unable to place Order, Please Try Again
I use magento v2.1.0, I input Partner, vendor, user and password. but When I buy product and checkout I go to Review & Payment step It's show Contiune Button , I click continue it show "Unable to place Order, Please Try Again" I don't know why. and I search about problem on google but not successful. Now customers can not buy on my site. Help m...
Access denied Please try to logout and sign in again. If this message persists, please contact the store owner
i getting the error "Access denied Please try to logout and sign in again. If this message persists, please contact the store owner." when i try to login in admin panel. i have no other username and password.I also tried to log out and login again but same problem. please tell me any solution.
Magento 2.1.1 An error occured on the server please try again at checkout
for a while we've been getting an error when checking out with Braintree using a sandbox account. we simply get the error 'An error has occurred on the server, please try again" The error occurs when hitting the checkout button I've tried removing the table prefix and running the SQL fix but the error still persists. There is nothing incorrect in t...
There was an error processing your order. Please contact us or try again later - Paypal
I've been getting this random error that occurs when customers try to checkout using PayPal Express I've looked in the exception.log file but I am not sure what could be causing it as it is completely random. Has anyone come accross this issue and successfully diagnosed it before? I'd appreciate if you could assist me...
AUTHORIZE.NET There was an error processing your order. Please contact us or try again later
I have two payment options set up in Magento 1.9.0.1. PayPal, and Authorize.net. PayPal works fine. Authorize.net is throwing an error and I can't for the life of my figure it out. I been searching for DAYS. Problem: After selecting Authorize.net and putting in the required information, I'm redirected to the next step of the OnePage checkout proces...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.