feat: implement SMS notification service and integrate with existing services

This commit is contained in:
2026-09-21 02:47:12 +03:30
parent 51b13631a3
commit 1e599b917b
9 changed files with 153 additions and 48 deletions
+10
View File
@@ -8,9 +8,17 @@ use App\Enums\InvoicePaymentMethodEnum;
use App\Enums\InvoiceStatusEnum;
use App\Models\Document;
use App\Models\Invoice;
use App\Services\Sms\SmsNotificationService;
class InvoiceService
{
protected SmsNotificationService $smsNotificationService;
public function __construct(SmsNotificationService $smsNotificationService)
{
$this->smsNotificationService = $smsNotificationService;
}
public function createForDocument(Document $document): Invoice
{
$invoice = Invoice::create([
@@ -43,6 +51,8 @@ class InvoiceService
]);
}
$this->smsNotificationService->paymentConfirmed($invoice);
return $invoice;
}
}