This commit is contained in:
2026-03-12 01:54:14 +05:00
parent 45ca714b17
commit d0d49d6517

View File

@@ -27,18 +27,20 @@ class SendVisaToSystem implements ShouldQueue
*/ */
public function handle(): void public function handle(): void
{ {
$orderItem = VisaMasterPaymentOrderItem::query() $orderItems = VisaMasterPaymentOrderItem::query()
->where('paid', true) ->where('paid', true)
->where('synced_with_system', false) ->where('synced_with_system', false)
->whereDate('created_at', '>', '2025-09-05') ->whereDate('created_at', '>', '2025-09-05')
->first(); ->limit(2)
->get()
->each(function ($orderItem) {
if (! $orderItem) {
return;
}
if (! $orderItem) { $result = syncVisaWithAzatAPI($orderItem);
return;
}
$result = syncVisaWithAzatAPI($orderItem); if (isset($result['error'])) {}
});
if (isset($result['error'])) {}
} }
} }