A
A
Alexey Sklyarov2017-09-14 09:54:24
PHP
Alexey Sklyarov, 2017-09-14 09:54:24

Why is the data substituted before sending to the Yandex form with payment not transmitted?

There is a payment form on the site:

<form action="https://demomoney.yandex.ru/eshop.xml" method="post" id="yaform">
                          <input type="text" name="name" placeholder="Ваше имя">
                          <input type="text" name="phone" placeholder="Ваш телефон">
                          <input type="text" name="mail" placeholder="Ваш e-mail">
                          <input name="shopId" value="155595" type="hidden"/>
                          <input name="scid" value="557917" type="hidden"/>
                          <input name="sum" value="0.00" type="hidden">
                          <input name="customerNumber" value="" type="hidden"/>
                          <input name="paymentType" value="AC" type="hidden"/>
                          <input name="orderNumber" value="" type="hidden"/>
                          <input name="cps_phone" value="" type="hidden"/>
                          <input name="cps_email" value="" type="hidden"/>
                          <input type="hidden" name="utm_term" value="<?php echo isset($_GET['utm_term']) ? $_GET['utm_term'] : '' ;?>">
                          <input type="hidden" name="utm_campaign" value="<?php echo isset($_GET['utm_source']) ? $_GET['utm_campaign'] : '' ;?>">
                          <input type="hidden" name="utm_content" value="<?php echo isset($_GET['utm_content']) ? $_GET['utm_content'] : '' ;?>">
                          <input type="hidden" name="utm_source" value="<?php echo isset($_GET['utm_source']) ? $_GET['utm_source'] : '' ;?>">
                          <input type="hidden" name="utm_medium" value="<?php echo isset($_GET['utm_medium']) ? $_GET['utm_medium'] : '' ;?>">
                        	<button type="submit" name="button" class="default-button">Перейти к оплате</button>
                          <div class="form-message form-error">Заполните все поля.</div>
                      </form>

And its handler:
$('#yaform').on("submit", function(e) {
  e.preventDefault();
  amoPushContact(this);
  yandexHandler(this);
  this.submit();
})

In the amoPushcontact() function, a contact is added to the crm system, its converted ID is received, after which this ID is substituted into the form in
<input name="customerNumber" value="" type="hidden"/>
After that, the redirect to the payment page takes place. But the system is not working correctly.
I click on the "Pay" button, a contact is added to amo, after which additional ones are added. data into the form, and the form transfers to Yandex, but this form no longer "sees" the new added data, although it contains them. How can this problem be solved?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question