(function() { let pkWidgetConfig = document.createAttribute("data-config"); pkWidgetConfig.value = JSON.stringify({"form": {"sum": {"value": "33 333", "placeholder": "33 333"}, "orderid": {"enabled": false}, "clientid": {"label": "Имя", "required": true}, "client_email": {"label": "Email:", "required": true}, "client_phone": {"label": "Телефон:", "required": true}, "service_name": {"enabled": false}}, "title": "Участие", "serverUrl": "https://yourvitality.server.paykeeper.ru/", "useIframe": true, "description": "Введите данные для оплаты"}); let div = document.createElement("div"); div.setAttribute("id", "pk-paywidget"); document.getElementsByTagName("body")[0].appendChild(div); document.getElementById("pk-paywidget").setAttributeNode(pkWidgetConfig); let script = document.createElement("script"); script.setAttribute("src", "https://widgets.paykeeper.ru/paywidget/stabile/v2/paywidget.js"); script.setAttribute("type", "text/javascript"); script.setAttribute("async", "true"); document.getElementsByTagName("head")[0].appendChild(script); script = document.createElement("link"); script.setAttribute("rel", "stylesheet"); script.setAttribute("type", "text/css"); script.setAttribute("href", "https://widgets.paykeeper.ru/paywidget/stabile/v2/paywidget.css"); document.getElementsByTagName("head")[0].appendChild(script); })();