|
|
@ -760,7 +760,7 @@ class ExchangeController extends BaseController{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$field = array("pay_status"=>1,"pay_amount"=>$request['price'],"receipt"=>$data,"order_number"=>$info['receipt']['transaction_id']);
|
|
|
|
$field = array("pay_status"=>0,"pay_amount"=>$request['price'],"receipt"=>$data,"order_number"=>$info['receipt']['transaction_id']);
|
|
|
|
$field['payed_time'] = time();
|
|
|
|
$field['payed_time'] = time();
|
|
|
|
switch ($pay_where) {
|
|
|
|
switch ($pay_where) {
|
|
|
|
|
|
|
|
|
|
|
@ -769,7 +769,7 @@ class ExchangeController extends BaseController{
|
|
|
|
$result = M('spend','tab_')->where($map)->setField($field);
|
|
|
|
$result = M('spend','tab_')->where($map)->setField($field);
|
|
|
|
if ($result) {
|
|
|
|
if ($result) {
|
|
|
|
// 通知后台
|
|
|
|
// 通知后台
|
|
|
|
try {
|
|
|
|
/* try {
|
|
|
|
$url = C('TASK_URL')."/game-event/recharge";
|
|
|
|
$url = C('TASK_URL')."/game-event/recharge";
|
|
|
|
post_async($url, [
|
|
|
|
post_async($url, [
|
|
|
|
'form_params' => [
|
|
|
|
'form_params' => [
|
|
|
@ -778,7 +778,7 @@ class ExchangeController extends BaseController{
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
} catch(\Exception $e) {
|
|
|
|
} catch(\Exception $e) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
} */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$param['out_trade_no'] = $out_trade_no;
|
|
|
|
$param['out_trade_no'] = $out_trade_no;
|
|
|
|
|
|
|
|
|
|
|
@ -787,14 +787,14 @@ class ExchangeController extends BaseController{
|
|
|
|
if (isset($request['app_type']) && $request['app_type'] == 2) {
|
|
|
|
if (isset($request['app_type']) && $request['app_type'] == 2) {
|
|
|
|
$isBeta = true;
|
|
|
|
$isBeta = true;
|
|
|
|
// 美国IP 贝塔版
|
|
|
|
// 美国IP 贝塔版
|
|
|
|
$ip = get_client_ip();
|
|
|
|
// $ip = get_client_ip();
|
|
|
|
$isUSBeta = ip_is_country($ip);
|
|
|
|
// $isUSBeta = ip_is_country($ip);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$game = new GameApi();
|
|
|
|
$game = new GameApi();
|
|
|
|
|
|
|
|
|
|
|
|
//判断是否开启苹果内购支付通知
|
|
|
|
//判断是否开启苹果内购支付通知
|
|
|
|
if ($isBeta && $isUSBeta) {
|
|
|
|
if ($isBeta /* && $isUSBeta */) {
|
|
|
|
|
|
|
|
|
|
|
|
$is_white_list = M('forbit_ip', 'tab_')->where(['user_id'=>$payamountVerify['user_id'],'status'=>1])->find();
|
|
|
|
$is_white_list = M('forbit_ip', 'tab_')->where(['user_id'=>$payamountVerify['user_id'],'status'=>1])->find();
|
|
|
|
|
|
|
|
|
|
|
@ -803,7 +803,7 @@ class ExchangeController extends BaseController{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$game->game_pay_notify($param);
|
|
|
|
// $game->game_pay_notify($param);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -830,7 +830,7 @@ class ExchangeController extends BaseController{
|
|
|
|
|
|
|
|
|
|
|
|
if($result){
|
|
|
|
if($result){
|
|
|
|
|
|
|
|
|
|
|
|
$this->set_ratio($out_trade_no);
|
|
|
|
// $this->set_ratio($out_trade_no);
|
|
|
|
|
|
|
|
|
|
|
|
echo base64_encode(json_encode(array("status"=>200,"return_code"=>"success","return_msg"=>"支付成功")));
|
|
|
|
echo base64_encode(json_encode(array("status"=>200,"return_code"=>"success","return_msg"=>"支付成功")));
|
|
|
|
|
|
|
|
|
|
|
|