$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://money.yandex.ru/quickpay/confirm.xml');
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_POSTFIELDS, ДАННЫЕ);
о чем вопрос?о том что надо использовать функции по их назначению, или правильно сформировать вопрос, если что то в вопросе "оставляет вопросы" )
header("Location: https://money.yandex.ru/quickpay/confirm.xml");
<form method="POST" action="https://money.yandex.ru/quickpay/confirm.xml">
<input type="hidden" name="receiver" value="41001xxxxxxxxxxxx">
<input type="hidden" name="formcomment" value="Проект «Железный человек»: реактор холодного ядерного синтеза">
<input type="hidden" name="short-dest" value="Проект «Железный человек»: реактор холодного ядерного синтеза">
<input type="hidden" name="label" value="$order_id">
<input type="hidden" name="quickpay-form" value="donate">
<input type="hidden" name="targets" value="транзакция {order_id}">
<input type="hidden" name="sum" value="4568.25" data-type="number">
<input type="hidden" name="comment" value="Хотелось бы дистанционного управления.">
<input type="hidden" name="need-fio" value="true">
<input type="hidden" name="need-email" value="true">
<input type="hidden" name="need-phone" value="false">
<input type="hidden" name="need-address" value="false">
<label><input type="radio" name="paymentType" value="PC">Яндекс.Деньгами</label>
<label><input type="radio" name="paymentType" value="AC">Банковской картой</label>
<input type="submit" value="Перевести">
</form>
var isFormPrepared = false;
$('form').on('sumbit', function(ev) {
var form = $(this);
if (!isFormPrepared) {
ev.preventDefault();
$.post({
...
}).done(function(result) {
form.find('[name="label"]').val(result.label);
form.find('[name="targets"]').val(result.targets);
isFormPrepared = true;
form.submit();
})
}
})