added tahesab options

This commit is contained in:
2026-06-25 22:20:40 +03:30
parent 936cc88e53
commit e6e1ff0cc4
11 changed files with 411 additions and 144 deletions
@@ -257,14 +257,13 @@ class CustomerController extends Controller
$referrerWallet = Wallet::where('owner', $referrer->id)->first();
if($this->Config('send_to_tahesab') == "true"){
try {
$tahesab = new TahesabController();
$tahesab->referrerGoldReward(
app(TahesabController::class)->referrerGoldReward(
$customer,
(float) $gift_for_inviter,
'پاداش بابت معرفی'
);
}catch (\Exception $e){
return response($e->getMessage(), 500);
} catch (\Exception $e) {
report($e);
}
}
$message = "سلام {$referrer->name} عزیز،\n\n{$gift_for_inviter} گرم طلا بابت معرفی {$customer->name} به حساب شما واریز شد.\nموجودی فعلی: {$referrerWallet->gold} گرم.\n\nاطلاعات بیشتر: $companyurl\n\nبا احترام،\n$companyName";
@@ -306,14 +305,13 @@ class CustomerController extends Controller
$referrerWallet = Wallet::where('owner', $customer->id)->first();
if($this->Config('send_to_tahesab') == "true"){
try {
$tahesab = new TahesabController();
$tahesab->goldReward([
app(TahesabController::class)->goldReward([
'customer_id' => $customer->id,
'value' => $gift_for_invited,
'desc' => 'پاداش بابت ثبت نام',
]);
}catch (\Exception $e){
return response($e->getMessage(), 500);
} catch (\Exception $e) {
report($e);
}
}
$message = "سلام " . $customer->name . " عزیز،\n\n" . $gift_for_invited . " گرم طلا بابت ثبت نام " . " به حساب شما واریز شد.\n" . "موجودی فعلی: " . $referrerWallet->gold . " گرم.\n\n" . "اطلاعات بیشتر: " . $companyurl . "\n\n" . "با احترام،\n" . $companyName;