$secret_key = "sck_pcs_rMnxDSW/43243434/YAzXXXXXXXXXXXX";
$PostURL = "https://pts-api.paynet.com.tr/v1/transaction/charge";
$session_id = $_REQUEST["session_id"];
$token_id = $_REQUEST["token_id"];
'session_id' => $session_id,
'header' =>"Accept: application/json; charset=UTF-8\r\n".
"Content-type: application/json; charset=UTF-8\r\n".
"Authorization: Basic ".$secret_key,
'content' => json_encode($params),
$context = stream_context_create($options);
$result = json_decode(@file_get_contents($PostURL, false, $context));
if($result->is_succeed == true)