diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index bfbf06909..7f29c5718 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -241,7 +241,7 @@ public interface ClientManager { void setCustomerSurchargeRate(String clientMoniker, BigDecimal customer_surcharge_rate); - void setOrderExpiryConfig(String clientMoniker, String order_expiry_config); + void setOrderExpiryConfig(String clientMoniker, String orderExpiryConfig); void getAgreeFile(String clientMoniker, JSONObject manager) throws Exception; 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 6a20c951c..52c5b03a0 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 @@ -1673,18 +1673,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } @Override - public void setOrderExpiryConfig(String clientMoniker, String order_expiry_config) { + public void setOrderExpiryConfig(String clientMoniker, String orderExpiryConfig) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { throw new InvalidShortIdException(); } JSONObject update = new JSONObject(); update.put("client_id", client.getIntValue("client_id")); - if (order_expiry_config != null) { - OrderExpiryRuleResolver.resolveExpiryTime("order_expiry_config", new Date()); + if (orderExpiryConfig != null) { + OrderExpiryRuleResolver.resolveExpiryTime(orderExpiryConfig, new Date()); + update.put("order_expiry_config", orderExpiryConfig); + clientMapper.update(update); } - update.put("order_expiry_config", order_expiry_config == "" ? null : order_expiry_config); - clientMapper.update(update); } @Override