Browse Source

PG 관련 정보

marseyes 2 years ago
parent
commit
c95ca09e21

+ 14 - 3
src/main/java/com/oqpo/api/service/loanmng/EasypayPaymentService.java

@@ -3,9 +3,11 @@ package com.oqpo.api.service.loanmng;
3 3
 
4 4
 import com.kicc.EasyPayClient;
5 5
 import com.oqpo.api.entity.oper.UserMngEntity;
6
+import com.oqpo.api.entity.stinfo.BrandEntity;
6 7
 import com.oqpo.api.exception.GlobalException;
7 8
 import com.oqpo.api.mapper.loanmng.UnpaidMngMapper;
8 9
 import com.oqpo.api.mapper.oper.UserMngMapper;
10
+import com.oqpo.api.mapper.stinfo.BrandMapper;
9 11
 import com.oqpo.api.service.CommonService;
10 12
 import com.oqpo.api.util.DateUtil;
11 13
 import com.oqpo.api.util.StringUtil;
@@ -31,6 +33,9 @@ public class EasypayPaymentService extends CommonService {
31 33
     @Autowired
32 34
     private UserMngMapper userMngMapper;
33 35
 
36
+    @Autowired
37
+    private BrandMapper brandMapper;
38
+
34 39
     @Value("${kicc.gateway}")
35 40
     private String kiccGatewayUrl;
36 41
     @Value("${kicc.cert_dir}")
@@ -52,9 +57,15 @@ public class EasypayPaymentService extends CommonService {
52 57
         // 1. 주문번호 생성
53 58
         response.setPoOrdNo(fnGetDealNo(36, ""));
54 59
 
55
-        // TODO 2. 이지페이 결제요청 데이터 생성
60
+        // 2. PG 관련 정보
61
+        BrandEntity brandInfo = brandMapper.selectBrandInfo(easypayPaymentCreateRequest.getBrandId());
62
+        response.setPgId(brandInfo.getPgId());
63
+        response.setPgKey(brandInfo.getPgKey());
64
+        response.setPgAfflId(brandInfo.getPgAfflId());
65
+
66
+        // TODO 3. 이지페이 결제요청 데이터 생성
56 67
 
57
-        // 3. 사용자정보 조회 및 매핑
68
+        // 4. 사용자정보 조회 및 매핑
58 69
         UserMngEntity userInfo = userMngMapper.selectUserInfo(userId);
59 70
         response.setOrdNm(userInfo.getUserNm()); // 구매자명
60 71
         response.setGoodsNm(easypayPaymentCreateRequest.getStoreId() //
@@ -63,7 +74,7 @@ public class EasypayPaymentService extends CommonService {
63 74
         response.setOrdTel(StringUtil.isEmpty(userInfo.getTelNo()) && userInfo.getTelNo().startsWith("010") ? userInfo.getTelNo() : null); // 휴대전화번호
64 75
         response.setOrdEmail(userInfo.getEmail()); // 이메일
65 76
 
66
-        // 4. 이지페이 결제 URL 매핑
77
+        // 5. 이지페이 결제 URL 매핑
67 78
         response.setKicc_javascript_url(kiccJavaScriptUrl);
68 79
         response.setKicc_action_web_url(kiccActionWebUrl);
69 80
         response.setKicc_action_mobile_url(kiccActionMobileUrl);

+ 14 - 10
src/main/java/com/oqpo/api/web/dto/response/loanmng/EasypayPaymentCreateResponse.java

@@ -8,10 +8,14 @@ public class EasypayPaymentCreateResponse {
8 8
 
9 9
     @ApiModelProperty(value = "수발주주문번호")
10 10
     private String poOrdNo;
11
-    @ApiModelProperty(value = "거래번호")
12
-    private String tid;
13
-    @ApiModelProperty(value = "가맹점ID")
14
-    private String mid;
11
+
12
+    @ApiModelProperty(value = "PG사아이디")
13
+    private String pgId;
14
+    @ApiModelProperty(value = "PG KEY")
15
+    private String pgKey;
16
+    @ApiModelProperty(value = "PG 가맹점아이디")
17
+    private String pgAfflId;
18
+
15 19
     @ApiModelProperty(value = "상품명")
16 20
     private String goodsNm;
17 21
     @ApiModelProperty(value = "구매자명")
@@ -21,11 +25,11 @@ public class EasypayPaymentCreateResponse {
21 25
     @ApiModelProperty(value = "구매자Email")
22 26
     private String ordEmail;
23 27
 
24
-	@ApiModelProperty(value = "KICC JAVASCRIPT URL")
25
-	private String kicc_javascript_url;
26
-	@ApiModelProperty(value = "KICC ACTION WEB URL")
27
-	private String kicc_action_web_url;
28
-	@ApiModelProperty(value = "KICC ACTION MOBILE URL")
29
-	private String kicc_action_mobile_url;
28
+    @ApiModelProperty(value = "KICC JAVASCRIPT URL")
29
+    private String kicc_javascript_url;
30
+    @ApiModelProperty(value = "KICC ACTION WEB URL")
31
+    private String kicc_action_web_url;
32
+    @ApiModelProperty(value = "KICC ACTION MOBILE URL")
33
+    private String kicc_action_mobile_url;
30 34
 
31 35
 }