Hello, same problem here!
With that code i can attach the invoice on mail after order is paid>>>>i mean payment accepted
i added these lines on Mail.php
if(strpos($template,'payment')) {
$message->attach(new Swift_Message_Attachment(file_get_contents("/pdf-invoice.php?id_order=" . $template_vars['{id_order}']), "invoice.pdf", "application/pdf"));}
The problem now is that i m attaching a blank mail!
Any way to fix blank mails? I think something is wrong with my "path" of generated pdfs.
Result i m getting in payment mails is an attached blank file with name "invoice.pdf" 0kb