diff --git a/app/common/model/SysUser.php b/app/common/model/SysUser.php index 6846c57..3c8d024 100644 --- a/app/common/model/SysUser.php +++ b/app/common/model/SysUser.php @@ -4,9 +4,7 @@ namespace app\common\model; use app\common\library\DatabaseRoute; -use app\czg\model\SysCaptcha; -use ba\Random; -use think\facade\Cache; +use extend\ba\Random; use think\facade\Db; class SysUser extends BaseModel diff --git a/app/czg/app/controller/WuyouController.php b/app/czg/app/controller/WuyouController.php index 82c06f9..0925dcb 100644 --- a/app/czg/app/controller/WuyouController.php +++ b/app/czg/app/controller/WuyouController.php @@ -199,7 +199,7 @@ class WuyouController extends BaseController public function notify() { try { - $params = $this->request->post(); + $params = json_decode('{"callbacks": "CODE_SUCCESS","order_sn": "test001","out_trade_no": "bcf60b80e805480984a9956088e74225-357901754385306920","pay_time": "1751584904","sign": "495D873175D4A7762B3B7162DA6C9F35","total": 1.50}', true); Log::info("无忧支付回调,入参: " . json_encode($params)); $signData = [ 'callbacks' => $params['callbacks'], diff --git a/app/utils/WuYouPayUtils.php b/app/utils/WuYouPayUtils.php index 2500a17..9afa371 100644 --- a/app/utils/WuYouPayUtils.php +++ b/app/utils/WuYouPayUtils.php @@ -4,7 +4,7 @@ namespace app\utils; use app\api\model\CommonInfo; use app\exception\SysException; -use think\facade\Log; +use support\Log; class WuYouPayUtils { diff --git a/config/wuyou.php b/config/wuyou.php new file mode 100644 index 0000000..6be2eaa --- /dev/null +++ b/config/wuyou.php @@ -0,0 +1,13 @@ + env('WUYOU.ENABLE', 0), // 支付开关 + 'url' => env('WUYOU.PAY_URL', 'http://47.113.117.120/api/order'), // 支付地址 + 'notify_url' => 'https://ph.hnsiyao.cn/api/wuyou/notify', // 支付回调地址 + 'h5_base_url' => env('WUYOU.PAY_H5_BASE_URL', 'https://dj-h5.hnsiyao.cn/me/detail/detail?allId='), // H5 支付基础地址 + 'secret' => env('WUYOU.APP_SECRET', '3MWSBmyKDeQDLXzoLr53tKVqiJv4Fm0KdsEhbpXW9YWvh35VgozL5S3rpUz4EjSb'), // 支付签名密钥 + 'merchant_id' => env('WUYOU.MERCHANT_ID', '100360'), // 商户号 + 'query_url' => env('WUYOU.QUERY_URL', 'http://47.113.117.120/api/queryOrder'), // 订单查询地址 + 'extract_url' => env('WUYOU.EXTRACT_URL', 'http://47.113.117.120/api/salary'), // 提现接口地址 + 'extract_notify_url' => env('WUYOU.EXTRACT_URL', 'https://ph.hnsiyao.cn/api/wuyou/extractNotify'), // 提现接口地址 + 'extract_query_url' => env('WUYOU.EXTRACT_QUERY_URL', 'http://47.113.117.120/api/querySalary'), // 查询提现接口地址 +];