* @version : HUOSDK 8.0 */ namespace mini\sdk\controller; use huolib\status\CommonStatus; use mini\common\controller\V2ApiBaseController; use think\Log; class CpaReversalController extends V2ApiBaseController { function _initialize() { parent::_initialize(); Log::write( $this->request->scheme().'://'.$this->request->server('HTTP_HOST').$this->request->server('REQUEST_URI').'?' .$this->request->getContent(), Log::LOG ); } /*** * 趣互联回调信息 * http://doc.1tsdk.com/159?page_id=7650 * 【域名】/mp/reversal */ public function index() { $_code = get_val($this->rq_data, 'code'); $_ext = get_val($this->rq_data, 'ext'); $_game_rq = $this->setGameData(); if (empty($_code) || empty($_ext)) { $_code = CommonStatus::INVALID_PARAMS; $this->error(CommonStatus::getMsg($_code), [], $_code); } $_rs = (new \huomp\controller\cpa_reversal\CpaReversalController())->reversal($_code, $_ext, $_game_rq); $this->returnData($_rs); } }