diff --git a/src/test/java/webpayplus/WebpayPlusDeferredTest.java b/src/test/java/webpayplus/WebpayPlusDeferredTest.java index 53ebe03..9fbaba3 100644 --- a/src/test/java/webpayplus/WebpayPlusDeferredTest.java +++ b/src/test/java/webpayplus/WebpayPlusDeferredTest.java @@ -117,9 +117,7 @@ public void commit() throws IOException, TransactionCommitException { String authorizationCode3 = "1213"; String paymentTypeCode3 = "VN"; byte responseCode3 = 0; - double installmentsAmount; - byte installmentsNumber = 0; - double balance; + byte installmentsNumber3 = 0; Map mapResponse = generateCommitJsonResponse(); Gson gson = new GsonBuilder().create(); @@ -138,7 +136,7 @@ public void commit() throws IOException, TransactionCommitException { assertEquals(paymentTypeCode3, response.getPaymentTypeCode()); assertEquals(responseCode3, response.getResponseCode()); - assertEquals(installmentsNumber, response.getInstallmentsNumber()); + assertEquals(installmentsNumber3, response.getInstallmentsNumber()); } @@ -147,7 +145,7 @@ public void refund() throws IOException, TransactionRefundException { String url = String.format("/%s/transactions/%s/refunds", apiUrl, testToken); - double amount = 1000d; + double amount3 = 1000d; String type = "REVERSED"; Map mapResponse = new HashMap(); @@ -157,7 +155,7 @@ public void refund() throws IOException, TransactionRefundException { String jsonResponse = gson.toJson(mapResponse); setResponsePost(url, jsonResponse); - final WebpayPlusTransactionRefundResponse response = (new WebpayPlus.Transaction(option)).refund(testToken, amount); + final WebpayPlusTransactionRefundResponse response = (new WebpayPlus.Transaction(option)).refund(testToken, amount3); assertEquals(response.getType(), type); } @@ -192,13 +190,13 @@ public void capture() throws IOException, TransactionCaptureException { String url = String.format("/%s/transactions/%s/capture", apiUrl, testToken); - String authorizationCode = "1213"; - String authorizationDate = "2021-08-01T03:17:42.785Z"; + String authorizationCode3 = "1213"; + String authorizationDate3 = "2021-08-01T03:17:42.785Z"; double capturedAmount = 1000.0; byte responseCode = 0; Map mapResponse = new HashMap(); - mapResponse.put("authorization_code", authorizationCode); - mapResponse.put("authorization_date", authorizationDate); + mapResponse.put("authorization_code", authorizationCode3); + mapResponse.put("authorization_date", authorizationDate3); mapResponse.put("captured_amount", capturedAmount); mapResponse.put("response_code", responseCode); @@ -211,8 +209,8 @@ public void capture() throws IOException, TransactionCaptureException { double amount = 1000; final WebpayPlusTransactionCaptureResponse response = (new WebpayPlus.Transaction(option)).capture(testToken, buyOrder, authorization, amount); - assertEquals(authorizationCode, response.getAuthorizationCode()); - assertEquals(authorizationDate, response.getAuthorizationDate()); + assertEquals(authorizationCode3, response.getAuthorizationCode()); + assertEquals(authorizationDate3, response.getAuthorizationDate()); assertEquals(capturedAmount, response.getCapturedAmount()); assertEquals(responseCode, response.getResponseCode()); } diff --git a/src/test/java/webpayplus/WebpayPlusMallTest.java b/src/test/java/webpayplus/WebpayPlusMallTest.java index 59c3f0d..d060964 100644 --- a/src/test/java/webpayplus/WebpayPlusMallTest.java +++ b/src/test/java/webpayplus/WebpayPlusMallTest.java @@ -87,8 +87,8 @@ public void create() throws IOException, TransactionCreateException { setResponsePost(url, jsonResponse); String returnUrl = "http://wwww.google.com"; - String buyOrder = String.valueOf(new Random().nextInt(Integer.MAX_VALUE)); - String sessionId = String.valueOf(new Random().nextInt(Integer.MAX_VALUE)); + String buyOrder3 = String.valueOf(new Random().nextInt(Integer.MAX_VALUE)); + String sessionId3 = String.valueOf(new Random().nextInt(Integer.MAX_VALUE)); String buyOrderMallOne = String.valueOf(new Random().nextInt(Integer.MAX_VALUE)); double amountMallOne = 1000; @@ -102,7 +102,7 @@ public void create() throws IOException, TransactionCreateException { .add(amountMallOne, mallOneCommerceCode, buyOrderMallOne) .add(amountMallTwo, mallTwoCommerceCode, buyOrderMallTwo); - final WebpayPlusMallTransactionCreateResponse response = (new WebpayPlus.MallTransaction(option)).create(buyOrder, sessionId, returnUrl, mallDetails); + final WebpayPlusMallTransactionCreateResponse response = (new WebpayPlus.MallTransaction(option)).create(buyOrder3, sessionId3, returnUrl, mallDetails); assertEquals(response.getToken(), testToken); assertEquals(response.getUrl(), urlResponse); } diff --git a/src/test/java/webpayplus/WebpayPlusTest.java b/src/test/java/webpayplus/WebpayPlusTest.java index dede515..d04f038 100644 --- a/src/test/java/webpayplus/WebpayPlusTest.java +++ b/src/test/java/webpayplus/WebpayPlusTest.java @@ -140,7 +140,7 @@ public void refund() throws IOException, TransactionRefundException { String url = String.format("/%s/transactions/%s/refunds", apiUrl, testToken); - double amount = 1000d; + double amount3 = 1000d; String type = "REVERSED"; Map mapResponse = new HashMap(); @@ -150,7 +150,7 @@ public void refund() throws IOException, TransactionRefundException { String jsonResponse = gson.toJson(mapResponse); setResponsePost(url, jsonResponse); - final WebpayPlusTransactionRefundResponse response = (new WebpayPlus.Transaction(option)).refund(testToken, amount); + final WebpayPlusTransactionRefundResponse response = (new WebpayPlus.Transaction(option)).refund(testToken, amount3); assertEquals(type, response.getType()); }