Notify transfer owners when files enter grace period.
Deploy Ladill Transfer / deploy (push) Successful in 1m0s

Send grace-entered and countdown emails to owners alongside recipient grace milestones so unpaid transfers get clear wallet top-up reminders before deletion.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-08 12:44:38 +00:00
co-authored by Cursor
parent 7c4673adb6
commit c53191a41b
13 changed files with 372 additions and 4 deletions
@@ -3,6 +3,7 @@
namespace App\Console\Commands;
use App\Services\Transfer\TransferBillingService;
use App\Services\Transfer\TransferOwnerMailService;
use App\Services\Transfer\TransferRecipientMailService;
use Illuminate\Console\Command;
@@ -12,17 +13,22 @@ class ProcessTransferBillingCommand extends Command
protected $description = 'Renew monthly transfer storage billing and delete transfers past the grace period';
public function handle(TransferBillingService $billing, TransferRecipientMailService $recipients): int
{
public function handle(
TransferBillingService $billing,
TransferRecipientMailService $recipients,
TransferOwnerMailService $owners,
): int {
$result = $billing->processDueRenewals();
$recipientEmails = $recipients->processDueMilestones();
$ownerEmails = $owners->processGraceReminders();
$this->info(sprintf(
'Transfer billing: %d renewed, %d entered grace, %d deleted, %d recipient reminders sent.',
'Transfer billing: %d renewed, %d entered grace, %d deleted, %d recipient reminders, %d owner grace reminders.',
$result['renewed'],
$result['graced'],
$result['deleted'],
$recipientEmails,
$ownerEmails,
));
return self::SUCCESS;