반응형
토스페이먼트 API를 실제 테스트 코드만 받아서 돌려보면
POST로 전달후 응답이 안들어오고
HTTP코드가 415로 떨어진다..
이유가 먼지 검색해 보니 HEADER 정의가 샘플에 빠져서 그렇다
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json","Content-Type: application/json"));
이거 한줄만 넣어주면 응답 잘 들어온다.
너무 샘플만 보고 떠먹여주는데로 하다보면 삽질한다.
출처 : https://solbel.tistory.com/1242
[php] HTTP Status : 415 The server refused this request because the request entity is in a format not supported by the requested
[php] HTTP Status : 415 The server refused this request because the request entity is in a format not supported by the requested resource for the requested method 에러 해..
solbel.tistory.com
반응형
'기타' 카테고리의 다른 글
Gmail 로 메일발송이 차단된경우 (0) | 2021.10.21 |
---|---|
DST Root CA X3 루트 인증서 만료 (2021년 9월) (0) | 2021.10.12 |
(PHP CURL)토스 페이먼트 API 응답없는 문제 (0) | 2021.09.14 |
Bootstrap 5 (0) | 2021.08.20 |
selenum input value 가져오기 (0) | 2021.08.10 |
$(document).ready 를 순수 javascript로 (0) | 2021.07.01 |