|
@@ -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);
|