0

Eway payment getting an error A server error stopped your order from being placed. Please try to place your order again

enter image description here

Note : Amount received in eWAY payment gateway, but order not created in magento2.

ewayrapid_debug.log : https://justpaste.it/8qla2

6
  • Could you check the error log in var/log/exception.log file?
    – Renjith R
    Commented Aug 10, 2020 at 5:50
  • @RenjithR My exception.log error justpaste.it/758ai
    – zus
    Commented Aug 11, 2020 at 8:41
  • Did you talk with eWay team? They will be able to help you out. Also, look for this line of exception: Array to string conversion in /vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line. You should find this in server log or var/log/exception.log. Commented Aug 13, 2020 at 5:41
  • @AdarshKhatri Eway team also told check Magento log, my exception.log file justpaste.it/3zj43
    – zus
    Commented Aug 14, 2020 at 3:53
  • May I know if you had migrated M1 to M2 and you were using "M2e" extension in M1? Also, does it happens every time or only sometimes? Commented Aug 14, 2020 at 4:09

2 Answers 2

1

To know the exact reason, update the following core file:

vendor/magento/module-checkout/Model/PaymentInformationManagement.php

Please comment out the try-catch same as below:

public function savePaymentInformationAndPlaceOrder(
    $cartId,
    \Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
    \Magento\Quote\Api\Data\AddressInterface $billingAddress = null
) {
    $this->savePaymentInformation($cartId, $paymentMethod, $billingAddress);
    // try {
        $orderId = $this->cartManagement->placeOrder($cartId);
    // } catch (\Magento\Framework\Exception\LocalizedException $e) {
    //     throw new CouldNotSaveException(
    //         __($e->getMessage()),
    //         $e
    //     );
    // } catch (\Exception $e) {
    //     $this->getLogger()->critical($e);
    //     throw new CouldNotSaveException(
    //         __('A server error stopped your order from being placed. Please try to place your order again.'),
    //         $e
    //     );
    // }
    return $orderId;
}

Now, try to place order again. You will be able to see the detailed error in log file or may be in Browser > Inspect Element > Network.

Note: Please do not forget to revert the core file after updating the code.

8
  • There is no module-checkout folder under vendor/magento snipboard.io/PSnvb8.jpg How to edit the file? @Pratik Oza
    – zus
    Commented Aug 15, 2020 at 15:30
  • Find this path: app/code/Magento/Checkout/Model/PaymentInformationManagement.php OR check symlink folder.
    – Pratik Oza
    Commented Aug 15, 2020 at 16:24
  • Yes, found it, now error like snipboard.io/d9gYuj.jpg
    – zus
    Commented Aug 15, 2020 at 16:25
  • Please refer this link.
    – Pratik Oza
    Commented Aug 15, 2020 at 16:26
  • For my clarity, does 2.1.x code support 2.3.x?
    – zus
    Commented Aug 15, 2020 at 16:33
0

In our case, the same message had to do with RabbitMQ credentials. As explained in this link https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/prerequisites/rabbitmq.html to connect with RabbitMQ on Magento you should insert in app/etc/env.php these credentials:

'amqp' =>
array (
  'host' => 'yourhost.example.com',
  'port' => '5672',
  'user' => 'magento',
  'password' => 'magento',
  'virtualhost' => '/'
 ),

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.