Jelajahi Sumber

마이페이지 주문 상세 임시 커밋

card007 5 tahun lalu
induk
melakukan
38b93d1db3

+ 1 - 0
src/main/resources/config/application-locd.yml

@@ -70,6 +70,7 @@ pg:
         log.level: 3
         module.type: 01
         tx.mode: 0
+        receipt.url : https://testadmin8.kcp.co.kr/assist/bill.BillActionNew.do
 
 # 네이버페이 API
 naverPay:

+ 1 - 0
src/main/resources/config/application-run.yml

@@ -78,6 +78,7 @@ pg:
         log.level: 3
         module.type: 01
         tx.mode: 0
+        receipt.url : https://admin8.kcp.co.kr/assist/bill.BillActionNew.do
 
 # 네이버페이 API
 naverPay:

+ 2 - 0
src/main/webapp/WEB-INF/views/web/mypage/MypageOrderDetailFormWeb.html

@@ -467,6 +467,8 @@
 	let ordNo = [[${ordNo}]];
 	let orderList = [[${orderList}]];
 	let paymentInfo = [[${paymentInfo}]];
+	let orderAmtInfo = [[${orderAmtInfo}]];
+	let kcpReceiptUrl = [[${@environment.getProperty('pg.kcp.receipt.url')}]];
 	let jsonObj = {};
 
 	$(document).ready(function() {

+ 25 - 0
src/main/webapp/ux/pc/js/mypage.js

@@ -277,6 +277,31 @@ var fnReceipt = function(param) {
 	// param == 'card'  신용카드 전표
 	// param == 'cash'  현금영수증 전표
 	// param == 'cancel' 취소전표
+	let receiptWin = kcpReceiptUrl;
+	let option = '';
+	if (param == 'card') {
+		// URL 설정
+		receiptWin += '?cmd=card_bill';
+		receiptWin += '&tno=' + paymentInfo.pgTid;
+		receiptWin += '&order_no=' + ordNo;
+		receiptWin += '&trade_mony=' + orderAmtInfo.realOrdAmt + orderAmtInfo.realDelvAmt;
+		
+		// 팝업 크기 설정
+		option = 'width=455, height=815';
+	} else if (param == 'cash') {
+		// URL 설정
+		receiptWin += '?cmd=cash_bill';
+		receiptWin += '&cash_no=' + paymentInfo.cashAuthNo;
+		//receiptWin += '&cash_no=' + paymentInfo.cashTradeNo;		// 둘중 하나 인데 확인 필요
+		receiptWin += '&order_id=' + ordNo;
+		receiptWin += '&trade_mony=' + orderAmtInfo.realOrdAmt + orderAmtInfo.realDelvAmt;
+		
+		// 팝업 크기 설정
+		option = 'width=370, height=625';
+	}
+
+	// 팝업 생성
+	window.open(receiptWin, "", option);
 }
 
 // 상품권 현금영수증 신청 처리