Notify transfer owners when files enter grace period.
Deploy Ladill Transfer / deploy (push) Successful in 1m0s
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user