$(document).ready(function () {
window.successSubmitPopup = function ($form) {
$($form.serializeArray()).each(function(i, el) {
dataForm[el.name] = el.value;
dataForm.directionId = directionId;
var sourceUtm = '?' + getCookie('TILDAUTM').replace(/\|\|\|/g, '&');
var source = getUtmParameterByName('utm_source', sourceUtm);
var medium = getUtmParameterByName('utm_medium', sourceUtm);
var campaign = getUtmParameterByName('utm_campaign', sourceUtm);
var content = getUtmParameterByName('utm_content', sourceUtm);
var term = getUtmParameterByName('utm_term', sourceUtm);
dataQuery.Title = dataForm['tildaspec-formname'];
dataQuery.Name = dataForm.name;
dataQuery.PhoneWork = dataForm.phone;
dataQuery.Email = dataForm.email;
dataQuery.UfCrm1590947079659 = directionId;
dataQuery.UfCrm1610372907 = dataForm.productId;
dataQuery.url = 'https://ialysh.padilo.pro/mentorama_Deals/index.php';
dataQuery.UfCrm1601044853 = source;
dataQuery.UfCrm1601044832 = medium;
dataQuery.UfCrm1601044810 = campaign;
dataQuery.UfCrm1601044908 = content;
dataQuery.UfCrm1601044884 = term;
url: 'https://api.mentorama.com.br/api-payments/general-proxy',
success: function (response) {
$(".js-form-proccess").each(function () {
$(this).data("success-callback", "window.successSubmitPopup");