|
|
@@ -145,16 +145,29 @@ public class TscNaverPayService {
|
|
|
String redirectUrl = protocol + env.getProperty("domain.front") + env.getProperty("naverPay.paymentRedirectUrl");
|
|
|
|
|
|
// API 파라메터 설정
|
|
|
- NaverPay naverPay = new NaverPay();
|
|
|
- naverPay.setModelVersion("2");
|
|
|
- naverPay.setMerchantUserKey(order.getCustNo());
|
|
|
- naverPay.setMerchantPayKey(order.getOrdNo());
|
|
|
- naverPay.setProductName(order.getGoodsNm());
|
|
|
- naverPay.setProductCount(order.getOrdGoodsQty());
|
|
|
- naverPay.setTotalPayAmount(order.getPayAmt());
|
|
|
- naverPay.setTaxScopeAmount(order.getPayAmt());
|
|
|
- naverPay.setTaxExScopeAmount(0);
|
|
|
- naverPay.setReturnUrl(redirectUrl);
|
|
|
+ // NaverPay naverPay = new NaverPay();
|
|
|
+ // naverPay.setModelVersion("2");
|
|
|
+ // naverPay.setMerchantUserKey(order.getCustNo());
|
|
|
+ // naverPay.setMerchantPayKey(String.valueOf(order.getOrdNo()));
|
|
|
+ // naverPay.setProductName(order.getGoodsNm());
|
|
|
+ // naverPay.setProductCount(order.getOrdGoodsQty());
|
|
|
+ // naverPay.setTotalPayAmount(order.getPayAmt());
|
|
|
+ // naverPay.setTaxScopeAmount(order.getPayAmt());
|
|
|
+ // naverPay.setTaxExScopeAmount(0);
|
|
|
+ // naverPay.setReturnUrl(redirectUrl);
|
|
|
+
|
|
|
+ GagaMap naverPay = new GagaMap();
|
|
|
+ naverPay.set("modelVersion", "2");
|
|
|
+ if (order.getCustNo() > 0) {
|
|
|
+ naverPay.set("merchantUserKey", String.valueOf(order.getCustNo()));
|
|
|
+ }
|
|
|
+ naverPay.set("merchantPayKey", String.valueOf(order.getOrdNo()));
|
|
|
+ naverPay.set("productName", order.getGoodsNm());
|
|
|
+ naverPay.set("productCount", order.getOrdGoodsQty());
|
|
|
+ naverPay.set("totalPayAmount", order.getPayAmt());
|
|
|
+ naverPay.set("taxScopeAmount", order.getPayAmt());
|
|
|
+ naverPay.set("taxExScopeAmount", 0);
|
|
|
+ naverPay.set("returnUrl", redirectUrl);
|
|
|
|
|
|
// 네이버페이 API 전송
|
|
|
return naverPayApi.naverPaymentJsonApi(naverPay, paymentReadyUrl);
|
|
|
@@ -252,8 +265,8 @@ public class TscNaverPayService {
|
|
|
String paymentOrderUrl = env.getProperty("naverPay.apiUrl") + env.getProperty("naverPay.partnerId") + env.getProperty("naverPay.paymentOrderUrl");
|
|
|
|
|
|
// API 파라메터 설정
|
|
|
- NaverPay naverPay = new NaverPay();
|
|
|
- naverPay.setPaymentId(payment.getPgTid());
|
|
|
+ // NaverPay naverPay = new NaverPay();
|
|
|
+ // naverPay.setPaymentId(payment.getPgTid());
|
|
|
|
|
|
// 기간별 주문 조회 (31일 이내)
|
|
|
// naverPay.setStartTime(order.getStartTime());
|
|
|
@@ -261,6 +274,16 @@ public class TscNaverPayService {
|
|
|
// naverPay.setApprovalType(order.getApprovalType());
|
|
|
// naverPay.setPageNumber(order.getPageNo());
|
|
|
// naverPay.setRowsPerPage(order.getPageSize());
|
|
|
+
|
|
|
+ GagaMap naverPay = new GagaMap();
|
|
|
+ naverPay.set("paymentId", payment.getPgTid());
|
|
|
+
|
|
|
+ // 기간별 주문 조회 (31일 이내)
|
|
|
+ // naverPay.set("startTime", payment.getStartTime());
|
|
|
+ // naverPay.set("endTime", payment.getEndTime);
|
|
|
+ // naverPay.set("approvalType", payment.getApprovalType());
|
|
|
+ // naverPay.set("pageNumber", payment.getPageNo());
|
|
|
+ // naverPay.set("rowsPerPage", payment.getPageSize());
|
|
|
|
|
|
// 네이버페이 API 전송
|
|
|
return naverPayApi.naverPaymentJsonApi(naverPay, paymentOrderUrl);
|