-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add ability to resend automatically failed generated PDF #127
Comments
Hi Francis! While I think that we should make the invoice sending related abstraction more customizable, I'm not convinced that allowing The business value that you want to achieve here is to allow the pdf file generator to fail during invoice generation and do not let this failure stop the whole order payment process. That sounds reasonable to me. Hence, the cleanest solution would IMO look like this:
I agree that being able to generate (and probably send) the pdf files for Invoices with That being said, the We, as the Sylius Core Team, will talk about this issue soon and come back with some output :) |
Great answer I totally agree with you. This plugin is very useful, can't wait to see it updated ;) |
Hi Francis! We've refined that issue and put it in our backlog. We'll work on it soon :) |
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 anException
. But thisException
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 aCommand
likesylius-invoicing:generate-invoices --only-not-sent=1
.What do you think of this feature ?
Do you see any enhancement to add to this feature ?
The text was updated successfully, but these errors were encountered: