테스트 환경에서 간헐적 500 오류

, 로 500 .
$url = 'https://api.tosspayments.com/v1/billing/' . $billing_key;
$data = ['orderId' => $order_id, 'amount' => $amount, 'customerKey' => $customer_key, 'customerEmail' => $buyer_email, 'customerName' => $buyer_name, 'orderName' => $order_name];
$credential = base64_encode(env('TOSS_PAYMENTS_SECRET_KEY') . ':');
$curlHandle = curl_init($url);

curl_setopt_array($curlHandle, [
  CURLOPT_POST => TRUE,
  CURLOPT_RETURNTRANSFER => TRUE,
  CURLOPT_HTTPHEADER => [
    'Authorization: Basic ' . $credential,
    'Content-Type: application/json'
  ],
  CURLOPT_POSTFIELDS => json_encode($data)
]);

$response = json_decode(curl_exec($curlHandle));
$httpCode = curl_getinfo($curlHandle, CURLINFO_HTTP_CODE);
$isSuccess = $httpCode == 200;

, 속 500 ?
curl_getinfo .
{
  "url": "https://api.tosspayments.com/v1/billing/gHAfCuZ8G4IDcqXp8At62SB3OBFDLmL8arW_oUOvQB8=",
  "content_type": "application/json",
  "http_code": 500,
  "header_size": 293,
  "request_size": 193,
  "filetime": -1,
  "ssl_verify_result": 0,
  "redirect_count": 0,
  "total_time": 0.387844,
  "namelookup_time": 0.008762,
  "connect_time": 0.016434,
  "pretransfer_time": 0.370852,
  "size_upload": 231,
  "size_download": 40,
  "speed_download": 103,
  "speed_upload": 595,
  "download_content_length": 40,
  "upload_content_length": 231,
  "starttransfer_time": 0.370858,
  "redirect_time": 0,
  "redirect_url": "",
  "primary_ip": "103.182.250.2",
  "certinfo": [],
  "primary_port": 443,
  "local_ip": "192.168.219.101",
  "local_port": 62689,
  "http_version": 3,
  "protocol": 2,
  "ssl_verifyresult": 0,
  "scheme": "HTTPS",
  "appconnect_time_us": 370720,
  "connect_time_us": 16434,
  "namelookup_time_us": 8762,
  "pretransfer_time_us": 370852,
  "redirect_time_us": 0,
  "starttransfer_time_us": 370858,
  "total_time_us": 387844,
  "effective_method": "POST"
}
Was this page helpful?