<script>
(function() {
const productName = "Хочу трансформироваться";
const productSumm = "7000";
function switchingPaymentSystem(form) {
const tempLink = document.createElement('a');
tempLink.href = `#order:${productName}=${productSumm}`;
const container = document.querySelector('.uc-form-pay');
if (container) {
container.appendChild(tempLink);
tempLink.click();
container.removeChild(tempLink);
}
}
function us_sendFormAfterSuccess() {
var forms = document.querySelectorAll('.uc-form-pay .js-form-proccess');
Array.prototype.forEach.call(forms, function (form) {
form.addEventListener('tildaform:aftersuccess', function () {
switchingPaymentSystem(form);
});
});
}
if (document.readyState !== 'loading') {
us_sendFormAfterSuccess();
} else {
document.addEventListener('DOMContentLoaded', us_sendFormAfterSuccess);
}
})();
</script>
<style>
.js-payment-systembox {
position: fixed !important;
top: 0% !important;
left: 0% !important;
width: 100%;
height: 100%;
margin: 0 !important;
background-color: rgb(0 0 0 / 70%);
pointer-events: none;
}
.js-payment-systembox .js-dropdown-paysystem {
width: max-content;
margin: 0 auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
pointer-events: all;
}
</style>
<script>
const productName = "Хочу трансформироваться";
const productSumm = "7000";
function t396_onSuccess(form) {
if (form?.closest('.form-pay')) {
const tempLink = document.createElement('a');
tempLink.href = `#order:${productName}=${productSumm}`;
const container = document.querySelector('.form-pay');
if (container) {
container.appendChild(tempLink);
tempLink.click();
container.removeChild(tempLink);
}
}
}
</script>
<style>
.js-payment-systembox {
position: fixed !important;
top: 0% !important;
left: 0% !important;
width: 100%;
height: 100%;
margin: 0 !important;
background-color: rgb(0 0 0 / 70%);
pointer-events: none;
}
.js-payment-systembox .js-dropdown-paysystem {
width: max-content;
margin: 0 auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
pointer-events: all;
}
</style>