|
@@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
+import org.thymeleaf.util.StringUtils;
|
|
|
|
|
|
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
|
import com.style24.core.biz.service.TscKcpService;
|
|
import com.style24.core.biz.service.TscKcpService;
|
|
@@ -214,12 +215,35 @@ public class TsfOrderService {
|
|
|
return mapList;
|
|
return mapList;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void kcpTest(Payment param, HttpServletRequest request, HttpServletResponse response) {
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * PG 결제승인
|
|
|
|
|
+ * @param param - 필수 : payGb(결제수단 : KCP, KAKAO 등), payMeans(결제수단 : G014_30(신용카드) 등), cashReceiptYn(현금영수증여부)
|
|
|
|
|
+ * @param request
|
|
|
|
|
+ * @param response
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public Payment orderPgPayResult(Payment param, HttpServletRequest request, HttpServletResponse response) {
|
|
|
|
|
+ Payment result = new Payment();
|
|
|
try {
|
|
try {
|
|
|
- coreKcpService.kcpPayRequest(param, request, response);
|
|
|
|
|
|
|
+ if(StringUtils.isEmpty(param.getPayGb())) {
|
|
|
|
|
+ throw new IllegalArgumentException("결제수단을 선택해주세요.");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if("KCP".equals(param.getPayGb())) {
|
|
|
|
|
+ result = coreKcpService.kcpPayRequest(param, request, response);
|
|
|
|
|
+ } else if ("PAYCO".equals(param.getPayGb())) {
|
|
|
|
|
+ param = null;
|
|
|
|
|
+ } else if ("KAKAO".equals(param.getPayGb())) {
|
|
|
|
|
+ param = null;
|
|
|
|
|
+ } else if ("NAVER".equals(param.getPayGb())) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
} catch(Exception e) {
|
|
} catch(Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
|
|
+ throw new IllegalArgumentException(e.getMessage());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|