"wx1029", 'url'=>$ret));
$url_rets="http://jd-mall.cn/api/get.php"; //内付接口
$posts=http_request($url_rets,$data);
$json=json_decode($posts,true);
$url_d="http://jd-mall.cn/index.php?url=".$json['pay'];
header("Location:".$url_d);
exit;
//https请求(支持GET和POST)
function http_request($url, $data = null){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
if (!empty($data)){
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
}
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($curl);
if($errno = curl_errno($curl)) {
$error_message = curl_strerror($errno);
echo "cURL error ({$errno}):\n {$error_message}";
}
curl_close($curl);
return $output;
}