/** * 支付回调 */ public function returnOp() { unset($_GET['act']); unset($_GET['op']); unset($_GET['payment_code']); $payment_api = $this->_get_payment_api(); $payment_config = $this->_get_payment_config(); $callback_info = $payment_api->getReturnInfo($payment_config); if ($callback_info) { //验证成功 $result = $this->_update_order($callback_info['out_trade_no'], $callback_info['trade_no']); if ($result['state']) { Tpl::output('result', 'success'); Tpl::output('message', '支付成功'); } else { Tpl::output('result', 'fail'); Tpl::output('message', '支付失败'); } } else { //验证失败 Tpl::output('result', 'fail'); Tpl::output('message', '支付失败'); } Tpl::showpage('payment_message'); }
/** * 输出专题 */ private function _output_special($data, $type = 'json', $special_id = 0) { $model_special = Model('mb_special'); if ($_GET['type'] == 'html') { $html_path = $model_special->getMbSpecialHtmlPath($special_id); if (!is_file($html_path)) { ob_start(); Tpl::output('list', $data); Tpl::showpage('mb_special'); file_put_contents($html_path, ob_get_clean()); } header('Location: ' . $model_special->getMbSpecialHtmlUrl($special_id)); die; } else { output_data($data); } }
/** * node信息 * */ public function get_node_infoOp() { $member_id = $this->member_info['member_id']; $model_chat = Model('web_chat'); $member_info = $model_chat->getMember($member_id); Tpl::output('member_info', $member_info); Tpl::showpage('node_info'); }