Skip to content

Commit

Permalink
Rename class
Browse files Browse the repository at this point in the history
  • Loading branch information
gcatanese committed Jan 18, 2024
1 parent 038b844 commit f8245f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/adyen/controller/WebhookController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,11 +56,11 @@ public ResponseEntity<String> webhooks(@RequestHeader Map<String, String> 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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f8245f0

Please sign in to comment.