quiple
TPToss payments 개발자 커뮤니티
•Created by quiple on 7/11/2024 in #❓┃연동개발-문의
자동결제 오류 문의
4월 8일 결제까지는 잘 됐는데 5월 8일부터 결제 오류가 나고 자동결제가 안 됩니다.
그냥 결제는 되는데 자동결제만 안 되네요... 뭐가 문제일까요?
MID: bill_biesep5of
(
[code] => COMMON_ERROR
[message] => 일시적인 오류가 발생했습니다. 잠시 후 다시 시도해주세요.
)
(
[code] => COMMON_ERROR
[message] => 일시적인 오류가 발생했습니다. 잠시 후 다시 시도해주세요.
)
8 replies
TPToss payments 개발자 커뮤니티
•Created by quiple on 1/3/2024 in #❓┃연동개발-문의
테스트 환경에서 간헐적 500 오류
안녕하세요, 로컬 테스트 환경에서 자동결제를 하는데 간헐적으로 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;
$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;
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"
}
{
"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"
}
8 replies