Add recipient email and milestone notifications on transfer create.
Deploy Ladill Transfer / deploy (push) Successful in 44s
Deploy Ladill Transfer / deploy (push) Successful in 44s
Recipients can be emailed the download link immediately and at optional reminders (7/3/1 days before unavailable, or when grace period starts). 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\TransferRecipientMailService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ProcessTransferBillingCommand extends Command
|
||||
@@ -11,15 +12,17 @@ class ProcessTransferBillingCommand extends Command
|
||||
|
||||
protected $description = 'Renew monthly transfer storage billing and delete transfers past the grace period';
|
||||
|
||||
public function handle(TransferBillingService $billing): int
|
||||
public function handle(TransferBillingService $billing, TransferRecipientMailService $recipients): int
|
||||
{
|
||||
$result = $billing->processDueRenewals();
|
||||
$recipientEmails = $recipients->processDueMilestones();
|
||||
|
||||
$this->info(sprintf(
|
||||
'Transfer billing: %d renewed, %d entered grace, %d deleted.',
|
||||
'Transfer billing: %d renewed, %d entered grace, %d deleted, %d recipient reminders sent.',
|
||||
$result['renewed'],
|
||||
$result['graced'],
|
||||
$result['deleted'],
|
||||
$recipientEmails,
|
||||
));
|
||||
|
||||
return self::SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user