shouldSkip($product)) { return; } $config = app(ConfigService::class); $payload = [ 'customer_id' => $customer->id, 'value' => abs($value), 'direction' => $isDeposit ? 1 : 0, 'withdraw_id' => $withdrawId, 'note' => $note, 'product_id' => (int) $product->id, 'product' => [ 'id' => $product->id, 'title' => $product->title, 'group_type' => $product->group_type, 'metal_id' => $product->metal_id, 'amount' => $product->amount, 'unit' => $product->unit, 'trade_by_quantity' => $product->trade_by_quantity, ], ]; if ($config->isTahesabAccounting()) { try { app(TahesabController::class)->walletGold($payload); } catch (\Throwable $e) { report($e); } } if ($config->isZarinAccounting()) { try { app(ZarinController::class)->walletGold($payload); } catch (\Throwable $e) { report($e); } } } }