Files
Moodle/amd/build/gateways_modal.min.js
T

13 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
define("paygw_moneta/gateways_modal",["exports","core/config"],(function(_exports,_config){var obj;
/**
* Запуск оплаты через Moneta из модального окна «Выберите способ оплаты».
*
* Заказ создаёт pay.php по POST с sesskey — поэтому здесь не редирект,
* а отправка скрытой формы.
*
* @module paygw_moneta/gateways_modal
* @copyright 2026 Moneta Labs {@link https://moneta.ru/}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.process=void 0,_config=(obj=_config)&&obj.__esModule?obj:{default:obj};_exports.process=(component,paymentArea,itemId,description)=>{const form=document.createElement("form");form.method="post",form.action="".concat(_config.default.wwwroot,"/payment/gateway/moneta/pay.php"),form.style.display="none";const fields={sesskey:_config.default.sesskey,component:component,paymentarea:paymentArea,itemid:itemId,description:description};return Object.entries(fields).forEach((_ref=>{let[name,value]=_ref;const input=document.createElement("input");input.type="hidden",input.name=name,input.value=value,form.appendChild(input)})),document.body.appendChild(form),form.submit(),new Promise((()=>null))}}));
//# sourceMappingURL=gateways_modal.min.js.map