fix tahesab

This commit is contained in:
2026-06-07 14:30:26 +03:30
parent 085237364d
commit 20ed4ee3ad
4 changed files with 128 additions and 39 deletions
@@ -218,11 +218,10 @@ class CustomerController extends SuperController
if($this->Config('send_to_tahesab') == "true"){
try {
$tahesab = new TahesabController();
$tahesab->walletGold([
'customer_id'=> $customer->id,
'value'=> $gift_for_inviter,
'direction'=> 0,
'desc' => 'پاداش بابت معرفی'
$tahesab->goldReward([
'customer_id' => $customer->referral->id,
'value' => $gift_for_inviter,
'desc' => 'پاداش بابت معرفی',
]);
}catch (\Exception $e){
return response($e->getMessage(), 500);
@@ -268,11 +267,10 @@ class CustomerController extends SuperController
if($this->Config('send_to_tahesab') == "true"){
try {
$tahesab = new TahesabController();
$tahesab->walletGold([
'customer_id'=> $customer->id,
'value'=> $gift_for_inviter,
'direction'=> 0,
'desc' => 'پاداش بابت ثبت نام'
$tahesab->goldReward([
'customer_id' => $customer->id,
'value' => $gift_for_invited,
'desc' => 'پاداش بابت ثبت نام',
]);
}catch (\Exception $e){
return response($e->getMessage(), 500);