Commit b23fbb57 authored by zazaname's avatar zazaname

增加渠道下单

parent 659ad841
......@@ -56,9 +56,6 @@ class PayService
if (is_null($verInfo)) {
return error('该游戏渠道没配置,app_id:' . $params['app_id']);
}
// 走一下渠道的下单接口,如果部分渠道没有,则返回空
$sdkManager = new SdkManager();
$channel_order_id = $sdkManager->createOrder($verInfo, $gameInfo, $params);
// 查找融合用户信息
$userInfo = DB::table('app_member')->where(['uid' => $params['uid']])->first();
// 入库
......@@ -67,7 +64,6 @@ class PayService
'uid' => $params['uid'],
'order_id' => $orderId,
'cp_order_id' => $params['cp_order_id'],
'channel_order_id' => $channel_order_id,
'veruniqid' => $userInfo->veruniqid,
'ver' => $params['ctype'],
'appid' => $params['app_id'],
......@@ -83,6 +79,12 @@ class PayService
'create_time' => date('Y-m-d H:i:s')
];
$model->insert($insertData);
// 走一下渠道的下单接口,如果部分渠道没有,则返回空
$sdkManager = new SdkManager();
$channel_order_id = $sdkManager->createOrder($verInfo, $gameInfo, $params);
if($channel_order_id){
$model->where(['order_id'=>$orderId])->update(['channel_order_id'=>$channel_order_id]);
}
return success('success',['order_id' => $orderId,'channel_order_id'=>$channel_order_id]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment