나이스페이 API 통신 시 서버 인증서 검증 적용

nicepay_reqPost() 가 원격 서버 인증서를 검증하지 않고 통신하던 것을
검증하도록 변경한다. 이니시스 연동부는 이미 동일하게 처리하고 있다.
API 호스트 4곳(webapi, pg-api, dc1-api, dc2-api) 인증서 검증 통과를
확인했다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 6c888bd53d0a5949bb1e2fc96567c132622a6f8b)
This commit is contained in:
thisgun
2026-08-24 07:44:22 +00:00
parent d9c21ea018
commit 35acbfa750
+2 -1
View File
@@ -60,7 +60,8 @@ if (! function_exists('nicepay_reqPost')) {
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15); //connection timeout 15
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); //POST data
curl_setopt($ch, CURLOPT_POST, true);
$response = curl_exec($ch);