emspay / magento2

Deprecation EMS Pay - Magento2 plugin
https://emspay.eu
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Order Confirmation and Invoice emails sent twice #29

Open viniciusfabri opened 4 years ago

viniciusfabri commented 4 years ago

There are a couple of lines in the module that force these emails to be sent and in synchronous form: Order confirmation: https://github.com/emspay/magento2/blob/master/app/code/EMS/Pay/Model/Ipn.php#L168 Invoice: https://github.com/emspay/magento2/blob/master/app/code/EMS/Pay/Model/Ipn.php#L175

One of the issues is that we have several customer websites that chose to not send one of these emails (or neither), so if we were to use this module on their site we'd need to patch the module to remove those lines

But the issue we are facing right now is that we have async email sending enabled for the site, but this forces the email to be sent anyway when the ipn notification is received, so we are getting duplicated emails

dligthart commented 4 years ago

Thanks for reporting this issue, we are looking into it.

dligthart commented 4 years ago

@viniciusfabri we have committed a fix in this branch: https://github.com/emspay/magento2/tree/task/46144_order_confirmation_and_invoice_emails_sent_twice

Skype+2019-11-25+16-34-55

Please review and let me know your comments.

viniciusfabri commented 4 years ago

Hi @dligthart ,

I can confirm it worked for us