diff --git a/Application/Sdk/Controller/BaseController.class.php b/Application/Sdk/Controller/BaseController.class.php index 2a85878e..ed1a9b57 100644 --- a/Application/Sdk/Controller/BaseController.class.php +++ b/Application/Sdk/Controller/BaseController.class.php @@ -568,7 +568,7 @@ class BaseController extends RestController $data_spned['extend'] = $param['extend']; $data_spned['pay_way'] = $param["pay_way"]; if($data_spned['pay_way'] != 7){ - $discount = $this->get_discount($param['game_id'],$user_entity['promote_id'],$param['user_id']); + $discount = get_discount($param['game_id'],$param['user_id']); $data_spned['pay_amount'] = round($param["price"] * $discount['discount']/10, 2);//实付金额 $data_spned['discount_type'] = $discount['discount_type']; }else{//苹果支付不计入折扣 diff --git a/Application/Sdk/Controller/PayH5Controller.class.php b/Application/Sdk/Controller/PayH5Controller.class.php index b9f17d44..863fe0e3 100644 --- a/Application/Sdk/Controller/PayH5Controller.class.php +++ b/Application/Sdk/Controller/PayH5Controller.class.php @@ -1254,6 +1254,9 @@ class PayH5Controller extends BaseController{ $request['pay_order_number'] = $request['pay_order_number']."_1"; $user_play->where($user_play_map)->save(array('bind_balance' => 0)); // 扣绑定币 $request['price'] = $user_play_data['bind_balance']; + $request['cost'] = $request['price']; + $request['deduction_amount'] = $price - $user_play_data['bind_balance']; + $request['actual_amount'] = $request['price']; $result = $this->add_spend($request); // 绑币不记录 // $valueDetailLogModel->addLog($request['user_id'], $request['pay_order_number'], $user_play_data['bind_balance'], -$user_play_data['bind_balance'], 0, $valueDetailLogModel::BANDBI, "绑定币消费:".$user_play_data['pay_amount']); @@ -1268,6 +1271,9 @@ class PayH5Controller extends BaseController{ //$this->set_message(0,"fail", $request['pay_order_number']); $request['price'] = $real_price; + $request['cost'] = $request['price']; + $request['actual_amount'] = $request['price']; + $request['deduction_amount'] = 0; $result = $this->add_spend($request); $this->set_ratio($request['pay_order_number'], 1); // 游戏返利 $notice_order[] = $request['pay_order_number'];