|
|
|
@ -775,15 +775,15 @@ class PayH5Controller extends BaseController{
|
|
|
|
|
// redirect(U('Spend/notice',array('user_id'=>$user_id, 'is_platform' => 1,'game_id'=>$game_id,'msg'=>'支付失败', 'user_token' => $this->userToken)));exit;
|
|
|
|
|
}
|
|
|
|
|
}elseif ($pay_info['channel'] == 5) { // 汇付宝
|
|
|
|
|
$request['pay_way'] = C('PAY_WAY.WFT_PAY'); // 威富通wx
|
|
|
|
|
$request['pay_way'] = self::WX_PAY; // 威富通wx
|
|
|
|
|
|
|
|
|
|
$pay['agent_id'] = C('heepay.partner');//商户号
|
|
|
|
|
$pay['agent_id'] = $pay_info['merno'];//商户号
|
|
|
|
|
$pay['order_no'] = $request['pay_order_number'];
|
|
|
|
|
$pay['time'] = date('YmdHis', time());
|
|
|
|
|
$pay['pay_type'] = 30;
|
|
|
|
|
$pay['amount'] = $request['price'];
|
|
|
|
|
$pay['user_ip'] = get_client_ip();
|
|
|
|
|
$pay['sign_key'] = C('heepay.key');//密钥
|
|
|
|
|
$pay['sign_key'] = $pay_info['secret'];//密钥
|
|
|
|
|
$pay['payerName'] = iconv("UTF-8", "gb2312//IGNORE", "万盟天下");
|
|
|
|
|
$pay['number'] = 1;
|
|
|
|
|
$pay['goods_note']= "消费-".$request["pay_order_number"];
|
|
|
|
@ -793,7 +793,10 @@ class PayH5Controller extends BaseController{
|
|
|
|
|
$heepay = new Heepay();
|
|
|
|
|
$url = $heepay->wxh5_pay($pay);
|
|
|
|
|
$request['pay_url'] = $url;//."&tx_client=hideopen";
|
|
|
|
|
|
|
|
|
|
$request['merchant_id'] = $pay_info['id'];
|
|
|
|
|
$request['merchant_way'] = self::WX_PAY;
|
|
|
|
|
$request['main_id'] = $main_id;
|
|
|
|
|
|
|
|
|
|
$this->add_deposit($request, 1);
|
|
|
|
|
}elseif(get_wx_pay_type() == 2){
|
|
|
|
|
|
|
|
|
@ -1400,11 +1403,8 @@ class PayH5Controller extends BaseController{
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
public function weixin_pay($user_id,$game_id) {
|
|
|
|
|
/* $file=file_get_contents("./Application/Sdk/OrderNo/".$user_id."-".$game_id.".txt");
|
|
|
|
|
$request = json_decode(think_decrypt($file),true); */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$request = $this->get_sdk_request($game_id);
|
|
|
|
|
// $request['pay_order_number'] = "SP_".date('Ymd').date('His').sp_random_string(4);
|
|
|
|
|
$request['pay_status'] = 0;
|
|
|
|
|
$request['pay_way'] = C("PAY_WAY.WEIXIN");
|
|
|
|
|
$request['spend_ip'] = get_client_ip();
|
|
|
|
@ -1499,15 +1499,15 @@ class PayH5Controller extends BaseController{
|
|
|
|
|
// redirect(U('Spend/notice',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'支付失败', 'user_token' => $this->userToken)));exit;
|
|
|
|
|
}
|
|
|
|
|
}elseif ($pay_info['channel'] == 5) {
|
|
|
|
|
$request['pay_way'] = C('PAY_WAY.WFT_PAY'); // 威富通wx
|
|
|
|
|
$request['pay_way'] = self::WX_PAY;
|
|
|
|
|
|
|
|
|
|
$pay['agent_id'] = C('heepay.partner');//商户号
|
|
|
|
|
$pay['agent_id'] = $pay_conf['merno'];//商户号
|
|
|
|
|
$pay['order_no'] = $request['pay_order_number'];
|
|
|
|
|
$pay['time'] = date('YmdHis', time());
|
|
|
|
|
$pay['pay_type'] = 30;
|
|
|
|
|
$pay['amount'] = $request['price'];
|
|
|
|
|
$pay['user_ip'] = get_client_ip();
|
|
|
|
|
$pay['sign_key'] = C('heepay.key');//密钥
|
|
|
|
|
$pay['sign_key'] = $pay_conf['secret'];//密钥
|
|
|
|
|
$pay['payerName'] = iconv("UTF-8", "gb2312//IGNORE", "万盟天下");
|
|
|
|
|
$pay['number'] = 1;
|
|
|
|
|
$pay['goods_note']= "消费-".$request["pay_order_number"];
|
|
|
|
@ -1519,6 +1519,9 @@ class PayH5Controller extends BaseController{
|
|
|
|
|
$json_data = $heepay->wxh5_pay($pay);
|
|
|
|
|
if($json_data['ret_code'] == "0000"){
|
|
|
|
|
$request['pay_url'] = $json_data['url'] . "&tx_client=hideopen";
|
|
|
|
|
$request['merchant_id'] = $pay_info['id'];
|
|
|
|
|
$request['merchant_way'] = self::WX_PAY;
|
|
|
|
|
$request['main_id'] = $main_id;
|
|
|
|
|
$this->add_spend($request,1);
|
|
|
|
|
} else {
|
|
|
|
|
echo json_encode(['code'=>0,'msg'=> '支付失败,请重试'.$json_data['ret_msg']]);
|
|
|
|
|