PageSourceSearch

https://letsymca.or.kr/js/epay.js?latest=Mon%20Oct%2005%2016:48:42%20KST%202026

js letsymca.or.kr collected 2026-10-05 07:50:49 UTC 29,792 bytes, 893 lines download raw bytes

1// true 일경우 개발서버용 영수증 호출
2// false 일경우 운영서버용 영수증 호출
3var __Test = false;
4
5var mallIdSEtting = "";
6// 결제 URL
7if(this.isMobile){
8	if(__Test){
9		mallIdSEtting = "T0010453"; // 개발
10	}else{
11		mallIdSEtting = "HS000010"; // 신규 운영
12	}
13	
14// 웹
15}else{
16	if(__Test){
17		mallIdSEtting = "T0010453"; // 개발
18	}else{
19		mallIdSEtting = "HS000010"; // 신규 운영
20	}
21	
22}
23function inputCheckSpecial(obj){
24	var ret= "true";
25	var strobj = obj.value;
26
27	//re = /[~!@\#$%<>^&*\()\-=+_\']/gi;
28	re = /[@\#$%<>&\()\-=+_\']/gi;
29
30	if( re.test(strobj) ){
31		obj.value=strobj.replace(re,"");
32		obj.focus();
33		ret += ",false";
34	}else {
35		ret += ",true";
36	}
37
38
39	if (ret.indexOf("false")!=-1){
40		return false;
41	}else{
42		return true;
43	}
44}
45
46
47function press(e) { 
48    var code = e.charCode?e.charCode:e.keyCode; 
49    if(code<48 || code>57) 
50        return false; 
51    else return true; 
52} 
53
54function down(e) { 
55    if(e.ctrlKey && e.keyCode==86) 
56        return false; 
57} 
58
59var temp = ""; 
60function up(obj) { 
61    if(obj.value.search(/[^0-9]/) != -1) 
62        obj.value = temp; 
63    else 
64        temp = obj.value; 
65} 
66
67
68
69
70function FlashObject(path, width, height)
71{
72    var m_movie = path;
73    var m_width = width;
74    var m_height = height;
75
76    this.wmode = "";
77    this.id = "";
78    this.quality = "high";
79    this.menu = "false";
80    this.allowScriptAccess = "sameDomain";
81    this.FlashVars = "";
82
83    this.Render = function()
84    {
85        var html;
86
87        html = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + m_width + "' height='" + m_height + "'";
88        if (this.id != "") html += " id='" + this.id + "'";
89        html += ">";
90        
91        html += "<param name='allowScriptAccess' value='" + this.allowScriptAccess + "' />";
92        html += "<param name='movie' value='" + m_movie + "' />";
93        html += "<param name='menu' value='" + this.menu + "' />";
94        html += "<param name='quality' value='" + this.quality + "' />";
95        if (this.wmode != "") html += "<param name='wmode' value='" + this.wmode + "' />";
96        if (this.FlashVars != "") html += "<param name='FlashVars' value='" + this.FlashVars + "' />";
97        
98        html += "<embed src='" + m_movie + "' quality='" + this.quality + "' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" + m_width + "' height='" + m_height + "'";
99        html += " allowScriptAccess='" + this.allowScriptAccess + "'";
100        if (this.wmode != "") html += " wmode='" + this.wmode + "'";
101        if (this.FlashVars != "") html += " FlashVars='" + this.FlashVars + "'";
102        html += " /></object>";
103        
104        document.write(html);
105    }
106}
107
108function f_menu_goto(url)
109{
110	window.parent.location.href=url;
111}
112
113
114var totcount;
115
116function setConfig(num){
117	totcount = num;
118}
119
120function clickshow(num) {
121	var showcase;
122	var totcount1 = totcount;
123
124	for (i=1;i<totcount1+1;i++) {
125		menu=eval("document.all.block"+i+".style");
126		imgch=eval("document.bar"+i);
127
128		if (num==i)	{
129			if (menu.display=="block") {
130				menu.display="none";
131			} else {
132				menu.display="block";
133				showcase = "1";
134			}
135		}
136	}
137
138	if (showcase == "1"){
139		for (i=1;i<totcount1+1;i++) {
140			menu=eval("document.all.block"+i+".style");
141			imgch=eval("document.bar"+i);
142			if (num!=i){
143				if (menu.display=="block") menu.display="none";
144			}
145		}
146	}
147}
148
149/*
150// 오른쪽 마우스 막음 start
151var message=""; 
152function clickIE() {
153	if (document.all) {
154		(message);
155		return false;
156	}
157}
158function clickNS(e) {
159	if(document.layers||(document.getElementById&&!document.all)) {
160		if (e.which==2||e.which==3) {
161			(message);
162			return false;
163		}
164	}
165}
166if (document.layers) {
167	document.captureEvents(Event.MOUSEDOWN);
168	document.onmousedown=clickNS;
169} else {
170	document.onmouseup=clickNS;
171	document.oncontextmenu=clickIE;
172}
173
174document.oncontextmenu=new Function("return false")
175//document.onselectstart=new Function("return false")
176document.ondragstart=new Function("return false")
177// 오른쪽 마우스 막음 end
178*/
179
180
181function f_reset(obj)
182{
183	obj.reset();
184}
185
186
187function Numberchk() { 
188	var key = event.keyCode;
189	 if(!(key==8||key==9||key==13||key==46||key==144||(key>=48&&key<=57)||key==110||key==190)){
190	//if(event.keyCode<45||(event.keyCode>57&&event.keyCode<96)||event.keyCode>105){
191	//if(event.keyCode<48||(event.keyCode>57&&event.keyCode<96)||event.keyCode>105){
192		event.returnValue = false; 
193	}
194} 
195
196function searchEnter() { 
197	var key = event.keyCode;
198	 if(key==13){
199   		f_list_submit();
200	}
201} 
202
203function submitEnter() { 
204	var key = event.keyCode;
205	 if(key==13){		 
206   		f_submit();
207	}
208} 
209
210function confirmEnter() { 
211	var key = event.keyCode;
212	 if(key==13){		 
213		f_confirm();
214	}
215}
216
217function vComma(obj) { 
218    var str = "" + obj.value.replace(/,/gi,''); // 콤마 제거 
219    var regx = new RegExp(/(-?\d+)(\d{3})/); 
220    var bExists = str.indexOf(".",0); 
221    var strArr  = str.split('.'); 
222    while(regx.test(strArr[0])){ 
223        strArr[0] = strArr[0].replace(regx,"$1,$2"); 
224    } 
225    if (bExists > -1) 
226        obj.value = strArr[0] + "." + strArr[1]; 
227    else 
228        obj.value = strArr[0]; 
229} 
230
231function trim(str) { 
232    return str.replace(/(^\s*)|(\s*$)/g, ""); 
233} 
234
235function getNumber(str) { 
236    str = "" + str.replace(/,/gi,''); // 콤마 제거 
237    str = str.replace(/(^\s*)|(\s*$)/g, ""); // trim 
238    return (new Number(str)); 
239} 
240
241function getComma(str) { 
242	var tmp = "";
243    var regx = new RegExp(/(-?\d+)(\d{3})/); 
244	str = ""+str;
245
246    var bExists = str.indexOf(".",0); 
247
248    var strArr  = str.split('.'); 
249    while(regx.test(strArr[0])){ 
250        strArr[0] = strArr[0].replace(regx,"$1,$2"); 
251    } 
252    if (bExists > -1) 
253        tmp =  strArr[0] + "." + strArr[1]; 
254    else 
255        tmp =  strArr[0]; 
256
257	return tmp;
258} 
259
260
261function isLength(varCk) {
262	var varLen = 0;
263	var agr = navigator.userAgent;
264
265	for (i=0; i<varCk.length; i++) {
266		ch = varCk.charAt(i);
267		if ((ch == "\n") || ((ch >= "ㅏ") && (ch <= "히")) || ((ch >="ㄱ") && (ch <="ㅎ")))
268			varLen += 2;
269		else
270			varLen += 1;
271	}
272	return (varLen);
273}
274
275
276
277// 입력 문자열 검사 (숫자/특수문자)
278function isInteger(varCk, charSet) {
279	var chk=true;
280	for (i=0; i<=varCk.length-1; i++) {
281		ch = varCk.substring(i,i+1);
282		if (ch>="0" && ch<="9") {
283			chk = true;
284		} else {
285			chk=false;
286			for (j=0; j<=charSet.length-1; j++) {
287				comp = charSet.substring(j,j+1);
288				if (ch==comp) {
289					chk = true;
290					break;
291				}
292			}
293			if (!chk) 	break;	// 숫자+특수문자외의 문자가 있는 경우만 error 종료 2002.04.08
294		}
295	}
296	return chk;
297}
298
299
300
301function isDay(varCk1,varCk2,varCk3) {
302	if ( (isLength(varCk1)==4) && (isLength(varCk2)==2) && (isLength(varCk3)==2) ) {
303		if ( (isInteger(varCk1,"")) && (isInteger(varCk2,"")) && (isInteger(varCk3,"")) ) {
304			if (varCk1>="1900" && varCk1<="2099" && varCk2>="01" && varCk2<="12") {
305				if (varCk2=="01" && varCk3>="01" && varCk3<="31") return true;
306				if (varCk2=="02" && varCk3>="01" && varCk3<="28") return true;
307				if (varCk2=="03" && varCk3>="01" && varCk3<="31") return true;
308				if (varCk2=="04" && varCk3>="01" && varCk3<="30") return true;
309				if (varCk2=="05" && varCk3>="01" && varCk3<="31") return true;
310				if (varCk2=="06" && varCk3>="01" && varCk3<="30") return true;
311				if (varCk2=="07" && varCk3>="01" && varCk3<="31") return true;
312				if (varCk2=="08" && varCk3>="01" && varCk3<="31") return true;
313				if (varCk2=="09" && varCk3>="01" && varCk3<="30") return true;
314				if (varCk2=="10" && varCk3>="01" && varCk3<="31") return true;
315				if (varCk2=="11" && varCk3>="01" && varCk3<="30") return true;
316				if (varCk2=="12" && varCk3>="01" && varCk3<="31") return true;
317				return false;
318			}
319			return false;
320		} else {
321			return false;
322		}
323	} else {
324		return false;
325	}
326}
327
328function isTime(varCk1,varCk2,varCk3) {
329	if ( (isLength(varCk1)==2) && (isLength(varCk2)==2) && (isLength(varCk3)==2) ) {
330		if ( (isInteger(varCk1,"")) && (isInteger(varCk2,"")) && (isInteger(varCk3,"")) ) {
331			if (varCk1>="00" && varCk1<="23" && varCk2>="00" && varCk2<="59" && varCk3>="00" && varCk3<="59") {
332				return true;
333			}
334			return false;
335		} else {
336			return false;
337		}
338	} else {
339		return false;
340	}
341}
342
343/*
344 * 분리자를 이용하여 날짜의 유효성 체크
345 * 예) 2000.03.24 -> '.'을 이용하여 체크한다.
346 *@param inputDate 체크할 날짜
347 *@param point 년,월,일 분리자
348 */
349function dateCheck(inputDate, point){
350	var dateElement = new Array(3);
351	
352	/*if(point != ""){
353		dateElement = inputDate.split(point);
354		if(inputDate.length != 10 || dateElement.length != 3){
355			return false;
356		}
357	}else{*/
358		dateElement[0] = inputDate.substring(0,4);
359		dateElement[1] = inputDate.substring(4,6);
360		dateElement[2] = inputDate.substring(6,8);
361	//}
362	//년도 검사
363	if( !( 1800 <= dateElement[0] && dateElement[0] <= 4000 ) ) {
364		return false;
365	}
366
367	//달 검사
368	if( !( 0 < dateElement[1] &&  dateElement[1] < 13  ) ) {
369		return false;
370	}
371
372	// 해당 년도 월의 마지막 날
373	var tempDate = new Date(dateElement[0], dateElement[1], 0);
374	var endDay = tempDate.getDate();
375
376	//일 검사
377	if( !( 0 < dateElement[2] && dateElement[2] <= endDay ) ) {
378		 return false;
379	}
380
381	return true;
382}
383
384
385/*
386 * 날짜 비교
387 * 종료일이 시작일 보다 작을때 false를
388 * 정상 기간일 경우 true를 리턴한다.
389 * @param startDate 시작일
390 * @param endDate 종료일
391 * @param point 날짜 구분자
392 */
393 function dateCompare(startDate, endDate, point){
394	//정상 날짜인지 체크한다.
395	var startDateChk = dateCheck(startDate, point);
396	if(!startDateChk){
397		return false;
398	}
399	var endDateChk = dateCheck(endDate, point, "end");
400	
401	if(!endDateChk){
402		return false;
403	}
404
405	//년 월일로 분리 한다.
406	var start_Date = new Array(3);
407	var end_Date = new Array(3);
408
409	if(point != ""){
410		start_Date = startDate.split(point);
411		end_Date = endDate.split(point);
412		if(start_Date.length != 3 && end_Date.length != 3){
413			return false;
414		}
415	}else{
416		start_Date[0] = startDate.substring(0,4);
417		start_Date[1] = startDate.substring(4,6);
418		start_Date[2] = startDate.substring(6,8);
419
420		end_Date[0] = endDate.substring(0,4);
421		end_Date[1] = endDate.substring(4,6);
422		end_Date[2] = endDate.substring(6,8);
423	}
424
425	//Date 객체를 생성한다.
426	var sDate = new Date(start_Date[0], start_Date[1], start_Date[2]);
427	var eDate = new Date(end_Date[0], end_Date[1], end_Date[2]);
428
429	if(sDate > eDate){
430		return false;
431	}
432
433	return true;
434}
435
436function corpAddr(){
437	var frm = document.frm;
438
439	if( frm.addrChk.checked ){
440		frm.zip.value = frm.ceoZip.value;
441		frm.addr1.value = frm.ceoAddr1.value;
442		frm.addr2.value = frm.ceoAddr2.value;
443	}else{
444		frm.zip.value = "";
445		frm.addr1.value = "";
446		frm.addr2.value = "";
447	}
448}
449
450var epayCtrl = {
451	// 모바일 접속여부
452	isMobile : /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
453	// form id 접미사(웹 : EP_, 모바일 : sp_)
454	prefixId : "EP_",
455	// 초기화
456	init : function(){
457		$.each(this.params, function (paramId,paramVal){
458			epayCtrl.params[paramId] = "";
459		});
460		$.each(this.fmcsParams, function (paramId,paramVal){
461			epayCtrl.fmcsParams[paramId] = "";
462		});
463		$.each(this.cancelParams, function (paramId,paramVal){
464			epayCtrl.cancelParams[paramId] = "";
465		});
466		// 기본값 setting
467//		this.params.mall_id = "T5102001"; // 웹
468//		this.params.mall_id = "T0009696"; // 모바일
469		// 모바일
470		// 결제 URL
471        if(this.isMobile){
472        	if(__Test){
473        		this.params.mall_id = "T0010453"; //개발
474        	}else{
475        		this.params.mall_id = "HS000010"; // 운영	
476        	}
477        // 웹
478        }else{
479        	if(__Test){
480        		this.params.mall_id = "T0010453"; //개발	
481        	}else{
482        		this.params.mall_id = "HS000010"; // 운영	
483        	}
484        	//this.params.mall_id = "T5102001"; // 개발
485        }
486		this.params.mall_nm = "YMCA고양국제청소년문화센터_ON";
487		this.params.currency = "00";
488		this.params.return_url = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: '') + "/epay/order_res";
489		this.params.lang_flag = "KOR";
490		this.params.charset = "UTF-8";
491		this.params.window_type = "iframe";
492		this.params.pay_type = "11";
493		// 결재취소 고정값
494		this.cancelParams.mall_id = this.params.mall_id;
495		this.cancelParams.tr_cd = "00201000";
496		this.cancelParams.mgr_txtype = "40";
497	},
498	refundParams : {
499		refundData : "",					//환불상품조회 파라미터
500		refundJsonData : "",				//완료화면 데이터
501		refundReason : ""					//해약 사유
502	}
503	,
504	fmcsParams : {
505		payCategory : "",					// 결재범주 (lecture : 강좌, ticket : 입장권, reservation : 대관예약, membership : 맴버쉽)
506		classCd : "",						// 강좌코드
507		itemCd : "",						// item코드
508		aStudentCode : "",					// 수강자코드
509		monthCnt : "",						// 수강기간(월)
510		result_url : "",					// 결과페이지
511		waitNumber : "",					// waitNumber
512		fail_url : ""
513		//////// 패키지 /////////////////////	
514		, product_amt : "0"					// 토탈 가격
515		, assn : ""
516		, adornation : ""
517	//////// 패키지 /////////////////////
518		, rentIdx : ""						// 대관rentIdx
519		, memb_user_no : ""					// 사용자 no
520		, user_nm : ""						// 사용자 이름
521			
522	},
523	// 결재시 사용할 parameters
524	params : {
525		
526		/************************************ 공통 ******************************************/
527		mall_id : "",						// 가맹점 ID
528		mall_nm : "",						// 가맹점명
529		pay_type : "",						// 결재수단 코드
530		order_no : "",						// 가맹점 주문번호
531		cert_type : "",						// 인증타입
532		currency : "",						// 통화코드
533		product_nm : "",					// 상품명(특수문자 제외)
534		product_amt : "0",					// 상품금액(반드시 숫자만 가능)
535		return_url : "",      				// Return 받을 URL (HTTP부터 입력)
536		ci_url : "",						// 가맹점 CI URL
537		lang_flag : "",						// 언어(KOR : 국문, ENG : 영문)
538		charset : "",						// 가맹점 CharSet (EUC-KR(default) / UTF-8)
539		user_id : "",						// 가맹점 고객ID
540		memb_user_no : "",					// 가맹점 고객일련번호
541		user_nm : "",						// 가맹점 고객명(구매자명)
542		user_mail : "", 					// 가맹점 고객 E-mail
543		user_phone1 : "",					// 가맹점 고객 연락처1 (‘-‘없이 입력)
544		user_phone2 : "",					// 가맹점 고객 연락처2 (‘-‘없이 입력) – ISP 필수
545		user_addr : "",						// 가맹점 고객 주소
546		user_define1 : "",					// BC바우처 결제 시 바우처 물품정보 필드
547		user_define2 : "",					// BC바우처 결제 시 바우처 물품정보 필드
548		user_define3 : "",					// BC바우처 결제 시 바우처 물품정보 필드
549		user_define4 : "",					// BC바우처 결제 시 바우처 물품정보 필드
550		user_define5 : "",					// BC바우처 결제 시 바우처 물품정보 필드
551		user_define6 : "",					// BC바우처 결제 시 바우처 물품정보 필드
552		product_type : "1",					// 상품정보구분 : 0-실물, 1-서비스
553		product_expr : "",					// 서비스 기간 (YYYYMMDD)
554		disp_cash_yn : "",					// 현금영수증 화면표시 여부(Y/N) (“N”: 미표시, “”(빈 값): DB조회)
555		window_type : "iframe",
556		/*********************************** 신용카드 ****************************************/
557		usedcard_code : "",					// 사용가능 카드 LIST
558		quota : "",							// 할부개월
559		os_cert_flag : "",					// 해외안심클릭 사용여부 (해외카드인증구분 = ‘2’대행가맹점은 Visa3DSecure자체가맹점은 해당값이 2 인 경우 Visa3DSecure, 아닌 경우 keyin
560		noinst_flag : "",					// 무이자 여부 (Y:무이자, N:일반, 빈값:DB조회)
561		noinst_term : "",					// 무이자 기간 (noinst_flag 값이 Y인 경우 필수/ FORMAT->카드코드-할부개월:할부개월,카드코드-할부개월/EXAMPLE->029-02:03,031-03:04:06
562		set_point_card_yn : "",				// 카드사포인트 사용여부 (Y:사용, 그외:미사용)
563		point_card : "",					// 포인트카드 LIST (set_point_card_yn 값이 Y인 경우 필수.카드사와 포인트 특약 맺은 부분이 있을 경우 사용.FORMAT->카드코드-더할할부개월,카드코드-더할할부개월 EXAMPLE->029-40,031-60)
564		join_cd : "",						// 조인코드 (JC02(현대카드 M포인트 청구할인),JC03(국민카드 아이사랑 카드할인),JC04(ARS 신용카드 결제 거래 ONLINE 거래),
565											//        JC05(ARS 신용카드 결제 거래 OFFLINE 거래),JC06(세이브 결제 거래),JC07(비씨 물품바우처 승인 거래),JC08(롯데 청구할인),
566											//        JC09(이브릿지 발렛 서비스),JC11(롯데카드 아이행복 제휴할인),JC12(시티카드 VISA 포인트)
567		kmotion_useyn : "",					// 국민앱카드 사용유무(“Yâ€
567:사용, “N”:미사용, “”(빈 값): DB조회)
568		
569		/*********************************** 가상계좌 ****************************************/
570		vacct_bank : "",					// 가상계좌 사용가능한 은행 LIST FORMAT->은행코드:은행코드: ... :은행코드 EXAMPLE->003:004:011:020
571											// 기업(003),국민(004),농협중앙회(011),우리은행(020),SC제일은행(023),신한은행(026),부산은행(032),우체국(071),하나은행(081),대구은행(031),빈값: DB조회
572		vacct_end_date : "",				// 입금 만료 날짜
573		vacct_end_time : "",				// 입금 만료 시간
574		
575		/*********************************** 선불카드 ****************************************/
576		prepaid_cp : "",					// 선불카드 CP (캐시비(CCB), 이지캐시(ECB), 뱅크월렛(BKF) FORMAT->코드:코드: ... :코드 EXAMPLE->CCB:ECB:BKF  빈 값: DB조회
577		
578		
579		/*********************************** 선불카드 ****************************************/
580		usedcard_code : "",					// 사용가능한 카드 LIST // FORMAT->카드코드:카드코드: ... :카드코드 EXAMPLE->029:027:031 // 빈값 : DB조회
581		quota : "",							// 할부개월 (카드코드-할부개월)
582		os_cert_flag : "",					// 해외안심클릭 사용여부(변경불가)
583		noinst_flag : "",					// 무이자 여부 (Y/N)
584		noinst_term : "",					// 무이자 기간 (카드코드-더할할부개월)
585		set_point_card_yn : "",				// 카드사포인트 사용여부 (Y/N)
586		point_card : "",					// 포인트카드 LIST 
587		join_cd : "",						// 조인코드
588		kmotion_useyn : "",					// 국민앱카드 사용유무 (Y/N)
589		
590		/*********************************** 인증응답용 인증 요청 값 ****************************************/
591		res_cd : "",						// 응답코드
592		res_msg : "",						// 응답메세지
593		tr_cd : "",							// 결제창 요청구분
594		ret_pay_type : "",					// 결제수단
595		ret_complex_yn : "",				// 복합결제 여부 (Y/N)
596		card_code : "",						// 카드코드 (ISP:KVP카드코드 MPI:카드코드)
597		eci_code : "",						// MPI인 경우 ECI코드
598		card_req_type : "",					// 거래구분
599		save_useyn : "",					// 카드사 세이브 여부 (Y/N)
600		trace_no : "",						// 추적번호
601		sessionkey : "",					// 세션키
602		encrypt_data : "",					// 암호화전문
603		spay_cp : "",						// 간편결제 CP 코드
604		card_prefix : "",					// 신용카드prefix
605		card_no_7 : "",						// 신용카드번호 앞7자리
606	},
607	cancelParams : {
608		tr_cd : "00201000",					// [필수]거래구분(수정불가)
609		mgr_txtype : "40",					// 20 : 매입요청, 31 : 부분매입취소, 32 : 부분승인취소, 33 : 계좌이체부분취소, 40 : 즉시취소, 60 : 환불, 62 : 부분환불
610		mall_id : mallIdSEtting,
611		org_cno : "",						// 원거래고유번호
612		mgr_subtype : "",					// 변경세부구분
613		order_no : "",
614		result_url : "",
615	},
616	// 결재취소 가능여부 체크
617	validCancelPayment : function(){
618		var returnBool = true;
619		$.ajax({
620			url : "/epay/validCancelPayment",
621			method: "POST",
622			async : false,
623			contentType: 'application/json',
624			dataType : 'json',
625			data : JSON.stringify(epayCtrl.cancelParams),
626			success : function(result){
627				var result = JSON.parse(result.result);
628				// 취소불가
629				if(result.resultCode != 0){
630					returnBool = false;
631					alert(result.resultMessage);
632				}else{
633					// 취소가능시 원래 결재승인번호 setting
634					epayCtrl.cancelParams.order_no = result.order_no;
635					epayCtrl.cancelParams.org_cno = result.trace_no;
636				}
637			},
638			error : function(xhr, textStatus, errorThrown){
639				if(xhr.status===403) {
640					alert("세션이 만료되었습니다.");
641					location.href="/auth/login";
642				}
643			}
644		});
645		return returnBool;
646	},
647	// 결재취소 처리
648	cancelPayment : function(){
649		if(!this.validCancelPayment()){
650			return;
651		}
652		
653		$.ajax({
654			url : "/epay/cancelPayment",
655			method: "POST",
656			async : false,
657			contentType: 'application/json',
658			dataType : 'json',
659			data : JSON.stringify(epayCtrl.cancelParams),
660			success : function(result){
661				var result = JSON.parse(result.result);
662				alert(result.resultMessage)
663				location.href = epayCtrl.cancelParams.result_url;
664			},
665			error : function(xhr, textStatus, errorThrown){
666				if(xhr.status===403) {
667					alert("세션이 만료되었습니다.");
668					location.href="/auth/login";
669				}
670			}
671		});
672	},
673	// 결재창으로 전달할 form 생성
674	makeParamFrm : function(){
675		
676		$("#epayFrm").empty();
677		var epayForm = document.createElement("form");
678		$(epayForm).attr('name', 'frm_pay');
679		$(epayForm).attr('method', 'post');
680		if(this.isMobile){
681			this.prefixId = "sp_";
682		}
683		$.each(epayCtrl.fmcsParams, function (id,value){
684			$(epayForm).append('<input type="hidden" id="'+id+'" name="'+id+'" value="'+value+'" >');
685		});
686		$.each(epayCtrl.params, function (id,value){
687			$(epayForm).append('<input type="hidden" id="'+epayCtrl.prefixId+id+'" name="'+epayCtrl.prefixId+id+'" value="'+value+'" >');
688		});
689		$(epayForm).append('<input type="hidden" id="prefixId" name="prefixId" value="'+this.prefixId+'" >');
690		if("60" == epayCtrl.fmcsParams.payCategory){
691			$(epayForm).append(makeObj("refundData", epayCtrl.refundParams.refundData));
692			$(epayForm).append(makeObj("refundJsonData", epayCtrl.refundParams.refundJsonData));
693			$(epayForm).append(makeObj("refundReason", epayCtrl.refundParams.refundReason));
694		}
695		$("#epayFrm").append(epayForm);
696	},
697	// 통합인증창 호출
698	f_cert : function(){
699		var frm_pay = document.frm_pay;
700		
701        frm_pay[this.prefixId + "mall_nm"].value        = encodeURIComponent( frm_pay[this.prefixId + "mall_nm"].value );
702        frm_pay[this.prefixId + "product_nm"].value     = encodeURIComponent( frm_pay[this.prefixId + "product_nm"].value );
703        frm_pay[this.prefixId + "user_nm"].value        = encodeURIComponent( frm_pay[this.prefixId + "user_nm"].value );
704        frm_pay[this.prefixId + "user_addr"].value      = encodeURIComponent( frm_pay[this.prefixId + "user_addr"].value );
705        // 모바일
706        if(this.isMobile){
707            easypay_card_webpay(frm_pay,"/epay/order_req","hiddenifr","0","0","iframe",30);
708        // 웹
709        }else{
710	        easypay_webpay(frm_pay,"/epay/iframe_req","hiddenifr","0","0","iframe",30);
711        }
712
713        frm_pay[this.prefixId + "mall_nm"].value        = decodeURIComponent( frm_pay[this.prefixId + "mall_nm"].value );
714        frm_pay[this.prefixId + "product_nm"].value     = decodeURIComponent( frm_pay[this.prefixId + "product_nm"].value );
715        frm_pay[this.prefixId + "user_nm"].value        = decodeURIComponent( frm_pay[this.prefixId + "user_nm"].value );
716        frm_pay[this.prefixId + "user_addr"].value      = decodeURIComponent( frm_pay[this.prefixId + "user_addr"].value );
717	},
718	// 인증정보(상품정보, 고객정보, 결재기본정보) set
719	setCertInfo : function(){
720		var setCertInfoBool = true;
721		$.ajax({
722			url : "/epay/certInfo",
723			method: "POST",
724			async : false,
725			contentType: 'application/json',
726			dataType : 'json',
727			data : JSON.stringify(epayCtrl.fmcsParams),
728			success : function(result){
729				var certResult = JSON.parse(result.itemInfo);
730				// 재결제 코드
731				if(certResult.payCategory == "40"){
732					// 수강등록이 안될때
733					if(certResult.resultCode != "0"){
734						setCertInfoBool = false;
735						if(certResult.resultCode == "1004"){
736							var Confirm = confirm('마이페이지 > 수강 > 강좌 전체 이력에서 결제대기 상품을 결제해 주세요.');
737							  if(Confirm) {
738								  moveMyWaitprogram("PW,AW");
739							  }else{
740								 return false;  
741							  }
742						}else{
743							alert(certResult.resultMessage);
744						}
745						  
746					} else {
747						epayCtrl.fmcsParams.waitNumber = certResult.waitNumber;
748						epayCtrl.fmcsParams.result_url = "/mypage/program/batch-finish-view/"+certResult.waitNumber;
749					}
750				}
751				
752				$.each(epayCtrl.params, function (paramId,paramVal){
753					$.each(certResult, function (resultId,resultVal){
754						if(paramId == resultId){
755							epayCtrl.params[paramId] = resultVal;
756						}
757					});
758				});
759			},
760			error : function(xhr, textStatus, errorThrown){
761				if(xhr.status===403) {
762					alert("세션이 만료되었습니다.");
763					location.href="/auth/login";
764				}
765			}
766		});
767		return setCertInfoBool;
768	},
769	// 결재가능여부 검증
770	paymentVerification  : function(){
771		var verificationBool = false;
772		if(epayCtrl.fmcsParams.payCategory == "30" || epayCtrl.fmcsParams.payCategory == "50"){
773			return true;
774		}
775		$.ajax({
776			url : "/epay/verification",
777			method: "POST",
778			async : false,
779			contentType: 'application/json',
780			dataType : 'json',
781			data : JSON.stringify(epayCtrl.fmcsParams),
782			success : function(result){
783				var verificationResult = JSON.parse(result.result);
784				
785				if(result.result2) {	// [20190715] 패키지
786					if(verificationResult.resultCode == "0"){
787						var verificationResult2 = JSON.parse(result.result2);
788						if(verificationResult2.resultCode == "0"){
789							verificationBool = true;
790						}else{
791							alert(verificationResult2.resultMessage);
792						}
793					}
794				} else {	// [20190715] 패키지 없을 때
795					if(verificationResult.resultCode == "0"){
796						verificationBool = true;
797					}else{
798						alert(verificationResult.resultMessage);
799					}
800				}
801			},
802			error : function(xhr, textStatus, errorThrown){
803				if(xhr.status===403) {
804					alert("세션이 만료되었습니다.");
805					location.href="/auth/login";
806				}
807			}
808		});
809		
810		return verificationBool;
811	},
812	openCert : function(){
813		// 상품검증 (FMCS item Data 검증)
814		if(!this.paymentVerification()){
815			return false;
816		}
817		// 인증정보(상품정보, 고객정보, 결재기본정보) set
818		if(!this.setCertInfo()){
819			return false;
820		}
821		// 결재창으로 전달할 form 생성
822		this.makeParamFrm();
823		
824		// 통합인증창 호출
825		this.f_cert();
826	},
827	openRefundCert : function(){
828		// 인증정보(상품정보, 고객정보, 결재기본정보) set
829		this.setCertInfo();
830		this.makeParamFrm();
831		this.f_cert();
832	}
833}
834
835
836//Get cookie function
837var getCookie = function(name) {
838var value = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
839return value? value[2] : null;
840};
841
842/**********************************************************************************
843거래내역  영수증 팝업
844***********************************************************************************/
845function __receipt(controlNo, payment){
846	//controlNo 거래 중 발생한 20자리 유니크 값 ex  20120118502010501835
847	//payment 타입은 상관이없어보임 카드는 01 이라고함 만약 영수증에 문제가되면 변경 요망 
848	/*
849	신용카드 	01
850	계좌이체 	02
851	가상계좌 	03
852	휴대폰 	04
853	ars 	05
854	현금영수증  06
855	에스크로	07
856	*/
857	payment= "01"; 
858	if(controlNo == null || controlNo == "" || controlNo == undefined){
859		alert("영수증 발급이 불가능합니다.");
860		return false;
861	}
862	var frm = document.createElement("form");
863	window.open("","MEMB_POP_RECEIPT", 'toolbar=0,scroll=1,menubar=0,status=0,resizable=0,width=380,height=700');
864	if(this.isMobile){
865		if(__Test){
866			frm.setAttribute("action", "http://testoffice.easypay.co.kr/receipt/ReceiptBranch.jsp");
867		}else{
868			frm.setAttribute("action", "https://office.easypay.co.kr/receipt/ReceiptBranch.jsp");
869		}
870	}else{
871		if(__Test){
872			frm.setAttribute("action", "http://testoffice.easypay.co.kr/receipt/ReceiptBranch.jsp"); //테스트
873		}else{
874			frm.setAttribute("action", "https://office.easypay.co.kr/receipt/ReceiptBranch.jsp"); //운영
875		}	
876	}
877	var controlNoObj = document.createElement("input");
878	controlNoObj.setAttribute("type", "hidden");
879	controlNoObj.setAttribute("name", "controlNo");
880	controlNoObj.setAttribute("value", controlNo);
881	var paymentObj = document.createElement("input");
882	paymentObj.setAttribute("type", "hidden");
883	paymentObj.setAttribute("name", "payment");
884	paymentObj.setAttribute("value", payment);
885	frm.appendChild(controlNoObj);
886	frm.appendChild(paymentObj);
887	frm.setAttribute("target", "MEMB_POP_RECEIPT");
888	document.body.appendChild(frm);
889	frm.submit();
890	frm.remove();
891	
892}
893

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.