Extend the App Webhook Framework
Learn how to extend the App Webhook Framework.
Extend the webhook framework
global class DRB2B_RefundPendingWebhook extends digitalriverv2.DRB2B_WebhookHandler { global override void processWebhookEvent(RestResponse response, String webhookEventPayload, List<digitalriverv2.DCM_ApplicationLog> appLogList) { // Custom Implementation } }global class DRB2B_RefundPendingWebhook extends digitalriverv2.DRB2B_WebhookHandler { global override void processWebhookEvent(RestResponse response, String webhookEventPayload, List<digitalriverv2.DCM_ApplicationLog> appLogList) { String methodName = 'processWebhookEvent'; // Log the event to Application log object appLogList.add(new digitalriverv2.DCM_ApplicationLog(System.LoggingLevel.INFO, 'Digital River', 'Webhook Event', 'DRB2B_RefundPendingWebhook', methodName, null, 'Refund Pending Webhook Event Payload: ' + webhookEventPayload, 'Event: refund.pending', '', null, null, '', true)); // Send Email Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); email.setSubject('Process Webhook for event: refund.pending'); email.setToAddresses(new List<String> { '[email protected]' }); email.setHtmlBody(webhookEventPayload + '<br/> <br/>'); Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email }); response.statusCode = 200; } }
Last updated



