Pārlūkot izejas kodu

KCP 계좌인증 임시 커밋

card007 5 gadi atpakaļ
vecāks
revīzija
322714799f

BIN
lib/CtCli-1.0.6.jar


+ 15 - 1
pom.xml

@@ -57,7 +57,7 @@
 			<scope>system</scope>
 			<systemPath>${basedir}/lib/gagaframework-excel-1.7.1-RELEASE.jar</systemPath>
 		</dependency>
-		<!-- KCP -->
+		<!--KCP-->
 		<dependency>
 			<groupId>com.kcp</groupId>
 			<artifactId>kcp</artifactId>
@@ -65,6 +65,20 @@
 			<scope>system</scope>
 			<systemPath>${basedir}/lib/jPpcliE.jar</systemPath>
 		</dependency>
+		<dependency>
+			<groupId>com.kcp</groupId>
+			<artifactId>ConnectionKCP</artifactId>
+			<version>1.0</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/lib/ConnectionKCP.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>kr.co.kcp.CT_CLI</groupId>
+			<artifactId>CT_CLI</artifactId>
+			<version>1.0</version>
+			<scope>system</scope>
+			<systemPath>${basedir}/lib/CtCli-1.0.6.jar</systemPath>
+		</dependency>
 		<!-- \\\ WEB-INF lib -->
 	</dependencies>
 	

+ 0 - 4
src/main/java/com/style24/core/biz/service/TscOrderRefundService.java

@@ -1,18 +1,14 @@
 package com.style24.core.biz.service;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
 
 import com.gagaframework.web.parameter.GagaMap;
 import com.style24.core.biz.dao.TscOrderChangeDao;
-import com.style24.core.support.env.TscConstants;
 import com.style24.persistence.domain.Order;
-import com.style24.persistence.domain.OrderChange;
 
 import lombok.extern.slf4j.Slf4j;
 

+ 58 - 4
src/main/java/com/style24/core/biz/service/TscOrderService.java

@@ -1,8 +1,6 @@
 package com.style24.core.biz.service;
 
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
-import java.util.Calendar;
 import java.util.Collection;
 import java.util.List;
 
@@ -17,12 +15,11 @@ import com.gagaframework.excel.env.GagaExcelConstants;
 import com.gagaframework.excel.xssf.GagaExcelResultHandler;
 import com.gagaframework.web.parameter.GagaMap;
 import com.gagaframework.web.rest.server.GagaResponseStatus;
+import com.kcp.J_PP_CLI_N;
 import com.style24.core.biz.dao.TscOrderDao;
-import com.style24.core.biz.dao.TscPointDao;
 import com.style24.core.support.env.TscConstants;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.domain.Order;
-import com.style24.persistence.domain.Payment;
 import com.style24.persistence.domain.Point;
 
 import lombok.extern.slf4j.Slf4j;
@@ -1409,6 +1406,63 @@ public class TscOrderService {
 		
 		
 		
+	}
+
+	/**
+	 * KCP 계좌인증 처리
+	 *
+	 * @param GagaMap
+	 * @result Boolean
+	 * @author card007
+	 * @since 2021. 03. 12
+	 */
+	@Transactional("shopTxnManager")
+	public Boolean checkAccount(GagaMap map) {
+		Boolean result = false;
+
+		J_PP_CLI_N c_PayPlus = new J_PP_CLI_N();
+
+		c_PayPlus.mf_init( "", env.getProperty("pg.kcp.gw.url"), env.getProperty("pg.kcp.gw.port"), 0, env.getProperty("pg.kcp.log.dir") );
+		c_PayPlus.mf_init_set();
+
+		String custIp = "127.0.0.1";
+		String tranCd = "00100000";
+		String ordNo = "100001";
+		String bankNm = "김지철";
+		String accountNo = "110500288201";
+		String bankCd = "88";
+
+		int payx_data_set;
+		int common_data_set;
+
+		payx_data_set   = c_PayPlus.mf_add_set( "payx_data" );
+		common_data_set = c_PayPlus.mf_add_set( "common"    );
+
+		c_PayPlus.mf_set_us( common_data_set, "amount", "0" );
+		c_PayPlus.mf_set_us( common_data_set, "cust_ip",   custIp    );
+		c_PayPlus.mf_set_us( common_data_set, "escw_mod",  "N"        );
+
+		c_PayPlus.mf_add_rs( payx_data_set, common_data_set );
+
+		// 계좌 정보
+		int acnt_data_set = c_PayPlus.mf_add_set( "bank" );
+
+		c_PayPlus.mf_set_us( acnt_data_set, "bk_owner_nm", bankNm    );  // 예금주명
+
+		c_PayPlus.mf_set_us( acnt_data_set, "bk_txtype",     "74200000"       );  // 지불 타입 (계좌 인증)
+		c_PayPlus.mf_set_us( acnt_data_set, "bk_code",       bankCd                );  // 은행 코드          
+		c_PayPlus.mf_set_us( acnt_data_set, "bk_account_no",  accountNo      );  // 발급 계좌
+		
+		c_PayPlus.mf_add_rs( payx_data_set, acnt_data_set );
+
+		// c_PayPlus.mf_do_tx (g_conf_site_cd, g_conf_site_key, tranCd, custIp, ordNo, "3", "0" );
+
+		map.set("ResCd", c_PayPlus.m_res_cd);		// 결과 코드
+		map.set("ResMsg", c_PayPlus.m_res_msg);		// 결과 메시지
+
+		log.info("CHECK INFO :::: {}", c_PayPlus.getRecvObj().toString());
+
+		return result;
 	}
 }