@@ -193,9 +193,10 @@ String hmacKey = "HMACKEY_RETREIVED_FROM_WEBHOOK_HEADER";
193193HMACValidator hmacValidator = new HMACValidator ();
194194boolean authenticity = hmacValidator. validateHMAC(hmacKey, signKey, payload);
195195~~~~
196- If this bool returns true, one can proceed to deserialize against the desired webhook type:
196+ If this bool returns true, you can proceed to deserialize against the desired webhook type.
197+ Use the relevant webhook handler (i.e. ConfigurationWebhooksHandler) to obtain the object representing the event:
197198~~~~ java
198- BankingWebhookHandler webhookHandler = new BankingWebhookHandler (payload);
199+ ConfigurationWebhooksHandler webhookHandler = new ConfigurationWebhooksHandler (payload);
199200// onAccountHolderNotificationRequest
200201webhookHandler. getAccountHolderNotificationRequest(). ifPresent((AccountHolderNotificationRequest event) - > {
201202 System . out. println(event. getData(). getBalancePlatform());
@@ -206,9 +207,9 @@ webhookHandler.getBalanceAccountNotificationRequest().ifPresent((BalanceAccountN
206207});
207208
208209~~~~
209- To deserialize Management Webhooks instead, please use the specific webhook handler:
210+ To deserialize Management Webhooks instead, please use the specific webhook handler ` ManagementWebhooksHandler ` :
210211~~~~ java
211- ManagementWebhookHandler webhookHandler = new ManagementWebhookHandler (payload);
212+ ManagementWebhooksHandler webhookHandler = new ManagementWebhooksHandler (payload);
212213// onMerchantCreatedNotificationRequest
213214webhookHandler. getMerchantCreatedNotificationRequest(). isPresent((MerchantCreatedNotificationRequest event) - > {
214215System . out. println(event. getData(). getMerchantId());
0 commit comments