|
|
@ -90,8 +90,7 @@ class AppleController extends BaseController{
|
|
|
|
public function apple_alipay_pay($user_id,$game_id){
|
|
|
|
public function apple_alipay_pay($user_id,$game_id){
|
|
|
|
#获取SDK上POST方式传过来的数据 然后base64解密 然后将json字符串转化成数组
|
|
|
|
#获取SDK上POST方式传过来的数据 然后base64解密 然后将json字符串转化成数组
|
|
|
|
//echo json_encode(['code'=>0,'msg'=> $user_id."game:".$game_id]);exit;
|
|
|
|
//echo json_encode(['code'=>0,'msg'=> $user_id."game:".$game_id]);exit;
|
|
|
|
$request = $this->get_sdk_request($game_id, $user_id);
|
|
|
|
$request = $this->get_sdk_request($game_id, "SP_".date('Ymd').date('His').sp_random_string(4), $user_id);
|
|
|
|
$request['pay_order_number'] = "SP_".date('Ymd').date('His').sp_random_string(4);
|
|
|
|
|
|
|
|
$request['pay_status'] = 0;
|
|
|
|
$request['pay_status'] = 0;
|
|
|
|
$request['pay_way'] = C("PAY_WAY.ALIPAY");
|
|
|
|
$request['pay_way'] = C("PAY_WAY.ALIPAY");
|
|
|
|
$request['spend_ip'] = get_client_ip();
|
|
|
|
$request['spend_ip'] = get_client_ip();
|
|
|
@ -360,8 +359,7 @@ class AppleController extends BaseController{
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function apple_weixin_pay($user_id,$game_id)
|
|
|
|
public function apple_weixin_pay($user_id,$game_id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$request = $this->get_sdk_request($game_id, $user_id);
|
|
|
|
$request = $this->get_sdk_request($game_id, "SP_".date('Ymd').date('His').sp_random_string(4), $user_id);
|
|
|
|
$request['pay_order_number'] = "SP_".date('Ymd').date('His').sp_random_string(4);
|
|
|
|
|
|
|
|
$request['pay_status'] = 0;
|
|
|
|
$request['pay_status'] = 0;
|
|
|
|
$request['pay_way'] = C("PAY_WAY.WEIXIN");
|
|
|
|
$request['pay_way'] = C("PAY_WAY.WEIXIN");
|
|
|
|
$request['spend_ip'] = get_client_ip();
|
|
|
|
$request['spend_ip'] = get_client_ip();
|
|
|
@ -647,8 +645,8 @@ class AppleController extends BaseController{
|
|
|
|
/* $file=file_get_contents("./Application/Sdk/OrderNo/".$user_id."-".$game_id.".txt");
|
|
|
|
/* $file=file_get_contents("./Application/Sdk/OrderNo/".$user_id."-".$game_id.".txt");
|
|
|
|
$request = json_decode(think_decrypt($file),true); */
|
|
|
|
$request = json_decode(think_decrypt($file),true); */
|
|
|
|
|
|
|
|
|
|
|
|
$request = $this->get_sdk_request($game_id, $user_id);
|
|
|
|
$out_trade_no = "PF_" . date('Ymd') . date('His') . sp_random_string(4);
|
|
|
|
$request['pay_order_number'] = "SP_".date('Ymd').date('His').sp_random_string(4);
|
|
|
|
$request = $this->get_sdk_request($game_id, $out_trade_no, $user_id);
|
|
|
|
$request['pay_status'] = 0;
|
|
|
|
$request['pay_status'] = 0;
|
|
|
|
// $request['pay_way'] = C("PAY_WAY.ALIPAY");
|
|
|
|
// $request['pay_way'] = C("PAY_WAY.ALIPAY");
|
|
|
|
$request['spend_ip'] = get_client_ip();
|
|
|
|
$request['spend_ip'] = get_client_ip();
|
|
|
@ -681,7 +679,6 @@ class AppleController extends BaseController{
|
|
|
|
// $this->set_message(1089,"fail","订单号重复,请关闭支付页面重新支付");
|
|
|
|
// $this->set_message(1089,"fail","订单号重复,请关闭支付页面重新支付");
|
|
|
|
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'订单号重复,请关闭支付页面重新支付')));exit;
|
|
|
|
redirect(U('Spend/notice_v1',array('user_id'=>$user_id,'game_id'=>$game_id,'msg'=>'订单号重复,请关闭支付页面重新支付')));exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$out_trade_no = "PF_" . date('Ymd') . date('His') . sp_random_string(4);
|
|
|
|
|
|
|
|
$request['order_number'] = $out_trade_no;
|
|
|
|
$request['order_number'] = $out_trade_no;
|
|
|
|
$request['pay_order_number'] = $out_trade_no;
|
|
|
|
$request['pay_order_number'] = $out_trade_no;
|
|
|
|
$request['out_trade_no'] = $out_trade_no;
|
|
|
|
$request['out_trade_no'] = $out_trade_no;
|
|
|
|