diff --git a/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Info.java b/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Info.java index 6fe3715..9a1de1f 100644 --- a/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Info.java +++ b/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Info.java @@ -100,44 +100,22 @@ public List verifyBankAccountNumber(String countryCode, String bankCode, return jObj.getJSONArray("data").toList(); } - public List verifyBankAccountNumbers(String countryCode, String bankCode, String[] accountNumbers) - throws Exception { - JSONObject paramsJson = new JSONObject(); - JSONArray ja = new JSONArray(); - - for (String acctNum : accountNumbers) { - JSONObject jo = new JSONObject(); - - jo.put("countryCode", countryCode); - jo.put("account_bank", bankCode); - jo.put("account_number", acctNum); - - ja.put(jo); - } - paramsJson.put("verifyAccountNumbers", ja); - - HttpResponse response = handlePOSTRequest("info/verify-bank-account-number", paramsJson); - JSONObject jo = parseJSONData(response); - - return jo.getJSONArray("data").toList(); - } - - public List verifyBankAccountNumbers(String[] countryCode, String[] bankCode, String[] accountNumbers) - throws Exception { + public List verifyBankAccountNumbers(Map map) throws Exception { - if ((countryCode.length != bankCode.length) && (countryCode.length != accountNumbers.length)) { + if ((map.get("countryCode").length != map.get("bankCode").length) + && (map.get("countryCode").length != map.get("accountNumber").length)) { throw new IllegalArgumentException("arrays should be of the same size"); } JSONObject paramsJson = new JSONObject(); JSONArray ja = new JSONArray(); - for (int i = 0; i < countryCode.length; i++) { + for (int i = 0; i < map.get("countryCode").length; i++) { JSONObject jo = new JSONObject(); - jo.put("countryCode", countryCode[i]); - jo.put("account_bank", bankCode[i]); - jo.put("account_number", accountNumbers[i]); + jo.put("countryCode", map.get("countryCode")[i]); + jo.put("account_bank", map.get("bankCode")[i]); + jo.put("account_number", map.get("accountNumber")[i]); ja.put(jo); } diff --git a/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Payments.java b/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Payments.java index 9249e28..ca3082b 100644 --- a/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Payments.java +++ b/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Payments.java @@ -115,7 +115,7 @@ public Map verifyPayment(String id, String subAccount) throws Ex return jo.getJSONObject("data").toMap(); } - public Map simulatePayment(String issueID, Payments.Status status) throws Exception { + public Map simulatePayment(String issueID, Status status) throws Exception { JSONObject paramsJson = new JSONObject(); Map ret; @@ -134,7 +134,7 @@ public Map simulatePayment(String issueID, Payments.Status statu return ret; } - public Map simulatePayment(String issueID, Payments.Status status, String subAccount) + public Map simulatePayment(String issueID, Status status, String subAccount) throws Exception { JSONObject paramsJson = new JSONObject(); Map ret; diff --git a/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Wallet.java b/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Wallet.java index 5673054..38ea759 100644 --- a/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Wallet.java +++ b/SDK Submissions/Chimoney-Java/chimoney/src/main/java/io/chimoney/chimoney/Wallet.java @@ -4,7 +4,6 @@ import java.util.List; import java.util.Map; -import org.json.JSONArray; import org.json.JSONObject; /**