var settings = {
“async”: true,
“crossDomain”: true,
“url”: “https://kapi.kakao.com/v1/payment/ready”,
“method”: “POST”,
“headers”: {
“authorization”: “KakaoAK ***************************”,
“content-type”: “application/x-www-form-urlencoded”,
“cache-control”: “no-cache”,
},
“data”: {
“cid”: “TC0ONETIME”,
“partner_order_id”: “partner_order_id”,
“partner_user_id”: “partner_user_id”,
“item_name”: “라이언빵”,
“quantity”: “1”,
“total_amount”: “1000”,
“vat_amount”: “200”,
“tax_free_amount”: “0”,
“approval_url”: “http://localhost/good”,
“fail_url”: “https://localhost/fail”,
“cancel_url”: “https://localhost/cancel”
}
}
$(".money").click(function() {
$.ajax(settings).done(function (response) {
console.log(response);
});
});
.jsp파일에서 ajax를 이용하여 테스트 연동을 하려고 하는데 아래와같은 에러가 뜹니다…
뭐가잘못된걸까요… localhost때문인가 싶어서 다른아이피로 테스트도 해봤는데 안됩니다