all customer from pargar fixing 3
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user