Файл: moduls/setting/apis.php
Строк: 24
#yP5P6fUmkX57vZyk1
<?
function CurlWordPay($money,$merch,$number,$hash){
if( $curl = curl_init() ) {
curl_setopt($curl, CURLOPT_URL, 'https://wordpay.ru/api/moneyback/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, "money={$money}&{$merch}={$number}&hash={$hash}");
$out = curl_exec($curl);
curl_close($curl);
return $out;
}
}
function MoneyBack($sp,$obj){
$obj = json_decode($obj);
if($sp == 1) print $obj->{'message'};
elseif($sp == 2) print $obj->{'money'};
elseif($sp == 3) print $obj->{'money_go'};
elseif($sp == 4) print $obj->{'status'};
else return 'Не выбран способ';
}
$url = CurlWordPay('10','ya','4100111843357568','yP5P6fUmkX57vZyk1');
print_r($url);
echo MoneyBack(1,$url);