cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 order and invoice emails

Magento 2 order and invoice emails

Hello,

I'm having a weird issue with Magento 2.1.7.

When order is made, the customer gets the order confirmation email right.

But after payment, he should receive the invoice email, and wht he gets is a second copy of the order confirmation email.

The configuration in Stores > Configuration > Sales > Sales Emails is right.

Would anybody have an idea on what could be happening here ?

I'm using Magento CE 2.1.7 with PayBox gateway.

Hoping for answers,

Best regards,

David

7 REPLIES 7

Re: Magento 2 order and invoice emails

Hello @ShapesGS

 

https://github.com/PayboxByVerifone/Magento2/blob/master/Model/Payment/AbstractPayment.php

 

Line no 937, they are sending email.

 

Please comment 937 and 938 lines and check it.

 

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento 2 order and invoice emails

Hello,

Thank you for your answer, I made changes and now wait for an order.

Will the invoice be sent now ?

Re: Magento 2 order and invoice emails

I made the change, and had an order, but now the invoice is not being sent.

I should change PayBox module to send Invoice and not Order confirmation, but right now I do not know where to start..

Re: Magento 2 order and invoice emails

Instead of commenting the lines, I changed them from :

$orderSender = $this->_objectManager->get('Magento\Sales\Model\Order\Email\Sender\OrderSender');
$orderSender->send($order);

to :

$invoiceSender = $this->_objectManager->get('Magento\Sales\Model\Order\Email\Sender\InvoiceSender');
$invoiceSender->send($invoice);

Now  waiting for an order to see if it finally works..

Re: Magento 2 order and invoice emails

Unfortunately this does not work, those lines seem to block the process, oredr stays pending, even if payment is OK and still no invoice mail.. Any idea would be appreciated..

Re: Magento 2 order and invoice emails

Hi,

we have just seen your message, we are the development team of the Paybox extension. We released a new version which should fix your problem.

 

Regards,

BM Services

Re: Magento 2 order and invoice emails

Tried it and it works. Thanks.