handled some bugs and adde some feature for banner
This commit is contained in:
@@ -61,7 +61,7 @@ class PargarSyncService
|
||||
|
||||
public function registerOnCreate(Customer $customer): void
|
||||
{
|
||||
if (! empty($customer->pargar_account_id) || ! $this->isSyncEnabled()) {
|
||||
if ($customer->hasValidPargarAccountId() || ! $this->isSyncEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class PargarSyncService
|
||||
}
|
||||
|
||||
$customer = Customer::find($customerId);
|
||||
if ($customer === null || ! empty($customer->pargar_account_id)) {
|
||||
if ($customer === null || $customer->hasValidPargarAccountId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ class PargarSyncService
|
||||
{
|
||||
$customer->refresh();
|
||||
|
||||
if (! empty($customer->pargar_account_id)) {
|
||||
if ($customer->hasValidPargarAccountId()) {
|
||||
return [
|
||||
'ok' => true,
|
||||
'message' => 'مشتری قبلاً در پرگار ثبت شده است',
|
||||
|
||||
Reference in New Issue
Block a user