CluPilotCloud/app/Actions
nexxo 79564947d4
tests / pest (push) Failing after 7m24s Details
tests / assets (push) Successful in 20s Details
tests / release (push) Has been skipped Details
Actually issue the invoice when the money arrives
Everything was built — numbering, the frozen snapshot, the PDF, the mail, the
archive and its retention — and none of it was connected to anything. IssueInvoice
was called from nowhere but its own tests. So on a real server no invoice had
ever been created, the handover directory was empty, and rsync was correctly
copying nothing. Reported as "nothing gets copied", which it was.

One mail, not two. The invoice is issued the moment the payment lands, so an
order confirmation and an invoice mail would otherwise go out in the same second
for the same event — a defect rather than a preference. The invoice mail carries
the document and says everything the confirmation said, so it replaces it
whenever there is an invoice; the confirmation stays for when there cannot be
one.

Issuing is allowed to fail without taking the purchase with it. IssueInvoice
refuses while the company details are incomplete, and that refusal is correct —
an invoice without a registered name or a VAT number is not a valid invoice, and
issuing one consumes a number that can never be handed out again. The order
still stands, the machine is still built, and the invoice can be issued later.
Nothing here may throw at the webhook either: Stripe retries anything that is
not a 2xx, and a retry would re-enter provisioning and build a second machine
over a missing VAT number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 03:25:56 +02:00
..
Fortify Refuse a portal login for an address that already belongs to an operator 2026-07-28 14:42:16 +02:00
ApplyStripeBillingEvent.php fix(billing): hold only what cannot be matched, and let migrations roll back 2026-07-26 13:57:11 +02:00
BookAddon.php feat(billing): a proof register, and modules frozen at their booked price 2026-07-26 13:07:34 +02:00
OpenSubscription.php feat(billing): Stripe owns the billing cycle, we own capability 2026-07-26 13:36:28 +02:00
RecordCommercialEvent.php feat(billing): Stripe owns the billing cycle, we own capability 2026-07-26 13:36:28 +02:00
StartCustomerProvisioning.php Actually issue the invoice when the money arrives 2026-07-29 03:25:56 +02:00
StartHostOnboarding.php fix(engine): durable queueing for long provisioning steps 2026-07-25 10:36:49 +02:00