From 3cdb27029a28d053d54155c3c93f29d91fdbae69 Mon Sep 17 00:00:00 2001 From: Anton-Ivanov Date: Wed, 5 Feb 2025 21:30:50 +0200 Subject: [PATCH] #1690, fix logging remote IP for Cryptomus callbacks controller --- app/controllers/api/cryptomus_callbacks_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/api/cryptomus_callbacks_controller.rb b/app/controllers/api/cryptomus_callbacks_controller.rb index a677f76f3..5f1d793f3 100644 --- a/app/controllers/api/cryptomus_callbacks_controller.rb +++ b/app/controllers/api/cryptomus_callbacks_controller.rb @@ -2,9 +2,13 @@ class Api::CryptomusCallbacksController < ActionController::API include CaptureError::ControllerMethods + include WithPayloads + include Memoizable rescue_from StandardError, with: :server_error + define_memoizable :debug_mode, apply: -> { System::ApiLogConfig.exists?(controller: self.class.name) } + # https://doc.cryptomus.com/payments/webhook def create payload = params.except(:controller, :action, :sign, :cryptomus_callback).to_unsafe_h.to_h