Wire seller push notifications with FCM, inbox API, and payment milestones.
Deploy Ladill Mini / deploy (push) Successful in 52s
Deploy Ladill Mini / deploy (push) Successful in 52s
Sellers get instant payment alerts on Android; withdrawals respect payout prefs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Models\QrCode;
|
||||
use App\Services\Billing\BillingClient;
|
||||
use App\Services\Billing\PaystackService;
|
||||
use App\Services\Billing\SmsService;
|
||||
use App\Services\Notifications\MiniNotificationService;
|
||||
use App\Services\Pay\PayClient;
|
||||
use Illuminate\Support\Str;
|
||||
use RuntimeException;
|
||||
@@ -18,6 +19,7 @@ class MiniPaymentService
|
||||
private PaystackService $paystack,
|
||||
private BillingClient $billing,
|
||||
private SmsService $sms,
|
||||
private MiniNotificationService $notifications,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -119,7 +121,9 @@ class MiniPaymentService
|
||||
'metadata' => array_merge((array) $payment->metadata, ['ladill_pay' => $payOrder]),
|
||||
]);
|
||||
|
||||
$this->notifyPayer($payment->fresh(['qrCode', 'merchant']));
|
||||
$payment = $payment->fresh(['qrCode', 'merchant']);
|
||||
$this->notifyPayer($payment);
|
||||
$this->notifications->paymentReceived($payment);
|
||||
|
||||
return $payment;
|
||||
}
|
||||
@@ -162,7 +166,9 @@ class MiniPaymentService
|
||||
sprintf('Payment via %s', $businessName),
|
||||
);
|
||||
|
||||
$this->notifyPayer($payment->fresh(['qrCode', 'merchant']));
|
||||
$payment = $payment->fresh(['qrCode', 'merchant']);
|
||||
$this->notifyPayer($payment);
|
||||
$this->notifications->paymentReceived($payment);
|
||||
|
||||
return $payment;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user