Skip to content

[Feature] Add ability to resend automatically failed generated PDF #127

@Prometee

Description

@Prometee

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature proposals.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions