<?php
$data = '
<oper>cmt</oper>
<wait>0</wait>
<test>1</test>
<payment id="">
<prop name="service_code" value="RPMTSU" />
<prop name="phone" value="%2B38066ххххххх" />
<prop name="amt" value="5.00" />
</payment>
';
$password="большая тайна";
$sign=sha1(md5($data.$password));
$xml='<?xml version="1.0" encoding="UTF-8"?>
<request version="1.0">
<merchant>
<id>111111</id>
<signature>'.$sign.'</signature>
</merchant>
<data>'
.$data.
'</data>
</request>';
$ch = curl_init("https://api.privatbank.ua/p24api/directfill");
curl_setopt($ch, CURLOPT_POST, true );
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml );
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/plain'));
$result=curl_exec ($ch);
print($xml);
print_r($result);
$info=curl_getinfo($ch);
curl_close($ch);
?>
$data = '<oper>cmt</oper><wait>0</wait><test>1</test><payment id=""><prop name="service_code" value="RPMTSU" /><prop name="phone" value="%2B38066ххххххх" /><prop name="amt" value="5.00" /></payment>';