|
|
@@ -354,8 +354,19 @@ public class TscOrderChangeService {
|
|
|
// 3-4. PG 결제 취소 처리 (상품권으로만 결제 시 PG점프)
|
|
|
int spanRealCnclRtnAmt = obj.getRealOrdAmt(); // 취소금액합계
|
|
|
int sumDeliveryFee = obj.getDelvFee(); // 배송비합계
|
|
|
+ int spanTotDeliveryFee = obj.getAddDelvFee(); // 추가배송비합계
|
|
|
int spanRefundAmt = spanRealCnclRtnAmt + sumDeliveryFee;
|
|
|
|
|
|
+ // 고객사유일때 추가배송비 차감 후 환불처리
|
|
|
+ if ("G686_10".equals(chgReason)) {
|
|
|
+ spanRefundAmt -= spanTotDeliveryFee;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 환불금액이 추가배송비 보다 적을 시
|
|
|
+ if (spanRefundAmt < 0) {
|
|
|
+ throw new IllegalStateException(message.getMessage("CANCEL_0002"));
|
|
|
+ }
|
|
|
+
|
|
|
Payment pg = new Payment();
|
|
|
pg.setOrdNo(ordNo);
|
|
|
pg.setPayStat(TscConstants.PaymentStat.PAYMENT_CANCEL.value());
|
|
|
@@ -367,7 +378,7 @@ public class TscOrderChangeService {
|
|
|
pg.setRegNo(custNo);
|
|
|
pg.setUpdNo(custNo);
|
|
|
|
|
|
- if (!TscConstants.PgGb.ISTYLE.value().equals(pgGb)) {
|
|
|
+ if (!TscConstants.PgGb.ISTYLE.value().equals(pgGb) && spanRefundAmt > 0) {
|
|
|
if (TscConstants.PgGb.KCP.value().equals(pgGb) || TscConstants.PgGb.PAYCO.value().equals(pgGb)) {
|
|
|
pg.setModType(modType);
|
|
|
pg.setModDesc("가맹점 취소 - 부분 취소");
|