From 5f8f9cc4612122b45ebfdf10160c7163b53f31d4 Mon Sep 17 00:00:00 2001 From: Snickser Date: Sun, 21 Jul 2024 09:48:14 +0300 Subject: [PATCH] add --- lang/en/paygw_cryptocloud.php | 4 ++++ lang/ru/paygw_cryptocloud.php | 4 ++++ pay.php | 16 +++++++--------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lang/en/paygw_cryptocloud.php b/lang/en/paygw_cryptocloud.php index f5e804b..f21967c 100644 --- a/lang/en/paygw_cryptocloud.php +++ b/lang/en/paygw_cryptocloud.php @@ -77,3 +77,7 @@ $string['fixcost'] = 'Fixed price mode'; $string['fixcost_help'] = 'Disables the ability for students to pay with an arbitrary amount.'; $string['maxcosterror'] = 'The maximum price must be higher than the recommended price'; + +$string['message_invoice_created'] = 'Hello {$a->firstname}! +Your payment link {$a->orderid} to {$a->fee} {$a->currency} has been successfully created. +You can pay it within an hour.'; diff --git a/lang/ru/paygw_cryptocloud.php b/lang/ru/paygw_cryptocloud.php index 41fb91a..3b8f216 100644 --- a/lang/ru/paygw_cryptocloud.php +++ b/lang/ru/paygw_cryptocloud.php @@ -67,3 +67,7 @@ $string['fixcost'] = 'Режим фиксированной цены'; $string['fixcost_help'] = 'Отключает для студентов возможность оплаты произвольной суммой.'; $string['maxcosterror'] = 'Максимальная цена должна быть выше рекомендуемой цены'; + +$string['message_invoice_created'] = 'Здравствуйте, {$a->firstname}! +Платёжная ссылка {$a->orderid} на {$a->localizedcost} успешно создана. +Вы можете совершить платёж по ней в течении часа.'; diff --git a/pay.php b/pay.php index 9d77770..f32ce12 100644 --- a/pay.php +++ b/pay.php @@ -200,15 +200,13 @@ $PAGE->set_context(context_system::instance()); // Notify user. -if ($config->sendlinkmsg || is_siteadmin()) { - notifications::notify( - $userid, - $cost, - $currency, - $response->result->link, - 'Invoice created' - ); -} +notifications::notify( + $userid, + $cost, + $currency, + $response->result->link, + 'Invoice created' +); // Write to DB. $paygwdata->paymentid = $paymentid;