all customer from pargar fixing 3

This commit is contained in:
2026-07-22 01:05:00 +03:30
parent 01031e9e01
commit 133f4156c6
13 changed files with 214 additions and 59 deletions
+17 -1
View File
@@ -303,6 +303,7 @@ class PargarSyncService
public function confirmOrders(array $orderIds): array
{
$confirmed = 0;
$customerIds = [];
foreach ($orderIds as $orderId) {
$id = trim((string) $orderId);
@@ -325,6 +326,9 @@ class PargarSyncService
if ($log) {
$this->markSuccess($log, $id, ['OrderId' => $id]);
if ($log->customer_id) {
$customerIds[(int) $log->customer_id] = true;
}
$confirmed++;
}
@@ -345,6 +349,9 @@ class PargarSyncService
if ($log) {
$this->markSuccess($log, $id, ['OrderId' => $id]);
if ($log->customer_id) {
$customerIds[(int) $log->customer_id] = true;
}
$confirmed++;
}
@@ -364,10 +371,19 @@ class PargarSyncService
$this->markSuccess($log, (string) $order->id, ['OrderId' => (string) $order->id]);
}
if ($order->customer_id) {
$customerIds[(int) $order->customer_id] = true;
} elseif ($log?->customer_id) {
$customerIds[(int) $log->customer_id] = true;
}
$confirmed++;
}
return ['confirmed' => $confirmed];
return [
'confirmed' => $confirmed,
'customer_ids' => array_keys($customerIds),
];
}
public function retry(PargarSyncLog $log): array