feat: update sms units to kilogram transactions notes price source label and trading closed message
This commit is contained in:
@@ -136,7 +136,7 @@ class RequestsController extends Controller
|
||||
throw new UnprocessableEntityHttpException('موجودی شما کمتر از میزان سفارش است');
|
||||
}
|
||||
$data['direction'] = 2;
|
||||
$data['description'] = "فروش {$data['amount']} گرم طلا برای $montifyCompanyName توسط کاربر {$myCustomer->name} با شماره موبایل {$myCustomer->mobile}";
|
||||
$data['description'] = "فروش {$data['amount']} کیلوگرم طلا برای $montifyCompanyName توسط کاربر {$myCustomer->name} با شماره موبایل {$myCustomer->mobile}";
|
||||
$data['order'] = $order = Order::create($data);
|
||||
new TransactionInterface($wallet_interface, [
|
||||
"gold" => $data['amount'],
|
||||
@@ -160,7 +160,7 @@ class RequestsController extends Controller
|
||||
}elseif ($data['method'] == 'gold') {
|
||||
$amountLabel = self::formatSmsGoldWeight($data['amount']);
|
||||
$message = "کاربر {$customer->name} با شماره موبایل {$customer->mobile} اقدام به $transactionType طلا به مقدار " .
|
||||
"{$amountLabel} گرم به مبلغ " . number_format($data['total_price']) .
|
||||
"{$amountLabel} کیلوگرم به مبلغ " . number_format($data['total_price']) .
|
||||
" ریال کرد. با تشکر، $companyName";
|
||||
}
|
||||
User::where('send_sms', 1)->get()->each(function ($admin) use ($message, $data, $transactionType, $companyName) {
|
||||
@@ -172,12 +172,12 @@ class RequestsController extends Controller
|
||||
// $this->SendTelegram($admin->telegram, $message);
|
||||
// });
|
||||
// $messageold = "کاربر {$customer->name} با شماره موبایل {$customer->mobile} اقدام به $transactionType طلا به مقدار " .
|
||||
// "{$data['amount']} گرم به مبلغ " . number_format($data['total_price']) .
|
||||
// "{$data['amount']} کیلوگرم به مبلغ " . number_format($data['total_price']) .
|
||||
// " ریال کرد. با تشکر، $companyName";
|
||||
// $azOrTa = $data['direction'] == 1 ? 'از' : 'به';
|
||||
// $messageExam = "
|
||||
// {$transactionType} قلک طلا $azOrTa شما
|
||||
// {$data['amount']} گرم
|
||||
// {$data['amount']} کیلوگرم
|
||||
// در مظنه
|
||||
// " . number_format($data['price_original']) . " ریال";
|
||||
//
|
||||
@@ -207,13 +207,13 @@ class RequestsController extends Controller
|
||||
"\nموجودی طلایی: {$goldBalance}\n" .
|
||||
"مانده ریالی: " . number_format($cashBalance) . "\n" . self::publicSiteUrl(request());
|
||||
}elseif ($data['method'] == 'gold') {
|
||||
$customerMessage = "$companyName\nبرداشت طلایی \nگرم: {$data['amount']}\nقیمت گرم: " . number_format($pricePerGram) .
|
||||
$customerMessage = "$companyName\nبرداشت طلایی \nکیلوگرم: {$data['amount']}\nقیمت کیلوگرم: " . number_format($pricePerGram) .
|
||||
"\nمبلغ کل: " . number_format($data['total_price']) . "\nموجودی طلایی: {$goldBalance}\n" .
|
||||
"مانده ریالی: " . number_format($cashBalance) . "\n" . self::publicSiteUrl(request());
|
||||
}
|
||||
|
||||
|
||||
// $customerMessage = "$companyName\n$transactionType آبشده\nگرم: {$data['amount']}\nقیمت گرم: " . number_format($pricePerGram) .
|
||||
// $customerMessage = "$companyName\n$transactionType آبشده\nکیلوگرم: {$data['amount']}\nقیمت کیلوگرم: " . number_format($pricePerGram) .
|
||||
// "\nمبلغ کل: " . number_format($data['total_price']) . "\n\nموجودی طلایی: {$wallet->gold}\n" .
|
||||
// "مانده ریالی: " . number_format($wallet->cash) . "\n" . $this->Config('app_url');
|
||||
|
||||
@@ -224,7 +224,7 @@ class RequestsController extends Controller
|
||||
try {
|
||||
$title = ($data['method'] ?? '') === 'gold' ? 'برداشت طلایی' : 'برداشت ریالی';
|
||||
$body = ($data['method'] ?? '') === 'gold'
|
||||
? 'گرم: ' . ($data['amount'] ?? '') . "\nمبلغ کل: " . number_format((float) ($data['total_price'] ?? 0)) . ' ریال'
|
||||
? 'کیلوگرم: ' . ($data['amount'] ?? '') . "\nمبلغ کل: " . number_format((float) ($data['total_price'] ?? 0)) . ' ریال'
|
||||
: 'مبلغ: ' . number_format((float) ($data['amount'] ?? 0)) . ' ریال';
|
||||
app(\App\Services\CustomerAppNotifyService::class)->notifyCustomer(
|
||||
(int) $customer->id,
|
||||
|
||||
Reference in New Issue
Block a user