* @version : HUOSDK 8.0 */ namespace api\apple\controller; use api\common\controller\AppleApiBaseController; use huo\controller\pay\Sdk; use huolib\status\OrderStatus; class WapController extends AppleApiBaseController { public function _initialize() { parent::_initialize(); } /** * 打开网页登陆框 * http://doc.1tsdk.com/138?page_id=3512 * 【域名】/wap/sdk/user * */ public function member() { $_back_url = $this->request->server('HTTP_REFERER'); $_channel_rq = $this->setChannelData(); $this->assign('agentgame', $_channel_rq->getAgentGame()); $this->assign('back_url', $_back_url); return $this->fetch('member/index'); } /** * 找回密码 * http://doc.1tsdk.com/138?page_id=2912 * 【【域名】/v8/wap/forgetpwd/index * 【域名】wap/forgetpwd/index */ public function forgetPwdPage() { return $this->fetch('member/forgetpwd'); } /** * * WAP-支付页面(新) * http://doc.1tsdk.com/138?page_id=3513 * 【域名】/wap/sdk/pay */ public function pay() { $this->checkLogin(); $_order_rq = $this->setOrderData(); $_pay_token = get_val($this->rq_data, 'pay_token', ''); $_rs = $_order_rq->checkPayToken($_pay_token); if (false == $_rs) { $_code = OrderStatus::TOKEN_ARGS_ERROR; $this->error(OrderStatus::getMsg($_code), [], $_code); } $_order_id = $_order_rq->getOrderId(); $_rdata = (new Sdk())->getPayInfo($_order_id, true); if (empty($_rdata['data'])) { $this->error(OrderStatus::getMsg($_rdata['code']), [], $_rdata['code']); } $this->assign($_rdata['data']); return $this->fetch('order/index'); } }