Feat: Adding OrderReferenceDisplay Service that trims down order leading 0s

This commit is contained in:
2026-09-28 11:57:30 +03:00
parent effbce195c
commit 1214f9b748
10 changed files with 67 additions and 17 deletions
@@ -7,6 +7,7 @@ use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Support\Facades\Notification as NotificationFacade;
use Modules\Core\Notification\BaseNotification;
use Modules\Core\Order\Events\OrderRefunded;
use Modules\Core\Order\Support\OrderReferenceDisplay;
class OrderRefundedNotification extends BaseNotification
{
@@ -40,10 +41,12 @@ class OrderRefundedNotification extends BaseNotification
{
$order = $this->event->order;
$reference = OrderReferenceDisplay::resolve($order);
return (new MailMessage)
->subject(__('A refund has been issued for your order :reference', ['reference' => $order->reference]))
->subject(__('A refund has been issued for your order :reference', ['reference' => $reference]))
->view('core::order.notifications.refunded', [
'reference' => $order->reference,
'reference' => $reference,
'amount' => $this->event->transaction->amount->formatted,
]);
}