request->post('timestamp'); $data = $this->request->post('data'); $aes = new \AES(); $iv = !empty($timestamp) ? $aes->buildIv($timestamp) : ''; $decrypted = $aes->decrypt($data, $iv); Log::error('供销平台佣金回调:' . var_export($decrypted, true)); if (!empty($decrypted)) { $storeConsumptionUserDao = new CommissionDao(); // "惠农供销,谱写数字新篇章"活动首单分润 $result = $storeConsumptionUserDao->firstOrderCommissionCallback($decrypted); return app('json')->success($result); } return app('json')->fail('解密失败'); } /** * 供销平台退佣金回调 * @return mixed * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function refundCommission() { $timestamp = $this->request->post('timestamp'); $data = $this->request->post('data'); $aes = new \AES(); $iv = !empty($timestamp) ? $aes->buildIv($timestamp) : ''; $decrypted = $aes->decrypt($data, $iv); Log::error('供销平台退佣金回调:' . var_export($decrypted, true)); if (!empty($decrypted)) { $storeConsumptionUserDao = new CommissionDao(); $result = $storeConsumptionUserDao->refundByCallback($decrypted); return app('json')->success($result); } return app('json')->fail('解密失败'); } }