From 1c8fb52d87cd25278468624087e226e33b3c74f5 Mon Sep 17 00:00:00 2001 From: Dev Team Date: Wed, 18 Jun 2025 16:43:39 +0630 Subject: [PATCH] add payment gateway audit tab in sales transactions --- .../transactions/sales_controller.rb | 1 + app/views/transactions/sales/show.html.erb | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/app/controllers/transactions/sales_controller.rb b/app/controllers/transactions/sales_controller.rb index c77ba81e..6c0537fa 100755 --- a/app/controllers/transactions/sales_controller.rb +++ b/app/controllers/transactions/sales_controller.rb @@ -92,6 +92,7 @@ class Transactions::SalesController < ApplicationController @membership = MembershipSetting::MembershipSetting @payment_methods = PaymentMethodSetting.where("is_active='1'") @sale = Sale.find(params[:id]) + @payment_gateway_audits = PaymentGatewayAudit.where(receipt_no: @sale.receipt_no) @order_items = [] @sale.sale_orders.each do |sale_order| diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb index 43d88f81..45d267c8 100755 --- a/app/views/transactions/sales/show.html.erb +++ b/app/views/transactions/sales/show.html.erb @@ -26,6 +26,9 @@ + @@ -258,6 +261,44 @@ + +
+
+
+ + + + + + + + + + + + + <% if @payment_gateway_audits.present? %> + <% @payment_gateway_audits.each do |audit| %> + + + + + + + + + <% end %> + <% else %> + + + + <% end %> + +
Gateway NameRequest MethodEvent TypeEndpointRequest BodyResponse Body
<%= audit.payment_gateway_name %><%= audit.request_method %><%= audit.event_type %><%= audit.endpoint_url %> + <%= audit.request_body %> + <%= audit.response_body %>
No payment gateway audits found.
+
+