'신용카드', 'BANK' => '계좌이체', 'VBANK' => '가상계좌', 'CELLPHONE' => '휴대폰' ); if (! function_exists('nicepay_reqPost')) { //Post api call function nicepay_reqPost($data, $url){ $url_data = parse_url($url); // 나이스페이 url이 맞는지 체크하여 틀리면 false를 리턴합니다. if (! (isset($url_data['host']) && preg_match('#\.nicepay\.co\.kr$#i', $url_data['host']))) { return false; } $ch = curl_init(); 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_POSTFIELDS, http_build_query($data)); //POST data curl_setopt($ch, CURLOPT_POST, true); $response = curl_exec($ch); curl_close($ch); return $response; } }