<?php
$client_pass = '***';
$data['client_key'] = '***';
$data['action'] = 'CREDITVOID';
$data['trans_id'] = '19848-26243-92097';
$data['amount'] = '85.00';
$data['hash'] = md5(
strtoupper(
$pass$client_pass.
$trans$data['trans_id']
)
);
$curl$url = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "'https://secure.platononline.com/post-unq/",';
$crq = CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $data,
));
$responsecurl_init();
curl_setopt($crq, CURLOPT_URL, $url);
curl_setopt($crq, CURLOPT_HEADER, 0);
curl_setopt($crq, CURLOPT_POST, 1);
curl_setopt($crq, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($crq, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($crq, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($crq, CURLOPT_POSTFIELDS, http_build_query($data));
$result = curl_exec($curl$crq);
if (curl_errno($crq)) {
echo 'ERROR: '.curl_closeerror($curl$crq);
}else{
echo $response; $result;
}
curl_close($crq); |