We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% request.setCharacterEncoding("UTF-8"); %>
<% response.setContentType("text/html; charset=UTF-8"); %>
<%
String member_id = request.getParameter("member_id"); int cost = Integer.parseInt(request.getParameter("cost")); String product = request.getParameter("product");
%>
<script type="text/javascript">
`$(function(){ var IMP = window.IMP; // 생략가능 IMP.init('TC0ONETIME'); // 'iamport' 대신 부여받은 "가맹점 식별코드"를 사용 var msg; IMP.request_pay({ pg : 'kakaopay', pay_method : 'card', merchant_uid : 'merchant_' + new Date().getTime(), name : '<%=product%>', amount : 100, buyer_name : '<%=member_id%>', }, function(rsp) { if ( rsp.success ) { jQuery.ajax({ url: "/payments/complete", type: 'POST', dataType: 'json', data: { imp_uid : rsp.imp_uid } }).done(function(data) { if ( everythings_fine ) { msg = '결제가 완료되었습니다.'; msg += '\n고유ID : ' + rsp.imp_uid; msg += '\n상점 거래ID : ' + rsp.merchant_uid; msg += '\결제 금액 : ' + rsp.paid_amount; msg += '카드 승인번호 : ' + rsp.apply_num; alert("결제 성공"); location.href='kakao.do?command=premiumProduct'; } else { } }); } else { msg = '결제에 실패하였습니다.'; msg += '에러내용 : ' + rsp.error_msg; alert(msg); } }); });`
코드는 이와 같이 작성을 했는데 실행했을 때 PG사에 등록되지 않은 가맹점 코드라는 식의 오류가 뜹니다.
ㅠㅠ
The text was updated successfully, but these errors were encountered:
No branches or pull requests
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% request.setCharacterEncoding("UTF-8"); %>
<% response.setContentType("text/html; charset=UTF-8"); %>
<title>Insert title here</title><%
%>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.min.js" ></script> <script type="text/javascript" src="https://cdn.iamport.kr/js/iamport.payment-1.1.5.js"></script><script type="text/javascript">
코드는 이와 같이 작성을 했는데 실행했을 때 PG사에 등록되지 않은 가맹점 코드라는 식의 오류가 뜹니다.
ㅠㅠ
The text was updated successfully, but these errors were encountered: