|
|
|
@ -226,7 +226,33 @@ class PayH5Controller extends BaseController{
|
|
|
|
|
$orderno = $request['pay_order_number'];
|
|
|
|
|
} else {
|
|
|
|
|
echo json_encode(['code'=>1001,'msg'=> "请求发起失败【{$response->getMsg()}】,请选择其他支付方式或联系客服"]);exit;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} elseif ($pay_info['channel'] == 11) { // 外部支付宝
|
|
|
|
|
$request['pay_way'] = 41;
|
|
|
|
|
$request['pay_status'] = 0;
|
|
|
|
|
$request['spend_ip'] = get_client_ip();
|
|
|
|
|
|
|
|
|
|
$this->add_deposit($request, 1);
|
|
|
|
|
|
|
|
|
|
$notifyUrl = C('PAY_DOMAIN')."/callback.php/Notify/kd_callback";
|
|
|
|
|
$backUrl = C('PAY_DOMAIN')."sdk.php/Spend/paycallback/orderno/{$request['pay_order_number']}/user_token/".$this->userToken."/paytype/weixinpay/game_id/{$game_id}";
|
|
|
|
|
|
|
|
|
|
$userInfo = get_user_entity($request['user_id']);
|
|
|
|
|
$response = AlipayApi::pay($request, $userInfo, $notifyUrl, $backUrl);
|
|
|
|
|
|
|
|
|
|
if($response['code'] == '0000'){
|
|
|
|
|
// 存入pay_url 继续支付
|
|
|
|
|
M("deposit", "tab_")->where([
|
|
|
|
|
'extend' => $request['extend'],
|
|
|
|
|
'game_id' => $request['game_id'],
|
|
|
|
|
'pay_order_number' => $request["pay_order_number"]
|
|
|
|
|
])->save([
|
|
|
|
|
'pay_url' => $response['data']['pay_url']
|
|
|
|
|
]);
|
|
|
|
|
$orderno = $request['pay_order_number'];
|
|
|
|
|
} else {
|
|
|
|
|
echo json_encode(['code'=>1001,'msg'=> "请求发起失败【{$response['message']}】,请选择其他支付方式或联系客服"]);exit;
|
|
|
|
|
}
|
|
|
|
|
} else{ // 支付宝第三方
|
|
|
|
|
if( empty(C('goldpig.partner'))||empty(C('goldpig.wooolid'))){
|
|
|
|
|
// $this->set_message(1009, "fail", "支付参数未配置");
|
|
|
|
|