diff --git a/pom.xml b/pom.xml
index bf3941b5e..77eea959a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
4.0.0
manage
- 1.2.78
+ 1.2.79
UTF-8
1.6.1
diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java
index d1539284d..35a789bf4 100644
--- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java
@@ -2724,7 +2724,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} else {
BigDecimal rate_value = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat").getBigDecimal("rate_value");
if (customer_surcharge_rate.compareTo(PlatformEnvironment.getEnv().getMaxCustomerSurchargeRate()) > 0
- || customer_surcharge_rate.compareTo(rate_value) < 0) {
+ || customer_surcharge_rate.compareTo(rate_value) <= 0) {
throw new ForbiddenException("Invalid Range");
}
clientModifySupport.processClientConfigModify(new CustomerSurchargeRateModify(account, clientMoniker, customer_surcharge_rate));
@@ -4237,10 +4237,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
if (appClientBean.getCustomerSurchargeRate() != null) {
- if (appClientBean.getCustomerSurchargeRate() <= 0) {
- throw new ForbiddenException("customerSurchargeRate is 0");
- }
BigDecimal customerSurchargeRate = new BigDecimal(appClientBean.getCustomerSurchargeRate()).setScale(2, RoundingMode.HALF_DOWN);
+ BigDecimal rateValue = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat").getBigDecimal("rate_value");
+ if (customerSurchargeRate.compareTo(PlatformEnvironment.getEnv().getMaxCustomerSurchargeRate()) > 0
+ || customerSurchargeRate.compareTo(rateValue) <= 0) {
+ throw new ForbiddenException("Invalid Range");
+ }
setCustomerSurchargeRate(account, client.getString("client_moniker"), customerSurchargeRate);
}
clientInfoCacheSupport.clearClientCache(client_id);