fix bug of pargar

This commit is contained in:
2026-07-26 14:15:26 +03:30
parent 667e3736fb
commit 06b3113b98
17 changed files with 561 additions and 26 deletions
@@ -1589,6 +1589,22 @@ class SingleOrderController extends Controller
'withdraw_id' => $Withdraw->id,
'active' => true,
], 3, true, true, 0);
try {
app(\App\Services\PargarSyncService::class)->queueWalletDocument(
$customer,
'cash',
(float) $customer_bonus,
[
'withdraw_id' => $Withdraw->id,
'note' => 'پاداش اولین سفارش',
'source' => 'bonus_first_order',
]
);
} catch (\Throwable $e) {
report($e);
}
$message = 'کیف پول شما به اندازه ' . number_format($customer_bonus) . ' ریال در تاریخ ' . verta()->format('Y/n/j H:i:s') . " شارژ شد بابت\n"
. 'پاداش اولین سفارش'
. ' '
@@ -1626,6 +1642,22 @@ class SingleOrderController extends Controller
'withdraw_id' => $Withdraw->id,
'active' => true,
], 3, true, true, 0);
try {
app(\App\Services\PargarSyncService::class)->queueWalletDocument(
$referrer,
'cash',
(float) $referrer_bonus,
[
'withdraw_id' => $Withdraw->id,
'note' => 'پاداش اولین سفارش زیرمجموعه',
'source' => 'bonus_referrer',
]
);
} catch (\Throwable $e) {
report($e);
}
$message = 'کیف پول شما به اندازه ' . number_format($referrer_bonus) . ' ریال در تاریخ ' . verta()->format('Y/n/j H:i:s') . " شارژ شد بابت\n"
. 'بابت پاداش اولین سفارش زیرمجموعه'
. ' '