I know this is possible through the admin order area, but this is the use case :
If we want to extends this plugin and give us the ability to build invoice PDF through something else than wkhtmltopdf like an external API (Quickbooks, SageOne, etc) we have to be able to stop the invoice mail sending if something get wrong generating an Exception. But this Exception will stop the order process and we have to take care about our customers experience first.
What I suggest is to give us the ability to return null when using Sylius\InvoicingPlugin\Generator\InvoicePdfFileGeneratorInterface::generate(string $invoiceId): InvoicePdf
So if the PDF is not generated (is null) we don't send the mail.
But we have to store somewhere the fact we don't send it ($invoice->setPdfSent(true);) and also retry to send it later with a Command like sylius-invoicing:generate-invoices --only-not-sent=1.
What do you think of this feature ?
Do you see any enhancement to add to this feature ?
I know this is possible through the admin order area, but this is the use case :
If we want to extends this plugin and give us the ability to build invoice PDF through something else than
wkhtmltopdflike an external API (Quickbooks, SageOne, etc) we have to be able to stop the invoice mail sending if something get wrong generating anException. But thisExceptionwill stop the order process and we have to take care about our customers experience first.What I suggest is to give us the ability to return null when using
Sylius\InvoicingPlugin\Generator\InvoicePdfFileGeneratorInterface::generate(string $invoiceId): InvoicePdfSo if the PDF is not generated (is
null) we don't send the mail.But we have to store somewhere the fact we don't send it (
$invoice->setPdfSent(true);) and also retry to send it later with aCommandlikesylius-invoicing:generate-invoices --only-not-sent=1.What do you think of this feature ?
Do you see any enhancement to add to this feature ?