data_request); if($ret['code'] == 0) { $this->SuccessReturn(); } $this->ErrorReturn(); } /** * 成功返回 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @date 2019-09-12 * @desc description */ private function SuccessReturn() { // 支付插件是否自定义返回内容 $this->ContentReturn('SuccessReturn'); // 结束输出 die('success'); } /** * 失败返回 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @date 2019-09-12 * @desc description */ private function ErrorReturn() { // 支付插件是否自定义返回内容 $this->ContentReturn('ErrorReturn'); // 结束输出 die('error'); } /** * 输出支付插件自定义内容 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @date 2020-07-01 * @desc description * @param [string] $action [操作方法] */ private function ContentReturn($action) { $payment = 'payment\\'.PAYMENT_TYPE; if(class_exists($payment)) { $payment_obj = new $payment(); if(method_exists($payment_obj, $action)) { die($payment_obj->$action()); } } } } ?>