결제 - 키움결제 적용 1차
This commit is contained in:
@@ -34,10 +34,7 @@
|
||||
const setleTyCd = orderForm.find('.setleTyCd').val();
|
||||
const setleAmt = orderForm.find('.setleAmt').val();
|
||||
const ordrInnb = orderForm.find('.ordrInnb').val();
|
||||
const goodsNm = orderForm.find('.goodsNm').val();
|
||||
const ordrrNm = orderForm.find('.ordrrNm').val();
|
||||
const ordrrEmail = orderForm.find('.ordrrEmail').val();
|
||||
const ordrrMbtlnb = orderForm.find('.ordrrMbtlnb').val().replace(/[^0-9]/g, '');
|
||||
|
||||
const sopmalCd = orderForm.find('.sopmalCd').val();
|
||||
const mbrInnb = orderForm.find('.mbrInnb').val();
|
||||
@@ -62,14 +59,13 @@
|
||||
console.log("HOMEURL:::"+ pf.HOMEURL.value);
|
||||
console.log("FAILURL:::"+ pf.FAILURL.value);
|
||||
|
||||
init();
|
||||
kiwoomPay();
|
||||
});
|
||||
|
||||
|
||||
var pf;
|
||||
|
||||
function init() {
|
||||
//alert(navigator.userAgent);
|
||||
pf = document.payForm;
|
||||
pf.ORDERNO.value = getTimeStamp();
|
||||
}
|
||||
@@ -165,52 +161,41 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form name="order_info" id="order_info" accept-charset="euc-kr">
|
||||
<input type="hidden" name="sopmalCd" class="sopmalCd" value="${data.setle.sopmalCd}"/>
|
||||
<input type="hidden" name="ordrInnb" class="ordrInnb" value="${data.setle.ordrInnb}"/>
|
||||
<input type="hidden" name="pgCmpnyNm" class="pgCmpnyNm" value="${data.setle.pgCmpnyNm}"/>
|
||||
<input type="hidden" name="setleTyCd" class="setleTyCd" value="${data.setle.setleTyCd}"/>
|
||||
<%-- Controller에 넘어가는 값 --%>
|
||||
<form name="order_info" id="order_info">
|
||||
<input type="hidden" name="sopmalCd" class="sopmalCd" value="${data.setle.sopmalCd}" />
|
||||
<input type="hidden" name="ordrInnb" class="ordrInnb" value="${data.setle.ordrInnb}" />
|
||||
<input type="hidden" name="pgCmpnyNm" class="pgCmpnyNm" value="${data.setle.pgCmpnyNm}" />
|
||||
<input type="hidden" name="setleTyCd" class="setleTyCd" value="${data.setle.setleTyCd}" />
|
||||
|
||||
<input type="hidden" name="SERVER" class="SERVER" value="DEV"/> <!-- 서버환경 : LIVE -->
|
||||
<input type="hidden" name="TYPE" class="TYPE" value="${data.setle.setleAmt}"/> <!-- 결제방식(P:PC/M:모바일/W:웹뷰) -->
|
||||
<input type="hidden" name="PAYMETHOD" class="PAYMETHOD" value="${data.ordr.ordrrNm}"/> <!-- 결제수단 -->
|
||||
<input type="hidden" name="TAXFREECD" class="TAXFREECD" value="00"/> <!-- 과세 비과세 여부(00: 과세, 01: 비과세, 02: 복합과세) -->
|
||||
<input type="hidden" name="BILLTYPE" class="BILLTYPE" value="1"/> <!-- 과금 유형(1: 일반) -->
|
||||
<input type="hidden" name="KIWOOM_ENC" class="KIWOOM_ENC" value="${data.ordr.ordrrNm}"/> <!-- 보안 기능 -->
|
||||
<input type="hidden" name="goodsNm" class="goodsNm" value="${data.setle.goodsNm}"/> <!-- 상품명 -->
|
||||
<input type="hidden" name="setleAmt" class="setleAmt" value="${data.setle.setleAmt}"/> <!-- 결제 금액 -->
|
||||
<input type="hidden" name="ordrrNm" class="ordrrNm" value="${data.ordr.ordrrNm}"/> <!-- 주문자 이름 -->
|
||||
<input type="hidden" name="ordrrEmail" class="ordrrEmail" value="${data.ordr.ordrrEmail}"/> <!-- 주문자 이메일 -->
|
||||
<input type="hidden" name="ordrrMbtlnb" class="ordrrMbtlnb" value="${data.ordr.ordrrMbtlnb}"/> <!-- 주문자 휴대폰번호 -->
|
||||
<input type="hidden" name="mbrId" class="mbrId" value="${data.ordr.mbrId}"/> <!-- 쇼핑몰회원ID -->
|
||||
<input type="hidden" name="mbrInnb" class="mbrInnb" value="${data.ordr.mbrInnb}" />
|
||||
<input type="hidden" name="sesionId" class="sesionId" value="${data.ordr.sesionId}" />
|
||||
</form>
|
||||
|
||||
<input type="hidden" name="CPID" class="CPID" value="${data.ordr.ordrrEmail}"/> <!-- 상점아이디 -->
|
||||
<input type="hidden" name="ORDERNO" class="ORDERNO" value="${data.ordr.ordrrMbtlnb}"/> <!-- 주문번호 -->
|
||||
<input type="hidden" name="PRODUCTTYPE" class="PRODUCTTYPE" value="${data.ordr.mbrId}"/> <!-- 상품구분(1: 디지털, 2: 실물) -->
|
||||
<input type="hidden" name="AMOUNT" class="AMOUNT" value="${data.ordr.mbrInnb}" /><!-- 결제금액 -->
|
||||
<input type="hidden" name="PRODUCTNAME" class="PRODUCTNAME" value="${data.ordr.sesionId}" /><!-- 상품명 -->
|
||||
<input type="hidden" name="USERID" class="USERID" value="${data.setle.dueDt}" /> <!-- 고객 ID -->
|
||||
<%-- 결제창에 넘어가는 값 --%>
|
||||
<form name="payForm" accept-charset="euc-kr">
|
||||
<input type="hidden" name="SERVER" value="DEV"/> <!-- 서버환경 : LIVE -->
|
||||
<input type="hidden" name="TAXFREECD" value="01"/> <!-- 과세 비과세 여부(00: 과세, 01: 비과세, 02: 복합과세) -->
|
||||
<input type="hidden" name="BILLTYPE" value="1"/> <!-- 과금 유형(1: 일반) -->
|
||||
<input type="hidden" name="PRODUCTTYPE" value="2"/> <!-- 상품구분(1: 디지털, 2: 실물) -->
|
||||
<input type="hidden" name="KIWOOM_ENC" value=""/> <!-- 보안 기능 -->
|
||||
|
||||
<input type="hidden" name="HOMEURL" class="HOMEURL" value="${data.setle.dueDt}" /> <!-- 결제 성공 후, 이동할 URL(결제 창에서 이동) -->
|
||||
<input type="hidden" name="FAILURL" class="FAILURL" value="${data.setle.dueDt}" /> <!-- 결제실패 후, 확인버튼 입력 시 이동할 URL -->
|
||||
<input type="hidden" name="TYPE" value="P"/> <!-- 결제방식(P:PC/M:모바일/W:웹뷰) -->
|
||||
<input type="hidden" name="CPID" value="CFO20585"/> <!-- 상점아이디 CFO20585,CFO20586-->
|
||||
<input type="hidden" name="PAYMETHOD" value="CARD"/> <!-- 결제수단 (CARD:카드/NAVERPAY:네이버페이)-->
|
||||
|
||||
<!--
|
||||
payVO.setOrderId(request.getParameter("orderId"));
|
||||
payVO.setPaymentKey(request.getParameter("paymentKey"));
|
||||
payVO.setAmount(request.getParameter("amount"));
|
||||
|
||||
payVO.setSopmalCd(request.getParameter("sopmalCd"));
|
||||
payVO.setMbrInnb(request.getParameter("mbrInnb"));
|
||||
payVO.setMbrId(request.getParameter("mbrId"));
|
||||
payVO.setSesionId(request.getParameter("sesionId"));
|
||||
payVO.setPgCmpnyNm(request.getParameter("pgCmpnyNm"));
|
||||
payVO.setSetleTyCd(request.getParameter("setleTyCd"));
|
||||
payVO.setSetlerNm(request.getParameter("ordrrNm"));
|
||||
|
||||
|
||||
let param = '?sopmalCd=' + sopmalCd;
|
||||
param += '&mbrInnb=' + mbrInnb;
|
||||
param += '&mbrId=' + mbrId;
|
||||
param += '&sesionId=' + sesionId;
|
||||
param += '&pgCmpnyNm=' + pgCmpnyNm;
|
||||
param += '&setleTyCd=' + setleTyCd;
|
||||
param += '&ordrrNm=' + ordrrNm;
|
||||
|
||||
-->
|
||||
<input type="hidden" name="ORDERNO" value="${data.setle.ordrInnb}"/> <!-- 주문번호 -->
|
||||
<input type="hidden" name="AMOUNT" value="${data.setle.setleAmt}" /><!-- 결제금액 -->
|
||||
<input type="hidden" name="PRODUCTNAME" value="${data.setle.goodsNm}" /><!-- 상품명 -->
|
||||
<input type="hidden" name="USERID" value="${data.ordr.mbrId}" /> <!-- 고객 ID -->
|
||||
<input type="hidden" name="HOMEURL" value="" /> <!-- 결제 성공 후, 이동할 URL(결제 창에서 이동) -->
|
||||
<input type="hidden" name="FAILURL" value="" /> <!-- 결제실패 후, 확인버튼 입력 시 이동할 URL -->
|
||||
|
||||
</form>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user