<?php
/**
 * @copyright   2008-2020 伯乐发卡 <http://www.lailiyun.com>
 * @creatdate   2020-9-10 Mr wang <634273662@qq.com>
 * @version   伯乐发卡V3（个人自动发卡系统）
 */

require_once '../inc.php';
$orderid = $payDao->req->get('orderid');
$paycode = $payDao->req->get('paycode');
if($paycode == "alipay"){
   $type=1;
}
if($paycode == "3"){
   $type=3;
}
if($paycode == "jhpay"){
   $type=2;
}
//查询订单是否存在

$key = $payDao->checkmqAcp();
$order = $payDao->checkOrder($orderid);
$oid = $order['orderid'];//订单号
$price = $order['cmoney']; //提交的价格
$host ="http://" . $_SERVER['HTTP_HOST']."/mq/createOrder";		
$_sign = md5($oid.$order['id'].$type.$price.$key['value']);
$p = "payId=".$oid.'&param='.$order['id'].'&type='.$type."&price=".str_replace(',', '', $price).'&sign='.$_sign.'&isHtml=1';
$url =$host."?".$p;	
header("Location:{$url}"); //跳转到支付页面
exit;

	
?>