diff --git a/.gitpod.yml b/.gitpod.yml index 39e9891..ee44e8c 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -3,7 +3,7 @@ tasks: before: | sdk install java 17.0.4.1-tem < /dev/null command: | - ./mvnw spring-boot:run + ./mvnw clean spring-boot:run echo Backend running - name: frontend diff --git a/src/main/java/com/adyen/controller/WebhookController.java b/src/main/java/com/adyen/controller/WebhookController.java index b5d7093..b70029a 100644 --- a/src/main/java/com/adyen/controller/WebhookController.java +++ b/src/main/java/com/adyen/controller/WebhookController.java @@ -6,7 +6,7 @@ import com.adyen.model.configurationwebhooks.BalanceAccountNotificationRequest; import com.adyen.model.configurationwebhooks.PaymentNotificationRequest; import com.adyen.notification.BankingWebhookHandler; -import com.adyen.util.EventHandler; +import com.adyen.util.AfpEventHandler; import com.adyen.util.HMACValidator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,11 +56,11 @@ public ResponseEntity webhooks(@RequestHeader Map header // } // Deserialise json payload - EventHandler eventHandler = new EventHandler(); + AfpEventHandler afpEventHandler = new AfpEventHandler(); BankingWebhookHandler webhookHandler = new BankingWebhookHandler(json); - String type = eventHandler.getEventType(json); - String environment = eventHandler.getEventEnvironment(json); + String type = afpEventHandler.getEventType(json); + String environment = afpEventHandler.getEventEnvironment(json); log.info("Event " + type + " on " + environment); diff --git a/src/main/java/com/adyen/util/EventHandler.java b/src/main/java/com/adyen/util/AfpEventHandler.java similarity index 96% rename from src/main/java/com/adyen/util/EventHandler.java rename to src/main/java/com/adyen/util/AfpEventHandler.java index 968bb90..27672b4 100644 --- a/src/main/java/com/adyen/util/EventHandler.java +++ b/src/main/java/com/adyen/util/AfpEventHandler.java @@ -9,7 +9,7 @@ * Helper class to process AfP events */ @Service -public class EventHandler { +public class AfpEventHandler { public String getEventType(String json) throws JsonProcessingException { ObjectMapper objectMapper = new ObjectMapper();