game_pay_notify($param); if($result == "success"){ $result = $this->update_game_pay_status($request['out_trade_no'],$request['code'],$request['extend']); $this->set_message(1,'success','游戏支付成功'); }else{ $this->set_message(0,'fail','游戏支付失败'); } } /** *修改游戏支付状态 */ private function update_game_pay_status($out_trade_no="",$code=1,$extend=""){ $result = false; $map['pay_order_number'] = $out_trade_no; $data = array("pay_game_status"=>1,"extend"=>$extend); switch ($code) { case 1: $result = M('spend',"tab_")->where($map)->setField($data); break; default: $result = M('BindSpend',"tab_")->where($map)->setField($data); break; } return $result; } }