added pargar

This commit is contained in:
2026-07-05 16:43:34 +03:30
parent 694fddc909
commit 7ac7bbdb90
27 changed files with 1341 additions and 493 deletions
@@ -198,13 +198,21 @@ class SingleOrderController extends Controller
}
}
if ($config->getString('send_to_tahesab', 'false') === 'true') {
if ($config->isTahesabAccounting()) {
try {
$data['tahesab'] = app(TahesabController::class)->storeTrade($data);
} catch (\Exception $e) {
report($e);
}
}
if ($config->isPargarAccounting()) {
try {
app(\App\Services\PargarSyncService::class)->recordTrade($data['order'] ?? null);
} catch (\Throwable $e) {
report($e);
}
}
// $response['reward'] = $this->give_order_reward($data, $wallet, $wallet_interface);
if ((int) $data['direction'] === 1 && $customer) {
$referrer = Customer::where('referral_id', $customer->referral_to_id)->first();