fix referral sms bugs
This commit is contained in:
@@ -254,7 +254,6 @@ class CustomerController extends Controller
|
||||
'balance_cash' => 0, // یا مقدار مناسب دیگری
|
||||
'withdraw_id' => $Withdraw->id,
|
||||
]);
|
||||
$referrerWallet = Wallet::where('owner', $referrer->id)->first();
|
||||
if($this->Config('send_to_tahesab') == "true"){
|
||||
try {
|
||||
app(TahesabController::class)->referrerGoldReward(
|
||||
@@ -266,7 +265,8 @@ class CustomerController extends Controller
|
||||
report($e);
|
||||
}
|
||||
}
|
||||
$message = "سلام {$referrer->name} عزیز،\n\n{$gift_for_inviter} گرم طلا بابت معرفی {$customer->name} به حساب شما واریز شد.\nموجودی فعلی: {$referrerWallet->gold} گرم.\n\nاطلاعات بیشتر: $companyurl\n\nبا احترام،\n$companyName";
|
||||
$currentGold = self::formatSmsGoldWeight((float) $wallet_interface->wallet->refresh()->gold);
|
||||
$message = "سلام {$referrer->name} عزیز،\n\n{$gift_for_inviter} گرم طلا بابت معرفی {$customer->name} به حساب شما واریز شد.\nموجودی فعلی: {$currentGold} گرم.\n\nاطلاعات بیشتر: $companyurl\n\nبا احترام،\n$companyName";
|
||||
$this->Send($referrer->mobile, $message);
|
||||
}
|
||||
if($gift_for_invited > 0 ){
|
||||
@@ -302,7 +302,6 @@ class CustomerController extends Controller
|
||||
'balance_cash' => 0, // یا مقدار مناسب دیگری
|
||||
'withdraw_id' => $Withdraw->id,
|
||||
]);
|
||||
$referrerWallet = Wallet::where('owner', $customer->id)->first();
|
||||
if($this->Config('send_to_tahesab') == "true"){
|
||||
try {
|
||||
app(TahesabController::class)->goldReward([
|
||||
@@ -314,7 +313,8 @@ class CustomerController extends Controller
|
||||
report($e);
|
||||
}
|
||||
}
|
||||
$message = "سلام " . $customer->name . " عزیز،\n\n" . $gift_for_invited . " گرم طلا بابت ثبت نام " . " به حساب شما واریز شد.\n" . "موجودی فعلی: " . $referrerWallet->gold . " گرم.\n\n" . "اطلاعات بیشتر: " . $companyurl . "\n\n" . "با احترام،\n" . $companyName;
|
||||
$currentGold = self::formatSmsGoldWeight((float) $wallet_interface->wallet->refresh()->gold);
|
||||
$message = "سلام " . $customer->name . " عزیز،\n\n" . $gift_for_invited . " گرم طلا بابت ثبت نام " . " به حساب شما واریز شد.\n" . "موجودی فعلی: " . $currentGold . " گرم.\n\n" . "اطلاعات بیشتر: " . $companyurl . "\n\n" . "با احترام،\n" . $companyName;
|
||||
$this->Send($customer->mobile, $message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user