Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #116

Merged
merged 7 commits into from
Dec 16, 2024
Merged

Dev #116

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ https://robokassa.com
+ Можно использовать пароль или кнопку для обхода платежа.
+ Сохраняет в базе номер курса и название группы студента.
+ Можно указать рекомендуемую цену, ограничить максимальную цену, или включить режим фиксированной цены.
+ Отображание продолжительности обучения (для enrol_fee и mod_gwpaymets), если она установлена.
+ Отображание продолжительности обучения (для enrol_yafee и mod_gwpaymets), если она установлена.
+ Конвертация валют на стороне банка (usd, eur, kzt).
+ Поддержка пароля из модуля курса (mod_gwpaymets).
+ Оповещение пользователя при успешном платеже.
Expand All @@ -21,7 +21,7 @@ https://robokassa.com
## Рекомендации

+ Moodle 4.3+
+ Для записи в курс используйте мой пропатченный плагин "Зачисление за оплату" [enrol_fee](https://github.com/Snickser/moodle-enrol_fee/tree/dev).
+ Для записи в курс используйте мой пропатченный плагин "Зачисление за оплату" [enrol_yafee](https://github.com/Snickser/moodle-enrol_yafee).
+ Для контрольного задания используйте пропатченный мной плагин по ссылке [mod_gwpayments](https://github.com/Snickser/moodle-mod_gwpayments/tree/dev).
+ Для ограничения доступности используйте пропатченный мной плагин по ссылке [availability_gwpayments](https://github.com/Snickser/moodle-availability_gwpayments/tree/dev).
+ Плагин просмотра отчётов и отключения регулярных платежей [report_payments](https://github.com/Snickser/moodle-report_payments/tree/dev).
Expand Down
7 changes: 1 addition & 6 deletions lang/en/paygw_robokassa.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
$string['sbp'] = 'SBP';

$string['internalerror'] = 'An internal error has occurred. Please contact us.';
$string['privacy:metadata'] = 'The Robokassa plugin does not store any personal data.';

$string['tax'] = 'VAT rate';
$string['tax_help'] = 'VAT rate according to YooKass documentation.';
Expand All @@ -78,7 +77,7 @@
4 - Unified Agricultural Tax (UST)<br>
5 - Patent taxation system';

$string['privacy:metadata'] = 'The robokassa plugin store some personal data.';
$string['privacy:metadata'] = 'The Robokassa plugin store some personal data.';
$string['privacy:metadata:paygw_robokassa:paygw_robokassa'] = 'Store some data';
$string['privacy:metadata:paygw_robokassa:shopid'] = 'Shopid';
$string['privacy:metadata:paygw_robokassa:paymentid'] = 'Paymentid';
Expand All @@ -96,10 +95,6 @@
You transaction of payment id {$a->orderid} with cost of {$a->localizedcost} is successfully completed.
If the item is not accessable please contact the administrator.';

$string['message_success_completed'] = 'Hello {$a->firstname},
You transaction of payment id {$a->orderid} with cost of {$a->fee} {$a->currency} for "{$a->description}" is successfully completed.
If the item is not accessable please contact the administrator.';

$string['message_recurrent_created'] = 'Hello, {$a->firstname}!
Regular payment No. {$a->orderid} at {$a->localizedcost} is ready for payment.
You can disable regular payments in the Reports (payment) section in your personal profile {$a->$url}/user/profile.php';
Expand Down
6 changes: 4 additions & 2 deletions pay.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
// Build redirect.
$url = helper::get_success_url($component, $paymentarea, $itemid);

// Set the context of the page.
$PAGE->set_url($SCRIPT);
$PAGE->set_context(context_system::instance());

// Check passwordmode or skipmode.
if (!empty($password) || $skipmode) {
$success = false;
Expand Down Expand Up @@ -283,8 +287,6 @@

$url = 'https://auth.robokassa.ru/Merchant/Index/' . $response->invoiceID;

// Set the context of the page.
$PAGE->set_context(context_system::instance());

// Notify user.
if ($config->sendlinkmsg || is_siteadmin()) {
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024121301;
$plugin->version = 2024121600;
$plugin->requires = 2023100900;
$plugin->component = 'paygw_robokassa';
$plugin->release = '2.8';
Expand Down