From 5437930ee31e21a5a2a7bce8dff879c2961a18e0 Mon Sep 17 00:00:00 2001 From: Kshitij Date: Wed, 16 Oct 2024 22:15:17 +0530 Subject: [PATCH 1/2] Webhook logs. --- .../platform/rest/RazorPaymentCallbackController.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platform/src/main/java/com/flickmatch/platform/rest/RazorPaymentCallbackController.java b/platform/src/main/java/com/flickmatch/platform/rest/RazorPaymentCallbackController.java index b1558ba0..d9d323c6 100644 --- a/platform/src/main/java/com/flickmatch/platform/rest/RazorPaymentCallbackController.java +++ b/platform/src/main/java/com/flickmatch/platform/rest/RazorPaymentCallbackController.java @@ -156,4 +156,11 @@ public ResponseEntity processRazorCallback(@RequestParam("razorpay_order_id") } + + @PostMapping("/razorpay-webhook") + public ResponseEntity razorpayWebhook(@RequestBody(required = false) String payload) { + log.info("Razorpay Webhook received: {}", payload); + return ResponseEntity.ok().build(); + } + } From eead7652d1324d3fa357ba0419a6c2b3b7bb0cd4 Mon Sep 17 00:00:00 2001 From: Kshitij Date: Wed, 16 Oct 2024 22:26:36 +0530 Subject: [PATCH 2/2] Sanitized logs. --- .../platform/rest/RazorPaymentCallbackController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/src/main/java/com/flickmatch/platform/rest/RazorPaymentCallbackController.java b/platform/src/main/java/com/flickmatch/platform/rest/RazorPaymentCallbackController.java index d9d323c6..43a2a033 100644 --- a/platform/src/main/java/com/flickmatch/platform/rest/RazorPaymentCallbackController.java +++ b/platform/src/main/java/com/flickmatch/platform/rest/RazorPaymentCallbackController.java @@ -157,9 +157,11 @@ public ResponseEntity processRazorCallback(@RequestParam("razorpay_order_id") } + + @PostMapping("/razorpay-webhook") public ResponseEntity razorpayWebhook(@RequestBody(required = false) String payload) { - log.info("Razorpay Webhook received: {}", payload); + log.info("Razorpay Webhook received: {}", sanitizeForLog(payload)); return ResponseEntity.ok().build(); }