NASER optimize tahesabcontroller & add charge gold wallet

This commit is contained in:
2026-03-14 11:08:30 +03:30
parent 7de42d4edc
commit fe134310ba
2 changed files with 111 additions and 4 deletions
@@ -121,7 +121,7 @@ class WalletController extends Controller
if($this->Config('send_to_tahesab') == "true"){
try {
$data['direction'] = 0;
$data['direction'] = $deposit ? 0 : 1;
$tahesab = new TahesabController();
$tahesab->wallet($data);
}catch (\Exception $e){
@@ -185,6 +185,16 @@ class WalletController extends Controller
'active' => true
], 7, $deposit, false, $gold_block);
//send to tahesan
if($this->Config('send_to_tahesab') == "true"){
try {
$data['direction'] = $deposit ? 0 : 1;
$tahesab = new TahesabController();
$tahesab->walletGold($data);
}catch (\Exception $e){
return response($e->getMessage(), 500);
}
}
//send sms to users and customer
$status = $data['value'] > 0 ?" شارژ شد ": " کسر شد ";
if($this->Config('charge_notif') == "true"){