diff --git a/app/api/controller/PayController.php b/app/api/controller/PayController.php index 70a1ceddb..8bbf48f80 100644 --- a/app/api/controller/PayController.php +++ b/app/api/controller/PayController.php @@ -6,6 +6,7 @@ use app\common\enum\PayEnum; use app\common\logic\PayNotifyLogic; use app\common\model\retail\Cashierclass; use app\common\service\pay\PayService; +use support\Cache; use support\Log; use hg\apidoc\annotation as ApiDoc; #[ApiDoc\NotParse()] @@ -27,8 +28,8 @@ class PayController extends BaseApiController { $app = new PayService(1); $result = $app->wechat->callback(Request()->post()); - Log::info(json_decode($result,true)); - Log::info($result); + Cache::set('log'.time(),$result); + Cache::set('logJ'.time(),json_encode($result)); if ($result && $result->event_type == 'TRANSACTION.SUCCESS') { $ciphertext = $result->resource['ciphertext']; if ($ciphertext['trade_state'] === 'SUCCESS') { diff --git a/app/common/service/pay/PayService.php b/app/common/service/pay/PayService.php index 89c7f314e..3fab75436 100644 --- a/app/common/service/pay/PayService.php +++ b/app/common/service/pay/PayService.php @@ -52,7 +52,6 @@ class PayService extends BasePayService { $this->terminal = $terminal; $config = Config::get('payment'); - $config['wechat']['default']['notify_url'] = 'https://test-admin-multi-store.lihaink.cn'.$config['wechat']['default']['notify_url']; Pay::config($config); if ($userId !== null) { $this->auth = UserAuth::where(['user_id' => $userId, 'terminal' => $terminal])->findOrEmpty();