|
|
@@ -983,53 +983,53 @@ public class TsfOrderService {
|
|
|
|
|
|
// 네이버페이 송부용 xml 작성
|
|
|
StringBuffer sb = new StringBuffer();
|
|
|
- sb.append("<order>");
|
|
|
- sb.append("<merchantId>").append(shopId).append("</merchantId>"); //<!-- 상점ID -->
|
|
|
- sb.append("<certiKey>").append("<![CDATA[" + certificationKey + "]]>").append("</certiKey>"); //<!-- 인증키 -->
|
|
|
- sb.append("<backUrl>").append("<![CDATA[" + param.getBackUrl() + "]]>").append("</backUrl>"); //<!-- 이전페이지 -->
|
|
|
- sb.append("<interface>");
|
|
|
- sb.append("<merchantCustomCode1>").append(param.getOrdNo()).append("</merchantCustomCode1>");
|
|
|
- sb.append("<cpaInflowCode>").append(cpaInflowCode).append("</cpaInflowCode>");
|
|
|
- sb.append("<naverInflowCode>").append(naverInflowCode).append("</naverInflowCode>");
|
|
|
- sb.append("<saClickId>").append(saClickId).append("</saClickId>");
|
|
|
- sb.append("</interface>");
|
|
|
+ sb.append("<order>\n");
|
|
|
+ sb.append("\t<merchantId>").append(shopId).append("</merchantId>\n"); //<!-- 상점ID -->
|
|
|
+ sb.append("\t<certiKey>").append(certificationKey).append("</certiKey>\n"); //<!-- 인증키 -->
|
|
|
+ sb.append("\t<backUrl>").append(param.getBackUrl()).append("</backUrl>\n"); //<!-- 이전페이지 -->
|
|
|
+ sb.append("\t<merchantCustomCode1>").append(param.getOrdNo()).append("</merchantCustomCode1>\n");
|
|
|
+ sb.append("\t<interface>\n");
|
|
|
+ sb.append("\t\t<cpaInflowCode>").append(cpaInflowCode).append("</cpaInflowCode>\n");
|
|
|
+ sb.append("\t\t<naverInflowCode>").append(naverInflowCode).append("</naverInflowCode>\n");
|
|
|
+ sb.append("\t\t<saClickId>").append(saClickId).append("</saClickId>\n");
|
|
|
+ sb.append("\t</interface>\n");
|
|
|
|
|
|
for(Order item : param.getOrderDetailList()) {
|
|
|
//<!-- 상품정보 -->
|
|
|
- sb.append("<product>");
|
|
|
- sb.append("<id>").append(item.getGoodsCd()).append("</id>"); //<!-- 상품코드 -->
|
|
|
- sb.append("<ecMallProductId>").append(item.getGoodsCd()).append("</ecMallProductId>"); //<!-- 상품코드 -->
|
|
|
- sb.append("<name>").append("<![CDATA[" + item.getGoodsNm() + "]]>").append("</name>"); //<!-- 상품명 -->
|
|
|
- sb.append("<basePrice>").append(item.getCurrPrice() + item.getOptAddPrice()).append("</basePrice>"); //<!-- 상품금액 -->
|
|
|
- sb.append("<infoUrl>").append("<![CDATA[http:" + param.getGoodsUrl() + item.getGoodsCd() + "]]>").append("</infoUrl>"); //<!-- 상품상세페이지 URL -->
|
|
|
- sb.append("<imageUrl>").append("<![CDATA[http:" + goodsImgUrl + "/" + item.getSysImgNm() + "]]>").append("</imageUrl>"); //<!-- 상품원본이미지 URL -->
|
|
|
+ sb.append("\t<product>\n");
|
|
|
+ sb.append("\t\t<id>").append(item.getGoodsCd()).append("</id>\n"); //<!-- 상품코드 -->
|
|
|
+ sb.append("\t\t<ecMallProductId>").append(item.getGoodsCd()).append("</ecMallProductId>\n"); //<!-- 상품코드 -->
|
|
|
+ sb.append("\t\t<name>").append(item.getGoodsNm()).append("</name>\n"); //<!-- 상품명 -->
|
|
|
+ sb.append("\t\t<basePrice>").append(item.getCurrPrice() + item.getOptAddPrice()).append("</basePrice>\n"); //<!-- 상품금액 -->
|
|
|
+ sb.append("\t\t<infoUrl>").append("http:" + param.getGoodsUrl() + item.getGoodsCd()).append("</infoUrl>\n"); //<!-- 상품상세페이지 URL -->
|
|
|
+ sb.append("\t\t<imageUrl>").append("http:" + goodsImgUrl + "/" + item.getSysImgNm()).append("</imageUrl>\n"); //<!-- 상품원본이미지 URL -->
|
|
|
|
|
|
// 옵션 정보
|
|
|
- sb.append("<option>");
|
|
|
- sb.append("<quantity>").append(item.getGoodsQty()).append("</quantity>"); //<!-- 옵션수량-->
|
|
|
- sb.append("<price>").append(item.getOptAddPrice()).append("</price>"); //<!-- 옵션금액 -->
|
|
|
- sb.append("<manageCode>").append("<![CDATA[" + item.getOptCd() + "]]>").append("</manageCode>"); //<!-- 옵션관리코드 -->
|
|
|
+ sb.append("\t\t<option>\n");
|
|
|
+ sb.append("\t\t\t<quantity>").append(item.getGoodsQty()).append("</quantity>\n"); //<!-- 옵션수량-->
|
|
|
+ sb.append("\t\t\t<price>").append(item.getOptAddPrice()).append("</price>\n"); //<!-- 옵션금액 -->
|
|
|
+ sb.append("\t\t\t<manageCode>").append(item.getOptCd()).append("</manageCode>\n"); //<!-- 옵션관리코드 -->
|
|
|
|
|
|
// 칼라코드
|
|
|
- sb.append("<selectedItem>");
|
|
|
- sb.append("<type>SELECT</type>");//<!-- 옵션유형 -->
|
|
|
- sb.append("<name>칼라</name>");//<!-- 옵션명 -->
|
|
|
- sb.append("<value>");
|
|
|
- sb.append("<id>").append("<![CDATA[" + item.getOptCd1() + "]]>").append("</id>");//<!-- 칼라코드 -->
|
|
|
- sb.append("<text>").append("<![CDATA[" + item.getColorNm() + "]]>").append("</text>");//<!-- 칼라명 -->
|
|
|
- sb.append("</value>");
|
|
|
- sb.append("</selectedItem>");
|
|
|
+ sb.append("\t\t\t<selectedItem>\n");
|
|
|
+ sb.append("\t\t\t\t<type>SELECT</type>\n");//<!-- 옵션유형 -->
|
|
|
+ sb.append("\t\t\t\t<name>색상</name>\n");//<!-- 옵션명 -->
|
|
|
+ sb.append("\t\t\t\t<value>\n");
|
|
|
+ sb.append("\t\t\t\t\t<id>").append(item.getOptCd1()).append("</id>\n");//<!-- 칼라코드 -->
|
|
|
+ sb.append("\t\t\t\t\t<text>").append(item.getColorNm()).append("</text>\n");//<!-- 칼라명 -->
|
|
|
+ sb.append("\t\t\t\t</value>\n");
|
|
|
+ sb.append("\t\t\t</selectedItem>\n");
|
|
|
|
|
|
// 사이즈코드
|
|
|
- sb.append("<selectedItem>");
|
|
|
- sb.append("<type>SELECT</type>");//<!-- 옵션유형 -->
|
|
|
- sb.append("<name>사이즈</name>");//<!-- 옵션명 -->
|
|
|
- sb.append("<value>");
|
|
|
- sb.append("<id>").append("<![CDATA[" + item.getOptCd2() + "]]>").append("</id>");//<!-- 사이즈코드 -->
|
|
|
- sb.append("<text>").append("<![CDATA[" + item.getOptCd2() + "]]>").append("</text>");//<!-- 사이즈명 -->
|
|
|
- sb.append("</value>");
|
|
|
- sb.append("</selectedItem>");
|
|
|
- sb.append("</option>");
|
|
|
+ sb.append("\t\t\t<selectedItem>\n");
|
|
|
+ sb.append("\t\t\t\t<type>SELECT</type>\n");//<!-- 옵션유형 -->
|
|
|
+ sb.append("\t\t\t\t<name>사이즈</name>\n");//<!-- 옵션명 -->
|
|
|
+ sb.append("\t\t\t\t<value>\n");
|
|
|
+ sb.append("\t\t\t\t\t<id>").append(item.getOptCd2()).append("</id>\n");//<!-- 사이즈코드 -->
|
|
|
+ sb.append("\t\t\t\t\t<text>").append(item.getOptCd2()).append("</text>\n");//<!-- 사이즈명 -->
|
|
|
+ sb.append("\t\t\t\t</value>\n");
|
|
|
+ sb.append("\t\t\t</selectedItem>\n");
|
|
|
+ sb.append("\t\t</option>\n");
|
|
|
|
|
|
// 배송비 판단 후 배송비유형 선택 (추가 기본배송비, 무료배송비 기준 조회후 등록)
|
|
|
//<!-- 배송정보 -->
|
|
|
@@ -1045,22 +1045,22 @@ public class TsfOrderService {
|
|
|
delvFee = 0;
|
|
|
}
|
|
|
|
|
|
- sb.append("<shippingPolicy>");
|
|
|
- sb.append("<groupId>").append(item.getDelvFeeCd()).append("</groupId>"); //<!-- 배송비묶음그룹ID -->
|
|
|
- sb.append("<method>DELIVERY</method>"); //<!-- 배송방법 : 택배,소포,등기 -->
|
|
|
- sb.append("<feeType>").append("CONDITIONAL_FREE").append("</feeType>"); //<!-- 배송비유형 : 유료 -->
|
|
|
- sb.append("<feePayType>").append("PREPAYED").append("</feePayType>"); //<!-- 배송비결제방법 : 선불 -->
|
|
|
- sb.append("<feePrice>").append(item.getDelvFee()).append("</feePrice>"); //<!-- 기본배송비 -->
|
|
|
+ sb.append("\t\t<shippingPolicy>\n");
|
|
|
+ sb.append("\t\t\t<groupId>").append(item.getDelvFeeCd()).append("</groupId>\n"); //<!-- 배송비묶음그룹ID -->
|
|
|
+ sb.append("\t\t\t<method>DELIVERY</method>\n"); //<!-- 배송방법 : 택배,소포,등기 -->
|
|
|
+ sb.append("\t\t\t<feeType>").append("CONDITIONAL_FREE").append("</feeType>\n"); //<!-- 배송비유형 : 유료 -->
|
|
|
+ sb.append("\t\t\t<feePayType>").append("PREPAYED").append("</feePayType>\n"); //<!-- 배송비결제방법 : 선불 -->
|
|
|
+ sb.append("\t\t\t<feePrice>").append(item.getDelvFee()).append("</feePrice>\n"); //<!-- 기본배송비 -->
|
|
|
|
|
|
// 조건부 무료일경우에만 송부
|
|
|
if(TscConstants.DelvFeeCrite.NORMAL.value().equals(item.getDelvFeeCrite())) {
|
|
|
- sb.append("<conditionalFree>");
|
|
|
- sb.append("<basePrice>").append(item.getMinOrdAmt()).append("</basePrice>"); //<!-- 무료배송비기준 -->
|
|
|
- sb.append("</conditionalFree>");
|
|
|
+ sb.append("\t\t\t<conditionalFree>\n");
|
|
|
+ sb.append("\t\t\t\t<basePrice>").append(item.getMinOrdAmt()).append("</basePrice>\n"); //<!-- 무료배송비기준 -->
|
|
|
+ sb.append("\t\t\t</conditionalFree>\n");
|
|
|
}
|
|
|
|
|
|
- sb.append("</shippingPolicy>");
|
|
|
- sb.append("</product>");
|
|
|
+ sb.append("\t\t</shippingPolicy>\n");
|
|
|
+ sb.append("\t</product>\n");
|
|
|
|
|
|
totPrice = totPrice + ((item.getCurrPrice() + item.getOptAddPrice()) * item.getGoodsQty());
|
|
|
}
|