Parcourir la source

네이버페이 찜하기 수정

card007 il y a 4 ans
Parent
commit
b8f5faa05b

+ 14 - 4
src/main/java/com/style24/front/biz/service/TsfOrderService.java

@@ -2238,17 +2238,27 @@ public class TsfOrderService {
 		conn.setRequestMethod("POST");
 		conn.addRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
 
+		// Protocol 처리
+		String hasSsl = env.getProperty("has-ssl");
+		String protocol;
+
+		if ("true".equals(hasSsl)) {
+			protocol = "https:";
+		} else {
+			protocol = "http:";
+		}
+
 		// 네이버페이 기본정보
-		String shopId			= env.getProperty("naverPay.shop.id");								// shopId
-		String certificationKey	= env.getProperty("naverPay.certification.key");					// 네이버페이 인증키
-		String goodsUrl 		= env.getProperty("domain.front");									// 상품 경로
+		String shopId			= env.getProperty("naverPay.shop.id");											// shopId
+		String certificationKey	= env.getProperty("naverPay.certification.key");								// 네이버페이 인증키
+		String goodsUrl 		= protocol + env.getProperty("domain.front");									// 상품 경로
 		goodsUrl			   += "/goods/detail/form?goodsCd=" + goods.getGoodsCd();
 		if ("Y".equals(goods.getSelfGoodsYn())) {
 			goodsUrl		   += "&colorCd=" + goods.getColorCd();
 		} else {
 			goodsUrl		   += "&colorCd=XX";
 		}
-		String goodsImgUrl		= env.getProperty("upload.goods.view") + "/" + goods.getSysImgNm();	// 상품 이미지 경로
+		String goodsImgUrl		= protocol + env.getProperty("upload.goods.view") + "/" + goods.getSysImgNm();	// 상품 이미지 경로
 
 		// 상품정보 설정
 		StringBuilder sb = new StringBuilder();