laybuy / Magento-2-Latest

2 stars 9 forks source link

Invoice number not sent in emails. #28

Open LiamKarlMitchell opened 4 years ago

LiamKarlMitchell commented 4 years ago

Invoice number not sent in Invoice emails yet other payment methods do have it.

image

composer.json shows me name: "laybuy/laybuy" Version: 0.1.0

Place to look possibly Model/Laybuy.php in sendOrderEmail function.

LiamKarlMitchell commented 4 years ago

Actually in processLaybuySuccessPayment the sendOrderEmail looks to be called before the invoice is created.

It should probably be after the "createInvoiceAndUpdateOrder" And in that method, there is a invoiceSender->send call but its still before the invoice is saved to the db, in which case it has no Invoice ID set.