laowu 1 週間 前
コミット
b5a2305414
1 ファイル変更3 行追加2 行削除
  1. 3 2
      app/Services/PayPlus.php

+ 3 - 2
app/Services/PayPlus.php

@@ -156,9 +156,9 @@ class PayPlus
 
     public function decryptPayinResponse(array $response, $aesKey, $iv)
     {
-        $componentDelta = $response['data']['componentDelta'] ?? $response['componentDelta'] ?? '';
+        $componentDelta = $response['data']['componentDelta'] ?? '';
         if ($componentDelta === '') {
-            return $response;
+            return [];
         }
 
         return json_decode($this->decryptComponentDelta($componentDelta, $aesKey, $iv), true) ?: [];
@@ -177,6 +177,7 @@ class PayPlus
         $decoded = json_decode($response, true) ?: [];
         Util::WriteLog('PayPlus', 'PayPlus raw response: ' . json_encode($decoded));
         $componentDelta = $this->decryptPayinResponse($decoded, $encrypted['aes_key'], $encrypted['iv']);
+        Util::WriteLog('PayPlus', 'PayPlus raw response111: ' . json_encode($decoded));
         if (!empty($componentDelta)) {
             Util::WriteLog('PayPlus', 'PayPlus decrypted componentDelta: ' . json_encode($componentDelta));
             return $componentDelta;