[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: помогите с xml и js
50shades
Есть форма для отправки на liqpay:

<?php
$merchant_id='xxxxxxxxx';
$signature="xxxxxxxxxx";
$url="https://www.liqpay.com/?do=clickNbuy";
$method='card';
$phone='+xxxxxxxxxxx';
$xml="<request>
<version>1.2</version>
<result_url>http://mysite.com/lqanswer.php</result_url>
<server_url>http://mysite.com/lqanswer.php</server_url>
<merchant_id>$merchant_id</merchant_id>
<order_id>ORDER_1234</order_id>
<amount>$amount</amount>
<currency>UAH</currency>
<description>$descr</description>
<default_phone>$phone</default_phone>
<pay_way>$method</pay_way>
</request>
";


$xml_encoded = base64_encode($xml);
$lqsignature = base64_encode(sha1($signature.$xml.$signature,1));



echo("<form action='$url' method='POST'>
<input type='hidden' name='operation_xml' value='$xml_encoded' />
<input type='hidden' name='signature' value='$lqsignature' />
<label>Комментарий</label>
<input type='text' name='description' value='' />
<label>Сумма</label>
<input type='text' name='amount' value='' /> (UAH)
<input type='submit' value='Оплатить'/>
</form>");
?>


Вот как мне, значения полей description и amount записать в xml реквест и отправить форму? Спасибо.
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.