It seems module "Ccavenuepay" can't send emails, please check email configuration.
If click place order button getting 5005 error,
Screenshot : https://snipboard.io/0rpivM.jpg
Log Error :
[2020-07-19 08:14:28] main.DEBUG: cache_invalidate: {“method”:“POST”,“url”:“http://test.abc.in/rest/english/V1/guest-carts/dcAogDQHLCwYGMKZ6Hj56kKGXTzrNHhx/payment-information"...”}} []
Solved! Go to Solution.
Hi @Aveeva ,
I got the clue related to your error. In your custom module app/code/Magento/Ccavenuepay/Model/Order/OrderEmail.php
replace constructor code with this:
public function __construct( Template $templateContainer, OrderIdentity $identityContainer, \Magento\Sales\Model\Order\Email\SenderBuilderFactory $senderBuilderFactory, \Psr\Log\LoggerInterface $logger, Renderer $addressRenderer, PaymentHelper $paymentHelper, OrderResource $orderResource, \Magento\Framework\App\Config\ScopeConfigInterface $globalConfig, ManagerInterface $eventManager ) { parent::__construct($templateContainer, $identityContainer, $senderBuilderFactory, $logger, $addressRenderer, $paymentHelper, $orderResource, $globalConfig, $eventManager); $this->orderResource = $orderResource; $this->globalConfig = $globalConfig; // $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log'); // $this->logger = new \Zend\Log\Logger(); // $this->logger->addWriter($writer); // $this->logger->info("__construct OrderEmail"); }
In the constructor file, you were writing one custom log file which I don't feel is much necessary and due to which we are getting this issue.
Clean the Magento cache after that in the admin.
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
Hi @Aveeva ,
Can you check for below points
1. Enable developer mode if not enabled using below command:
php bin/magento deploy:mode:set developer
2. Check for error in log files in var/log
System.log
Debug.log
Exception.log
3. Can you check is there any response in the ajax call which you have highlighted in your screenshot.
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
@Nishu Jindal My system.log file : https://paste.ofcode.org/HtvGJ6mrm9b9Pkb2jYnejd
Hi @Aveeva,
Do we have any information in exception.log or any log related to checkout (payment.log).
System.log don't have any information regarding the error. And if you have enabled developer mode then you can see the exact issue in the ajax call.
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
@Nishu Jindal shipping.log
<Response> <ServiceHeader> <MessageTime>2020-07-19T13:12:03.616+02:00</MessageTime> </ServiceHeader> <Status> <ActionStatus>Error</ActionStatus> <Condition> <ConditionCode>111</ConditionCode> <ConditionData>Error in parsing request XML:An invalid XML character (Unicode: 0x1f) was found in the element content of the document.</ConditionData> </Condition> </Status> </Response></res:ErrorResponse>
There is no exception.log.
Hi @Aveeva ,
Which shipping method you are using with your order. Try to change the shipping method which you are using.
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
@Nishu Jindal I am using a flat rate. From firefox getting more information error,
Fatal error</b>: Uncaught Error: Call to undefined method Zend\Log\Logger::error() in /usr/share/nginx/html/giri/vendor/magento/module-sales/Model/Order/Email/Sender.php:88
Screenshot: https://snipboard.io/oSAjB4.jpg
Hi @Aveeva ,
Can you please check module code which is app/code/Magento/ccAvenuePay/Model/Order/OrderEmail.php
And share the code here. Seems like this module isn't compatible with magento version.
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
It seems module "Ccavenuepay" can't send emails, please check email configuration.
@Nishu Jindal OrderEmail.php
<?php namespace Magento\Ccavenuepay\Model\Order; use Magento\Sales\Model\Order; use Magento\Sales\Model\Order\Email\Sender\OrderSender; use Magento\Payment\Helper\Data as PaymentHelper; use Magento\Sales\Model\Order\Email\Container\OrderIdentity; use Magento\Sales\Model\Order\Email\Container\Template; use Magento\Sales\Model\ResourceModel\Order as OrderResource; use Magento\Sales\Model\Order\Address\Renderer; use Magento\Framework\Event\ManagerInterface; class OrderEmail extends OrderSender { protected $logger; protected $orderResource; protected $globalConfig; public function __construct( Template $templateContainer, OrderIdentity $identityContainer, \Magento\Sales\Model\Order\Email\SenderBuilderFactory $senderBuilderFactory, \Psr\Log\LoggerInterface $logger, Renderer $addressRenderer, PaymentHelper $paymentHelper, OrderResource $orderResource, \Magento\Framework\App\Config\ScopeConfigInterface $globalConfig, ManagerInterface $eventManager ) { parent::__construct($templateContainer, $identityContainer, $senderBuilderFactory, $logger, $addressRenderer, $paymentHelper, $orderResource, $globalConfig, $eventManager); $this->orderResource = $orderResource; $this->globalConfig = $globalConfig; $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log'); $this->logger = new \Zend\Log\Logger(); $this->logger->addWriter($writer); $this->logger->info("__construct OrderEmail"); } public function send(Order $order, $forceSyncMode = false, $flag = false) { $payment = $order->getPayment()->getMethodInstance()->getCode(); $payment_confirmation_mail = $this->globalConfig->getValue('payment/ccavenuepay/payment_confirmation_mail'); $this->logger->info("Order Code == ".$payment); $this->logger->info("Email After Success == ".$payment_confirmation_mail); if($payment == 'ccavenuepay' && !$flag && $payment_confirmation_mail){ $this->logger->info("== Order email stop =="); return false; } $order->setSendEmail(true); if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) { if ($this->checkAndSend($order)) { $order->setEmailSent(true); $this->orderResource->saveAttribute($order, ['send_email', 'email_sent']); return true; } } else { $order->setEmailSent(null); $this->orderResource->saveAttribute($order, 'email_sent'); } $this->orderResource->saveAttribute($order, 'send_email'); return false; } }
Note : If i disabled the CcAvenue module order placed, but i need CcAvenue.