diff --git a/app/Http/Controllers/Customer/AuthController.php b/app/Http/Controllers/Customer/AuthController.php index 7df8a1a..3bbcdbe 100644 --- a/app/Http/Controllers/Customer/AuthController.php +++ b/app/Http/Controllers/Customer/AuthController.php @@ -214,18 +214,10 @@ class AuthController extends Controller $sessionKey = request()->sessionKey; $iv = request()->iv; -// $aesKey = base64_decode($sessionKey); -// $aesIV = base64_decode($iv); -// $aesCipher = base64_decode($encryptedData); -// $result = openssl_decrypt($aesCipher, "AES-128-CBC", $aesKey, 1, $aesIV); - - $config = [ - 'app_id' => $this->appid, - 'secret' => $this->appsecret - ]; - $app = Factory::miniProgram($config); - $result = $app->encryptor->decryptData($sessionKey, $iv, $encryptedData); - dd($result); + $aesKey = base64_decode($sessionKey); + $aesIV = base64_decode($iv); + $aesCipher = base64_decode($encryptedData); + $result = openssl_decrypt($aesCipher, "AES-128-CBC", $aesKey, 1, $aesIV); Log::channel("get_mobile_by_openid")->info($result);