Cloudlayer logs for wechat: ==================================[Thu Oct 1 07:02:23.000000 2026] [Phoenix.Logger:info] [pid 3179268] [client 122.166.253.95:50469] POST /api/Iotmsgtest/createQrMf [Thu Oct 1 07:02:23.001000 2026] [Phoenix.Logger:debug] [pid 3179268] [client 122.166.253.95:50469] Processing with DaProductAppWeb.QRMoreFunController.initiate/2 Parameters: %{"device_id" => "61250415798001", "provider" => "12", "request_data" => "1.23"} Pipelines: [:api] [Thu Oct 1 07:02:23.002000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] QR More Fun Request - Parameters: %{"device_id" => "61250415798001", "provider" => "12", "request_data" => "1.23"} [Thu Oct 1 07:02:23.004000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK source="custom_events" db=2.0ms idle=1069.3ms SELECT c0.`id`, c0.`is_published`, c0.`date_added`, c0.`created_by`, c0.`created_by_user`, c0.`date_modified`, c0.`modified_by`, c0.`modified_by_user`, c0.`checked_out`, c0.`checked_out_by`, c0.`checked_out_by_user`, c0.`name`, c0.`alias`, c0.`payloads`, c0.`idgoal`, c0.`discription`, c0.`inserted_at`, c0.`updated_at` FROM `custom_events` AS c0 WHERE (c0.`alias` = ?) ["initiate_qr_txn_request"] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event/2, at: lib/da_product_app_web/services/event_logger.ex:163 [Thu Oct 1 07:02:23.004000 2026] [DaProductAppWeb.Services.EventLogger:info] [pid 3179268] [client 122.166.253.95:50469] Attempting to store custom event log: Event ID: 39 Event Name: "Initiate QR Txn Request" Event Value: "initiate_qr_txn_request" Reference ID: "REF_1790838143_862e234c" Payload: %{ username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil } [Thu Oct 1 07:02:23.004000 2026] [DaProductAppWeb.Services.EventLogger:info] [pid 3179268] [client 122.166.253.95:50469] Prepared attributes for custom event log: %{ payload: %{ username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil }, refrence_id: "REF_1790838143_862e234c", transaction_id: nil, event_name: "Initiate QR Txn Request", date_added: ~U[2026-10-01 07:02:23.004806Z], event_id: 39, event_value: "initiate_qr_txn_request" } [Thu Oct 1 07:02:23.005000 2026] [DaProductApp.Activity.CustomEventsLog:info] [pid 3179268] [client 122.166.253.95:50469] Creating custom event log with attributes: %{payload: %{username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil}, refrence_id: "REF_1790838143_862e234c", transaction_id: nil, event_name: "Initiate QR Txn Request", date_added: ~U[2026-10-01 07:02:23.004806Z], event_id: 39, event_value: "initiate_qr_txn_request"} [Thu Oct 1 07:02:23.148000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK db=139.8ms queue=3.2ms idle=1072.2ms INSERT INTO `custom_event_log` (`payload`,`refrence_id`,`event_name`,`date_added`,`event_id`,`event_value`,`inserted_at`,`updated_at`) VALUES (?,?,?,?,?,?,?,?) [%{username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil}, "REF_1790838143_862e234c", "Initiate QR Txn Request", ~U[2026-10-01 07:02:23Z], 39, "initiate_qr_txn_request", ~N[2026-10-01 07:02:23], ~N[2026-10-01 07:02:23]] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event_log/6, at: lib/da_product_app_web/services/event_logger.ex:213 [Thu Oct 1 07:02:23.149000 2026] [DaProductAppWeb.Services.EventLogger:info] [pid 3179268] [client 122.166.253.95:50469] Successfully created custom event log with ID: 46864 [Thu Oct 1 07:02:23.149000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] Validating provider: 15 for device_id: 61250415798001 [Thu Oct 1 07:02:23.151000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK source="providers" db=0.9ms idle=1217.0ms SELECT p0.`id`, p0.`name`, p0.`status`, p0.`production_url`, p0.`production_mode`, p0.`description`, p0.`provider_code`, p0.`inserted_at`, p0.`updated_at` FROM `providers` AS p0 WHERE (p0.`provider_code` = ?) ["15"] ↳ DaProductAppWeb.QRMoreFunController.validate_provider/2, at: lib/da_product_app_web/controllers/qr_more_fun_controller.ex:260 [Thu Oct 1 07:02:23.153000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK source="pos_terminals" db=1.7ms idle=1218.3ms SELECT p0.`id`, p0.`name`, p0.`serial_number`, p0.`device_type`, p0.`terminal_id`, p0.`provider_id`, p0.`status`, p0.`activated_by`, p0.`deactivated_by`, p0.`assigned_by`, p0.`longitude`, p0.`latitude`, p0.`assigned_date`, p0.`device_request_id`, p0.`threshold_fee`, p0.`terminalid`, p0.`terminalidmerchantid`, p0.`pos_merchant_id`, p0.`store_id`, p0.`inserted_at`, p0.`updated_at` FROM `pos_terminals` AS p0 WHERE (p0.`serial_number` = ?) ["61250415798001"] ↳ DaProductAppWeb.QRMoreFunController.validate_provider/2, at: lib/da_product_app_web/controllers/qr_more_fun_controller.ex:266 [Thu Oct 1 07:02:23.155000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK source="shukria_terminals" db=1.8ms idle=1220.4ms SELECT s0.`id`, s0.`shukria_terminal_id`, s0.`provider_id`, s0.`provider_tid`, s0.`provider_mid`, s0.`shukria_mid`, s0.`ysp_tid`, s0.`ysp_mid`, s0.`status`, s0.`description`, s0.`inserted_at`, s0.`updated_at` FROM `shukria_terminals` AS s0 WHERE ((s0.`shukria_terminal_id` = ?) AND (s0.`provider_id` = ?)) ["407", "7"] ↳ DaProductAppWeb.QRMoreFunController.validate_provider/2, at: lib/da_product_app_web/controllers/qr_more_fun_controller.ex:275 [Thu Oct 1 07:02:23.156000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK source="brands" db=0.6ms idle=1222.4ms SELECT b0.`id`, b0.`code`, b0.`name`, b0.`description`, b0.`default_acquirer`, b0.`group_id`, b0.`merchant_reference_id`, b0.`region`, b0.`merchant_tag`, b0.`inserted_at`, b0.`updated_at` FROM `brands` AS b0 WHERE (b0.`id` = ?) [266] ↳ DaProductAppWeb.QRMoreFunController.validate_provider/2, at: lib/da_product_app_web/controllers/qr_more_fun_controller.ex:288 [Thu Oct 1 07:02:23.158000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK source="merchant_enrollments" db=1.2ms idle=1223.5ms SELECT m0.`id`, m0.`status`, m0.`provider`, m0.`registration_params`, m0.`registration_response`, m0.`inquiry_history`, m0.`products`, m0.`group_id`, m0.`inserted_at`, m0.`updated_at` FROM `merchant_enrollments` AS m0 WHERE (m0.`group_id` = ?) [278] ↳ DaProductAppWeb.QRMoreFunController.validate_provider/2, at: lib/da_product_app_web/controllers/qr_more_fun_controller.ex:294 [Thu Oct 1 07:02:23.160000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK source="providers" db=0.4ms queue=1.0ms idle=386.3ms SELECT p0.`id`, p0.`name`, p0.`status`, p0.`production_url`, p0.`production_mode`, p0.`description`, p0.`provider_code`, p0.`inserted_at`, p0.`updated_at` FROM `providers` AS p0 WHERE (p0.`name` IN (?,?,?) AND (p0.`provider_code` = ?)) ["alipay", "upi", "WeChat Pay", "15"] ↳ DaProductAppWeb.QRMoreFunController.validate_provider/2, at: lib/da_product_app_web/controllers/qr_more_fun_controller.ex:303 [Thu Oct 1 07:02:23.160000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] provider_record_id :7, pos_terminal_id: 407, merchant_refrence_id: 123451234512345 [Thu Oct 1 07:02:23.229000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK db=67.7ms idle=348.0ms INSERT INTO `cloud_transaction` (`status`,`payload`,`email`,`device_id`,`provider_id`,`transaction_ref_number`,`transaction_amount`,`additional_data`,`user_id`,`inserted_at`,`updated_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?) ["pending", %{}, "ch_521d0509c433@mercurypay.in", "61250415798001", 7, "REF_1790838143_862e234c", Decimal.new("1.23"), %{}, "1", ~N[2026-10-01 07:02:23], ~N[2026-10-01 07:02:23]] ↳ DaProductAppWeb.QRMoreFunController.display_qr_code/7, at: lib/da_product_app_web/controllers/qr_more_fun_controller.ex:348 [Thu Oct 1 07:02:23.230000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK source="custom_events" db=1.3ms idle=373.0ms SELECT c0.`id`, c0.`is_published`, c0.`date_added`, c0.`created_by`, c0.`created_by_user`, c0.`date_modified`, c0.`modified_by`, c0.`modified_by_user`, c0.`checked_out`, c0.`checked_out_by`, c0.`checked_out_by_user`, c0.`name`, c0.`alias`, c0.`payloads`, c0.`idgoal`, c0.`discription`, c0.`inserted_at`, c0.`updated_at` FROM `custom_events` AS c0 WHERE (c0.`alias` = ?) ["sending_request_to_middle_layer"] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event/2, at: lib/da_product_app_web/services/event_logger.ex:163 [Thu Oct 1 07:02:23.231000 2026] [DaProductAppWeb.Services.EventLogger:info] [pid 3179268] [client 122.166.253.95:50469] Attempting to store custom event log: Event ID: 40 Event Name: "Sending Request To Middle Layer" Event Value: "sending_request_to_middle_layer" Reference ID: "REF_1790838143_862e234c" Payload: %{ username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil } [Thu Oct 1 07:02:23.231000 2026] [DaProductAppWeb.Services.EventLogger:info] [pid 3179268] [client 122.166.253.95:50469] Prepared attributes for custom event log: %{ payload: %{ username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil }, refrence_id: "REF_1790838143_862e234c", transaction_id: nil, event_name: "Sending Request To Middle Layer", date_added: ~U[2026-10-01 07:02:23.231483Z], event_id: 40, event_value: "sending_request_to_middle_layer" } [Thu Oct 1 07:02:23.231000 2026] [DaProductApp.Activity.CustomEventsLog:info] [pid 3179268] [client 122.166.253.95:50469] Creating custom event log with attributes: %{payload: %{username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil}, refrence_id: "REF_1790838143_862e234c", transaction_id: nil, event_name: "Sending Request To Middle Layer", date_added: ~U[2026-10-01 07:02:23.231483Z], event_id: 40, event_value: "sending_request_to_middle_layer"} [Thu Oct 1 07:02:23.305000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 122.166.253.95:50469] QUERY OK db=73.0ms queue=0.1ms idle=227.9ms INSERT INTO `custom_event_log` (`payload`,`refrence_id`,`event_name`,`date_added`,`event_id`,`event_value`,`inserted_at`,`updated_at`) VALUES (?,?,?,?,?,?,?,?) [%{username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil}, "REF_1790838143_862e234c", "Sending Request To Middle Layer", ~U[2026-10-01 07:02:23Z], 40, "sending_request_to_middle_layer", ~N[2026-10-01 07:02:23], ~N[2026-10-01 07:02:23]] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event_log/6, at: lib/da_product_app_web/services/event_logger.ex:213 [Thu Oct 1 07:02:23.306000 2026] [DaProductAppWeb.Services.EventLogger:info] [pid 3179268] [client 122.166.253.95:50469] Successfully created custom event log with ID: 46865 [Thu Oct 1 07:02:23.306000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] QR Request - Starting process for device: 61250415798001 [Thu Oct 1 07:02:23.307000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] QR Request - Parameters: %{"additionalData" => %{"customerMobileNumber" => nil}, "amount" => 1.23, "deviceId" => "61250415798001", "merchantId" => nil, "merchantName" => nil, "provider" => 7, "smid" => "123451234512345", "stid" => 407, "transaction_refid" => "REF_1790838143_862e234c"} [Thu Oct 1 07:02:24.750000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] Raw QR Middleware Response: {:ok, %{ "amount" => 1.23, "brand_code" => "123451234512345", "brand_name" => "Frog8 Cafe", "deviceSerial" => "61250415798001", "mRefId" => "sh_F147D07F9BCCC", "merchant_id" => "123451234512345", "merchant_name" => "Frog8 Cafe", "merchant_phone_number" => "8979796960", "paymentId" => "sh_F147D07F9BCCC", "qrCodeId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", "qrId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", "status" => "QR_GENERATED", "store_code" => "81748", "store_name" => "Frog8 Cafe", "transaction_id" => 14755, "transaction_refid" => "REF_1790838143_862e234c" }} [Thu Oct 1 07:02:24.750000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] Information QR Response: %{"amount" => 1.23, "brand_code" => "123451234512345", "brand_name" => "Frog8 Cafe", "deviceSerial" => "61250415798001", "mRefId" => "sh_F147D07F9BCCC", "merchant_id" => "123451234512345", "merchant_name" => "Frog8 Cafe", "merchant_phone_number" => "8979796960", "paymentId" => "sh_F147D07F9BCCC", "qrCodeId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", "qrId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", "status" => "QR_GENERATED", "store_code" => "81748", "store_name" => "Frog8 Cafe", "transaction_id" => 14755, "transaction_refid" => "REF_1790838143_862e234c"} [Thu Oct 1 07:02:24.750000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] QR Success Response: - Device ID: 61250415798001 - QR Code: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC" - Full Response: %{ "amount" => 1.23, "brand_code" => "123451234512345", "brand_name" => "Frog8 Cafe", "deviceSerial" => "61250415798001", "mRefId" => "sh_F147D07F9BCCC", "merchant_id" => "123451234512345", "merchant_name" => "Frog8 Cafe", "merchant_phone_number" => "8979796960", "paymentId" => "sh_F147D07F9BCCC", "qrCodeId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", "qrId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", "status" => "QR_GENERATED", "store_code" => "81748", "store_name" => "Frog8 Cafe", "transaction_id" => 14755, "transaction_refid" => "REF_1790838143_862e234c" } [Thu Oct 1 07:02:24.751000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] Device Status - 61250415798001 is online [Thu Oct 1 07:02:24.751000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] Merchant ID: sh_F147D07F9BCCC [Thu Oct 1 07:02:24.751000 2026] [DaProductAppWeb.QRMoreFunController:info] [pid 3179268] [client 122.166.253.95:50469] create_qr_mf QR code then get qr code url: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC" [Thu Oct 1 07:02:24.751000 2026] [Phoenix.Logger:info] [pid 3179268] [client 122.166.253.95:50469] Sent 200 in 1751ms [Thu Oct 1 07:02:24.753000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client -] QUERY OK source="custom_events" db=1.5ms queue=0.2ms idle=1600.7ms SELECT c0.`id`, c0.`is_published`, c0.`date_added`, c0.`created_by`, c0.`created_by_user`, c0.`date_modified`, c0.`modified_by`, c0.`modified_by_user`, c0.`checked_out`, c0.`checked_out_by`, c0.`checked_out_by_user`, c0.`name`, c0.`alias`, c0.`payloads`, c0.`idgoal`, c0.`discription`, c0.`inserted_at`, c0.`updated_at` FROM `custom_events` AS c0 WHERE (c0.`alias` = ?) ["response_received_from_middle_layer"] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event/2, at: lib/da_product_app_web/services/event_logger.ex:163 [Thu Oct 1 07:02:24.753000 2026] [DaProductAppWeb.Services.EventLogger:info] [pid 3179268] [client -] Attempting to store custom event log: Event ID: 41 Event Name: "Response Received from Middle layer" Event Value: "response_received_from_middle_layer" Reference ID: "REF_1790838143_862e234c" Payload: %{ username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil, merchant_ref_number: "sh_F147D07F9BCCC" } [Thu Oct 1 07:02:24.754000 2026] [DaProductAppWeb.Services.EventLogger:info] [pid 3179268] [client -] Prepared attributes for custom event log: %{ payload: %{ username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil, merchant_ref_number: "sh_F147D07F9BCCC" }, refrence_id: "REF_1790838143_862e234c", transaction_id: 14755, event_name: "Response Received from Middle layer", date_added: ~U[2026-10-01 07:02:24.753953Z], event_id: 41, event_value: "response_received_from_middle_layer" } [Thu Oct 1 07:02:24.754000 2026] [DaProductApp.Activity.CustomEventsLog:info] [pid 3179268] [client -] Creating custom event log with attributes: %{payload: %{username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil, merchant_ref_number: "sh_F147D07F9BCCC"}, refrence_id: "REF_1790838143_862e234c", transaction_id: 14755, event_name: "Response Received from Middle layer", date_added: ~U[2026-10-01 07:02:24.753953Z], event_id: 41, event_value: "response_received_from_middle_layer"} [Thu Oct 1 07:02:24.807000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client -] QUERY OK db=51.9ms queue=0.5ms idle=1602.0ms INSERT INTO `custom_event_log` (`payload`,`refrence_id`,`transaction_id`,`event_name`,`date_added`,`event_id`,`event_value`,`inserted_at`,`updated_at`) VALUES (?,?,?,?,?,?,?,?,?) [%{username: nil, amount: 1.23, app_key: nil, account_label: nil, customer_mobile_number: nil, external_ref_number: nil, external_ref_number_2: nil, external_ref_number_4: nil, external_ref_numbers: nil, push_to: nil, merchant_ref_number: "sh_F147D07F9BCCC"}, "REF_1790838143_862e234c", 14755, "Response Received from Middle layer", ~U[2026-10-01 07:02:24Z], 41, "response_received_from_middle_layer", ~N[2026-10-01 07:02:24], ~N[2026-10-01 07:02:24]] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event_log/6, at: lib/da_product_app_web/services/event_logger.ex:213 [Thu Oct 1 07:02:24.808000 2026] [DaProductAppWeb.Services.EventLogger:info] [pid 3179268] [client -] Successfully created custom event log with ID: 46868 [Thu Oct 1 07:02:24.808000 2026] [DaProductApp.Activity.CustomEventsLog:info] [pid 3179268] [client -] Updating transaction_id for refrence_id: REF_1790838143_862e234c [Thu Oct 1 07:02:24.994000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client -] QUERY OK source="custom_event_log" db=185.5ms idle=1653.2ms UPDATE `custom_event_log` AS c0 SET c0.`transaction_id` = ? WHERE (c0.`refrence_id` = ?) [14755, "REF_1790838143_862e234c"] ↳ DaProductApp.Activity.CustomEventsLog.update_transaction_id/2, at: lib/da_product_app/activity/custom_events_log.ex:70 [Thu Oct 1 07:02:24.994000 2026] [DaProductApp.Activity.CustomEventsLog:info] [pid 3179268] [client -] Successfully updated 5 records with transaction_id: 14755 Payment [Thu Oct 1 07:03:06.518000 2026] [Phoenix.Logger:info] [pid 3179268] [client 127.0.0.1:38170] POST /api/payment/notify-success [Thu Oct 1 07:03:06.519000 2026] [Phoenix.Logger:debug] [pid 3179268] [client 127.0.0.1:38170] Processing with DaProductAppWeb.PaymentNotificationController.process_payment_success/2 Parameters: %{"m_ref_num" => "sh_F147D07F9BCCC", "payment_amount" => %{"currency" => "AED", "value" => "123"}, "payment_id" => "sh_F147D07F9BCCC", "provider" => "wechat", "status" => "success", "trade_state" => "SUCCESS"} Pipelines: [:api] [Thu Oct 1 07:03:06.527000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client 127.0.0.1:38170] QUERY OK source="transactions" db=7.5ms queue=0.9ms idle=1578.0ms SELECT t0.`id`, t0.`device_id`, t0.`transaction_ref_number`, t0.`provider_name` FROM `transactions` AS t0 WHERE ((t0.`payment_reference_id` = ?) OR (t0.`transaction_ref_number` = ?)) ["sh_F147D07F9BCCC", "sh_F147D07F9BCCC"] ↳ DaProductAppWeb.PaymentNotificationController.process_payment_success/2, at: lib/da_product_app_web/controllers/payment_notification_controller.ex:15 [Thu Oct 1 07:03:06.528000 2026] [DaProductAppWeb.PaymentNotificationController:info] [pid 3179268] [client 127.0.0.1:38170] [Payment Notification] Using request_id: UN_REF_1790838143_862e234c for transaction_id: 14755 [Thu Oct 1 07:03:06.528000 2026] [DaProductAppWeb.PaymentNotificationController:info] [pid 3179268] [client 127.0.0.1:38170] [Payment Notification] Amount conversion - Original value: 123, Currency: AED, Provider: WeChat Pay, Converted money: 1.23 [Thu Oct 1 07:03:06.528000 2026] [DaProductAppWeb.PaymentNotificationController:info] [pid 3179268] [client 127.0.0.1:38170] [Payment Notification] Publishing to topic: /ota/pFppbioOCKlo5c8E/61250415798001/update with payload: {"request_id":"UN_REF_1790838143_862e234c","datetime":"20261001070306","money":"1.23","ctime":1790838186,"biz_type":1,"broadcast_type":1} [Thu Oct 1 07:03:06.528000 2026] [DaProductAppWeb.PaymentNotificationController:info] [pid 3179268] [client 127.0.0.1:38170] [Payment Notification] About to publish - Transaction ID: 14755, Device ID: 61250415798001, Request ID: UN_REF_1790838143_862e234c, Provider: WeChat Pay [Thu Oct 1 07:03:06.528000 2026] [DaProductAppWeb.PaymentNotificationController:info] [pid 3179268] [client 127.0.0.1:38170] [Payment Notification] Publish result: {:ok, #Reference<0.1440343740.860094465.64113>} [Thu Oct 1 07:03:06.528000 2026] [Phoenix.Logger:info] [pid 3179268] [client 127.0.0.1:38170] Sent 200 in 10ms [Thu Oct 1 07:03:07.179000 2026] [DaProductApp.MQTT.Handler:info] [pid 3179268] [client -] Received ACK for merchant pFppbioOCKlo5c8E, device 61250415798001 with payload: {"request_id":"UN_REF_1790838143_862e234c","money":"1.23"} [Thu Oct 1 07:03:07.179000 2026] [DaProductApp.MQTT.Handler:info] [pid 3179268] [client -] Received OTA update for device 61250415798001 with request_id UN_REF_1790838143_862e234c: %{"money" => "1.23", "request_id" => "UN_REF_1790838143_862e234c"} [Thu Oct 1 07:03:07.179000 2026] [DaProductApp.MQTT.Handler:info] [pid 3179268] [client -] Status for request_id UN_REF_1790838143_862e234c is success [Thu Oct 1 07:03:07.182000 2026] [Ecto.Adapters.SQL:debug] [pid 3179268] [client -] QUERY OK source="cloud_transaction" db=2.7ms idle=1240.2ms SELECT c0.`id`, c0.`uhid`, c0.`email`, c0.`mobile_no`, c0.`processing_id`, c0.`uname`, c0.`user_id`, c0.`pay_mode`, c0.`location_id`, c0.`transaction_location`, c0.`credentials_user`, c0.`credentials_key`, c0.`version`, c0.`return_url`, c0.`response_url`, c0.`status`, c0.`transaction_id`, c0.`transaction_amount`, c0.`transaction_ref_number`, c0.`m_ref_num`, c0.`name`, c0.`provider_id`, c0.`device_id`, c0.`merchant_id`, c0.`payment_reference_id`, c0.`additional_data`, c0.`payload`, c0.`settlement_date_time`, c0.`refund_reference_id`, c0.`provider_name`, c0.`acknoledgment`, c0.`inserted_at`, c0.`updated_at` FROM `cloud_transaction` AS c0 WHERE ((c0.`transaction_ref_number` = ?) AND (c0.`device_id` = ?)) ["UN_REF_1790838143_862e234c", "61250415798001"] ↳ DaProductApp.MQTT.Handler.handle_message/3, at: lib/da_product_app/mqtt/handler.ex:52 warning: the log level :warn is deprecated, use :warning instead (logger 1.17.3) lib/logger.ex:1178: Logger.elixir_level_to_erlang_level/1 (logger 1.17.3) lib/logger.ex:635: Logger.compare_levels/2 (da_product_app 0.1.0) lib/da_product_app/file_logger.ex:132: DaProductApp.FileLogger.meets_level?/2 (da_product_app 0.1.0) lib/da_product_app/file_logger.ex:14: DaProductApp.FileLogger.handle_event/2 (stdlib 5.2.3.2) gen_event.erl:814: :gen_event.server_update/4 (stdlib 5.2.3.2) gen_event.erl:796: :gen_event.server_notify/4 (stdlib 5.2.3.2) gen_event.erl:538: :gen_event.handle_msg/6 (stdlib 5.2.3.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3 [Thu Oct 1 07:03:07.183000 2026] [DaProductApp.MQTT.Handler:warning] [pid 3179268] [client -] No transaction found with transaction_ref_number=UN_REF_1790838143_862e234c Pr-10 folder (Qr middle layer) logs for wechat: =======================================[info] POST /api/processTransaction [debug] Processing with DaProductAppWeb.QRMiddleLayerController.processTransaction/2 Parameters: %{"additionalData" => %{"customerMobileNumber" => nil}, "amount" => 1.23, "deviceId" => "61250415798001", "merchantId" => nil, "merchantName" => nil, "provider" => 7, "smid" => "123451234512345", "stid" => 407, "transaction_refid" => "REF_1790838143_862e234c"} Pipelines: [:api] [info] Received request in QRMiddleLayerController: %{"additionalData" => %{"customerMobileNumber" => nil}, "amount" => 1.23, "deviceId" => "61250415798001", "merchantId" => nil, "merchantName" => nil, "provider" => 7, "smid" => "123451234512345", "stid" => 407, "transaction_refid" => "REF_1790838143_862e234c"} [debug] processTransaction called with params: %{"additionalData" => %{"customerMobileNumber" => nil}, "amount" => 1.23, "deviceId" => "61250415798001", "merchantId" => nil, "merchantName" => nil, "provider" => 7, "smid" => "123451234512345", "stid" => 407, "transaction_refid" => "REF_1790838143_862e234c"} [debug] Processing validated transaction with params: %{"additionalData" => %{"customerMobileNumber" => nil}, "amount" => 1.23, "deviceId" => "61250415798001", "merchantId" => nil, "merchantName" => nil, "provider" => 7, "smid" => "123451234512345", "stid" => 407, "transaction_refid" => "REF_1790838143_862e234c"} [debug] QUERY OK source="providers" db=1.3ms idle=978.0ms SELECT p0.`id`, p0.`name`, p0.`status`, p0.`description`, p0.`production_url`, p0.`production_mode`, p0.`provider_code`, p0.`inserted_at`, p0.`updated_at` FROM `providers` AS p0 WHERE (p0.`id` = ?) [7] ↳ DaProductAppWeb.QRMiddleLayerController.process_validated_transaction/2, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:70 [debug] Provider found: WeChat Pay with id: 7 [debug] QUERY OK source="shukria_terminals" db=1.0ms idle=979.7ms SELECT s0.`id`, s0.`shukria_terminal_id`, s0.`provider_id`, s0.`provider_tid`, s0.`provider_mid`, s0.`shukria_mid`, s0.`status`, s0.`description`, s0.`inserted_at`, s0.`updated_at` FROM `shukria_terminals` AS s0 WHERE ((s0.`shukria_terminal_id` = ?) AND (s0.`provider_id` = ?)) ["407", "7"] ↳ DaProductAppWeb.QRMiddleLayerController.process_validated_transaction/2, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:84 [debug] Shukria terminal found: %DaProductApp.ShukriaTerminal{__meta__: #Ecto.Schema.Metadata<:loaded, "shukria_terminals">, id: 1034, shukria_terminal_id: "407", provider_id: "7", provider_tid: "762843490320736", provider_mid: "79678117", shukria_mid: "266", status: "active", description: "Neo terminal", inserted_at: ~N[2026-10-01 05:53:47], updated_at: ~N[2026-10-01 05:53:47]} [debug] QUERY OK source="brands" db=0.9ms idle=981.1ms SELECT b0.`id`, b0.`code`, b0.`name`, b0.`description`, b0.`default_acquirer`, b0.`group_id`, b0.`merchant_reference_id`, b0.`merchant_tag`, b0.`inserted_at`, b0.`updated_at` FROM `brands` AS b0 WHERE (b0.`id` = ?) [266] ↳ DaProductAppWeb.QRMiddleLayerController.process_validated_transaction/2, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:97 [debug] QUERY OK source="pos_terminals" db=0.6ms idle=982.3ms SELECT p0.`id`, p0.`name`, p0.`serial_number`, p0.`device_type`, p0.`terminal_id`, p0.`store_id`, p0.`provider_id`, p0.`inserted_at`, p0.`updated_at` FROM `pos_terminals` AS p0 WHERE (p0.`id` = ?) [407] ↳ DaProductAppWeb.QRMiddleLayerController.process_validated_transaction/2, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:104 [debug] PosTerminal found: %DaProductApp.PosTerminal{__meta__: #Ecto.Schema.Metadata<:loaded, "pos_terminals">, id: 407, name: "Mini 600 UPI", serial_number: "61250415798001", device_type: "SoundBox", terminal_id: "81748407", store_id: 254, store: #Ecto.Association.NotLoaded, provider_id: 6, provider: #Ecto.Association.NotLoaded, inserted_at: ~N[2026-04-08 04:32:27], updated_at: ~N[2026-09-15 12:28:05]} [info] Checking for latest transaction on device: 61250415798001 [debug] QUERY OK source="transactions" db=1.1ms idle=983.2ms SELECT t0.`id`, t0.`patient_name`, t0.`uhid`, t0.`charge_rate`, t0.`email`, t0.`mobile_no`, t0.`provider_processing_id`, t0.`uname`, t0.`user_id`, t0.`pay_mode`, t0.`location_id`, t0.`transaction_location`, t0.`credentials_user`, t0.`credentials_key`, t0.`version`, t0.`return_url`, t0.`response_url`, t0.`status`, t0.`transaction_id`, t0.`transaction_amount`, t0.`transaction_ref_number`, t0.`m_ref_num`, t0.`name`, t0.`provider_id`, t0.`device_id`, t0.`merchant_id`, t0.`additional_data`, t0.`payment_reference_id`, t0.`refund_reference_id`, t0.`provider_name`, t0.`payload`, t0.`settlement_date_time`, t0.`batch_number`, t0.`bank_user_id`, t0.`merchant_tag`, t0.`inserted_at`, t0.`updated_at` FROM `transactions` AS t0 WHERE (t0.`device_id` = ?) ORDER BY t0.`inserted_at` DESC LIMIT 1 ["61250415798001"] ↳ DaProductAppWeb.QRMiddleLayerController.process_validated_transaction/2, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:115 [info] Latest transaction has status: success, no cancellation needed [debug] QUERY OK source="brands" db=0.5ms idle=984.7ms SELECT s1.`name`, s1.`code`, s1.`code`, b0.`name`, b0.`code`, b0.`merchant_reference_id`, b0.`id`, g2.`name`, g2.`code`, g2.`phone_number`, g2.`mcc_code`, g2.`mcc_code`, g2.`transaction_currency`, g2.`settlement_currency` FROM `brands` AS b0 INNER JOIN `stores` AS s1 ON s1.`brand_id` = b0.`id` INNER JOIN `groups` AS g2 ON g2.`id` = b0.`group_id` WHERE (b0.`id` = ?) [266] ↳ DaProductAppWeb.QRMiddleLayerController.get_hierarchy_details_from_brand/1, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:849 [info] [QRMiddleLayerController] About to call generate_m_ref_num [info] [QRMiddleLayerController] Returned from generate_m_ref_num: sh_F147D07F9BCCC [info] [QRMiddleLayerController] m_ref_num generated: sh_F147D07F9BCCC [debug] Generated m_ref_num: sh_F147D07F9BCCC [info] [QRMiddleLayerController] m_ref_num to be saved: sh_F147D07F9BCCC [debug] QUERY OK source="batch_numbers" db=1.3ms queue=0.5ms idle=986.3ms SELECT b0.`batch_number` FROM `batch_numbers` AS b0 WHERE (b0.`merchant_id` = ?) ORDER BY b0.`id` DESC LIMIT 1 ["123451234512345"] ↳ DaProductAppWeb.QRMiddleLayerController.process_validated_transaction/2, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:173 [info] Batch number lookup for merchant_id=123451234512345: query=#Ecto.Query, result=nil [debug] QUERY OK db=410.6ms queue=1.2ms idle=989.4ms INSERT INTO `transactions` (`name`,`status`,`email`,`m_ref_num`,`provider_id`,`provider_name`,`merchant_id`,`additional_data`,`device_id`,`transaction_amount`,`transaction_ref_number`,`provider_processing_id`,`user_id`,`inserted_at`,`updated_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ["Frog8 Cafe", "pending", "ch_a9ce24bd9cd5@momentpay.in", "sh_F147D07F9BCCC", 7, "WeChat Pay", "123451234512345", %{"customerMobileNumber" => nil}, "61250415798001", Decimal.new("1.23"), "REF_1790838143_862e234c", "sh_F147D07F9BCCC", "1", ~N[2026-10-01 07:02:23], ~N[2026-10-01 07:02:23]] ↳ DaProductAppWeb.QRMiddleLayerController.process_validated_transaction/2, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:200 [info] Transaction created successfully: sh_F147D07F9BCCC [debug] Calling provider with params: %{pid: "7", transaction_refid: "REF_1790838143_862e234c", amount: 123, m_ref_num: "sh_F147D07F9BCCC", transaction_id: 14755, store_id: "81748", transaction_currency: "AED", store_name: "Frog8 Cafe", brand_name: "Frog8 Cafe", brand_code: "123451234512345", group_name: "Frog8 Cafe", merchant_id: "123451234512345", merchant_name: "Frog8 Cafe", merchant_tag: nil, group_code: "123451234512345", additional_data: %{"customerMobileNumber" => nil}, device_id: "61250415798001", merchant_mcc: "5814", store_mcc: "5814", brand_id: 266, settlement_currency: "AED", bank_user_id: "123451234512345", cash_desk_id: "762843490320736", merchant_city: "Dubai", pmid: "79678117", provider_merchant_id: "79678117", provider_terminal_id: "762843490320736", ptid: "762843490320736", requestor_id: "Mercury", stid: 407} [info] Entering WeChat.generate function [debug] WeChat.generate called with unified provider_params: device_id: 61250415798001, amount: 123, transaction_refid: REF_1790838143_862e234c, merchant_id: 123451234512345, m_ref_num: sh_F147D07F9BCCC, stid: 407, ptid: 762843490320736, pmid: 79678117 [debug] QUERY OK source="custom_events" db=0.9ms idle=520.5ms SELECT c0.`id`, c0.`is_published`, c0.`date_added`, c0.`created_by`, c0.`created_by_user`, c0.`date_modified`, c0.`modified_by`, c0.`modified_by_user`, c0.`checked_out`, c0.`checked_out_by`, c0.`checked_out_by_user`, c0.`name`, c0.`alias`, c0.`payloads`, c0.`idgoal`, c0.`discription`, c0.`inserted_at`, c0.`updated_at` FROM `custom_events` AS c0 WHERE (c0.`alias` = ?) ["payment_request_to_wechat_pay"] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event/2, at: lib/da_product_app_web/services/event_logger.ex:235 [info] Creating custom event log with attributes: %{payload: %{username: nil, transaction_refid: "REF_1790838143_862e234c", amount: 123, m_ref_num: "sh_F147D07F9BCCC", provider_name: "wechat", merchant_id: "123451234512345", merchant_ref_number: "sh_F147D07F9BCCC", request_body: %{"amount" => %{"currency" => "AED", "total" => 123}, "appid" => "wxsimulatorappid0001", "description" => "Frog8 Cafe", "mchid" => "1900000001", "notify_url" => "http://127.0.0.1:4012/api/wechat/notify_payment", "out_trade_no" => "sh_F147D07F9BCCC"}}, event_name: "Payment Request to WeChat Pay", transaction_id: nil, refrence_id: "REF_1790838143_862e234c", date_added: ~U[2026-10-01 07:02:23.886254Z], event_id: 57, event_value: "payment_request_to_wechat_pay"} [debug] QUERY OK db=48.4ms queue=0.3ms idle=435.7ms INSERT INTO `custom_event_log` (`payload`,`event_name`,`refrence_id`,`date_added`,`event_id`,`event_value`,`inserted_at`,`updated_at`) VALUES (?,?,?,?,?,?,?,?) [%{username: nil, transaction_refid: "REF_1790838143_862e234c", amount: 123, m_ref_num: "sh_F147D07F9BCCC", provider_name: "wechat", merchant_id: "123451234512345", merchant_ref_number: "sh_F147D07F9BCCC", request_body: %{"amount" => %{"currency" => "AED", "total" => 123}, "appid" => "wxsimulatorappid0001", "description" => "Frog8 Cafe", "mchid" => "1900000001", "notify_url" => "http://127.0.0.1:4012/api/wechat/notify_payment", "out_trade_no" => "sh_F147D07F9BCCC"}}, "Payment Request to WeChat Pay", "REF_1790838143_862e234c", ~U[2026-10-01 07:02:23Z], 57, "payment_request_to_wechat_pay", ~N[2026-10-01 07:02:23], ~N[2026-10-01 07:02:23]] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event_log/6, at: lib/da_product_app_web/services/event_logger.ex:285 [info] POST /sim/wechat/v3/pay/transactions/native [debug] Processing with DaProductAppWeb.WechatSimulatorController.native_pay/2 Parameters: %{"amount" => %{"currency" => "AED", "total" => 123}, "appid" => "wxsimulatorappid0001", "description" => "Frog8 Cafe", "mchid" => "1900000001", "notify_url" => "http://127.0.0.1:4012/api/wechat/notify_payment", "out_trade_no" => "sh_F147D07F9BCCC"} Pipelines: [:api] [info] [WeChat SIM] native order create: %{"amount" => %{"currency" => "AED", "total" => 123}, "appid" => "wxsimulatorappid0001", "description" => "Frog8 Cafe", "mchid" => "1900000001", "notify_url" => "http://127.0.0.1:4012/api/wechat/notify_payment", "out_trade_no" => "sh_F147D07F9BCCC"} [info] Sent 200 in 441µs [info] Received code_url from WeChat Pay Native API: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC" [debug] QUERY OK source="custom_events" db=0.7ms queue=0.1ms idle=650.7ms SELECT c0.`id`, c0.`is_published`, c0.`date_added`, c0.`created_by`, c0.`created_by_user`, c0.`date_modified`, c0.`modified_by`, c0.`modified_by_user`, c0.`checked_out`, c0.`checked_out_by`, c0.`checked_out_by_user`, c0.`name`, c0.`alias`, c0.`payloads`, c0.`idgoal`, c0.`discription`, c0.`inserted_at`, c0.`updated_at` FROM `custom_events` AS c0 WHERE (c0.`alias` = ?) ["qr_code_received_from_wechat_pay"] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event/2, at: lib/da_product_app_web/services/event_logger.ex:235 [info] Creating custom event log with attributes: %{payload: %{response: %{"paymentId" => "sh_F147D07F9BCCC", "qrCodeId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", "qrId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC"}, username: nil, transaction_refid: "REF_1790838143_862e234c", amount: 123, provider_name: "WeChat Pay", merchant_ref_number: "sh_F147D07F9BCCC", qr_code_id: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", qr_id: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC"}, event_name: "QR Code Received from Wechat pay", transaction_id: 14755, refrence_id: "REF_1790838143_862e234c", date_added: ~U[2026-10-01 07:02:24.116819Z], event_id: 56, event_value: "qr_code_received_from_wechat_pay"} [debug] QUERY OK db=511.4ms idle=651.3ms INSERT INTO `custom_event_log` (`payload`,`event_name`,`transaction_id`,`refrence_id`,`date_added`,`event_id`,`event_value`,`inserted_at`,`updated_at`) VALUES (?,?,?,?,?,?,?,?,?) [%{response: %{"paymentId" => "sh_F147D07F9BCCC", "qrCodeId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", "qrId" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC"}, username: nil, transaction_refid: "REF_1790838143_862e234c", amount: 123, provider_name: "WeChat Pay", merchant_ref_number: "sh_F147D07F9BCCC", qr_code_id: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", qr_id: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC"}, "QR Code Received from Wechat pay", 14755, "REF_1790838143_862e234c", ~U[2026-10-01 07:02:24Z], 56, "qr_code_received_from_wechat_pay", ~N[2026-10-01 07:02:24], ~N[2026-10-01 07:02:24]] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event_log/6, at: lib/da_product_app_web/services/event_logger.ex:285 [debug] Extracted paymentId: "sh_F147D07F9BCCC" [debug] Extracted paymentId: "sh_F147D07F9BCCC" [info] WeChat Pay response indicates success [debug] QUERY OK source="transactions" db=15.5ms queue=0.5ms idle=796.0ms SELECT t0.`id`, t0.`patient_name`, t0.`uhid`, t0.`charge_rate`, t0.`email`, t0.`mobile_no`, t0.`provider_processing_id`, t0.`uname`, t0.`user_id`, t0.`pay_mode`, t0.`location_id`, t0.`transaction_location`, t0.`credentials_user`, t0.`credentials_key`, t0.`version`, t0.`return_url`, t0.`response_url`, t0.`status`, t0.`transaction_id`, t0.`transaction_amount`, t0.`transaction_ref_number`, t0.`m_ref_num`, t0.`name`, t0.`provider_id`, t0.`device_id`, t0.`merchant_id`, t0.`additional_data`, t0.`payment_reference_id`, t0.`refund_reference_id`, t0.`provider_name`, t0.`payload`, t0.`settlement_date_time`, t0.`batch_number`, t0.`bank_user_id`, t0.`merchant_tag`, t0.`inserted_at`, t0.`updated_at` FROM `transactions` AS t0 WHERE (t0.`m_ref_num` = ?) ["sh_F147D07F9BCCC"] ↳ DaProductAppWeb.QRMiddleLayerController.update_transaction_status/4, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:796 [debug] Attributes to update: %{status: "pending", payment_reference_id: "sh_F147D07F9BCCC", updated_at: ~U[2026-10-01 07:02:24.696651Z]} [debug] QUERY OK source="transactions" db=48.9ms queue=0.9ms idle=810.7ms UPDATE `transactions` SET `payment_reference_id` = ?, `updated_at` = ? WHERE `id` = ? ["sh_F147D07F9BCCC", ~N[2026-10-01 07:02:24], 14755] ↳ DaProductAppWeb.QRMiddleLayerController.update_transaction_status/4, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:815 [debug] QUERY OK source="brands" db=1.2ms idle=811.8ms SELECT s1.`name`, s1.`code`, s1.`code`, b0.`name`, b0.`code`, b0.`merchant_reference_id`, b0.`id`, g2.`name`, g2.`code`, g2.`phone_number`, g2.`mcc_code`, g2.`mcc_code`, g2.`transaction_currency`, g2.`settlement_currency` FROM `brands` AS b0 INNER JOIN `stores` AS s1 ON s1.`brand_id` = b0.`id` INNER JOIN `groups` AS g2 ON g2.`id` = b0.`group_id` WHERE (b0.`id` = ?) [266] ↳ DaProductAppWeb.QRMiddleLayerController.get_hierarchy_details_from_brand/1, at: lib/da_product_app_web/controllers/qr_middle_layer_controller.ex:849 [info] Transaction processed successfully: %{status: "QR_GENERATED", transaction_refid: "REF_1790838143_862e234c", amount: 1.23, transaction_id: 14755, store_code: "81748", store_name: "Frog8 Cafe", brand_name: "Frog8 Cafe", brand_code: "123451234512345", deviceSerial: "61250415798001", mRefId: "sh_F147D07F9BCCC", merchant_id: "123451234512345", merchant_name: "Frog8 Cafe", merchant_phone_number: "8979796960", qrCodeId: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", qrId: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", paymentId: "sh_F147D07F9BCCC"} [info] Final response sent to client: %{data: %{status: "QR_GENERATED", transaction_refid: "REF_1790838143_862e234c", amount: 1.23, transaction_id: 14755, store_code: "81748", store_name: "Frog8 Cafe", brand_name: "Frog8 Cafe", brand_code: "123451234512345", deviceSerial: "61250415798001", mRefId: "sh_F147D07F9BCCC", merchant_id: "123451234512345", merchant_name: "Frog8 Cafe", merchant_phone_number: "8979796960", qrCodeId: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", qrId: "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC", paymentId: "sh_F147D07F9BCCC"}, status: "success"} [info] Sent 200 in 1289ms Payment process logs in pr10 [info] POST /sim/wechat/scan [debug] Processing with DaProductAppWeb.WechatSimulatorController.scan/2 Parameters: %{"qr_string" => "weixin://wxpay/bizpayurl?pr=SIMsh_F147D07F9BCCC"} Pipelines: [:api] [debug] QUERY OK source="transactions" db=3.2ms idle=1406.6ms SELECT t0.`id`, t0.`patient_name`, t0.`uhid`, t0.`charge_rate`, t0.`email`, t0.`mobile_no`, t0.`provider_processing_id`, t0.`uname`, t0.`user_id`, t0.`pay_mode`, t0.`location_id`, t0.`transaction_location`, t0.`credentials_user`, t0.`credentials_key`, t0.`version`, t0.`return_url`, t0.`response_url`, t0.`status`, t0.`transaction_id`, t0.`transaction_amount`, t0.`transaction_ref_number`, t0.`m_ref_num`, t0.`name`, t0.`provider_id`, t0.`device_id`, t0.`merchant_id`, t0.`additional_data`, t0.`payment_reference_id`, t0.`refund_reference_id`, t0.`provider_name`, t0.`payload`, t0.`settlement_date_time`, t0.`batch_number`, t0.`bank_user_id`, t0.`merchant_tag`, t0.`inserted_at`, t0.`updated_at` FROM `transactions` AS t0 WHERE (t0.`m_ref_num` = ?) ORDER BY t0.`id` DESC LIMIT 1 ["sh_F147D07F9BCCC"] ↳ DaProductAppWeb.WechatSimulatorController.scan/2, at: lib/da_product_app_web/controllers/wechat_simulator_controller.ex:85 [info] Sent 200 in 4ms [info] POST /sim/wechat/trigger-callback [debug] Processing with DaProductAppWeb.WechatSimulatorController.trigger_callback/2 Parameters: %{"m_ref_num" => "sh_F147D07F9BCCC", "trade_state" => "SUCCESS"} Pipelines: [:api] [debug] QUERY OK source="transactions" db=5.7ms queue=0.5ms idle=1344.9ms SELECT t0.`transaction_amount` FROM `transactions` AS t0 WHERE (t0.`m_ref_num` = ?) ["sh_F147D07F9BCCC"] ↳ DaProductAppWeb.WechatSimulatorController.lookup_amount_minor_units/1, at: lib/da_product_app_web/controllers/wechat_simulator_controller.ex:264 [info] [WeChat SIM] POST callback -> http://127.0.0.1:4012/api/wechat/notify_payment (SUCCESS) [info] POST /api/wechat/notify_payment [debug] Processing with DaProductAppWeb.WechatWebhookController.notify_payment/2 Parameters: %{"create_time" => "2026-10-01T07:03:05.836693Z", "event_type" => "TRANSACTION.SUCCESS", "id" => "5c367800-a8c8-4e97-b19e-86a87f8eb800", "resource" => %{"associated_data" => "transaction", "ciphertext" => "yEtNhnVwRtOmkea37mZFmHGOyR16rBktIhYbko7DyfRU1+KiLHIxvwon1hNy/Ji5EVBnuBMDJvo7Z0iyOXf6aZ8EWnjCNsLLJwVv+PVnmw7GwzIdYkKxvOLh8WfO7gg6jFZMZGrxHdkrWXRnUgicLJB5vfxrt/VgFZkrG1wsyn635TGl0DQKoSO1/l9GeVEMzWNiK3H7+DpnpZeTf0ZfTCPpMCo6w6h7Yaz2jAMc4EugrdYVrTHaw/neJ84mW9C73zy8+afOlrk0+Qa57NLV1rm8xnvUyTdcbEBBVvmIIZhBYQFbwLlKCMKCYOupwkh7Iz+4eWjT38rsYl16Oq/m9aixnRuTgORZpBX1US5yLmRvJ7xxEaPKFkuMSB41Byvvf07/kL6c3DemvQfl1NQnIjTP8psmrF6UaPmQV9iwDjQGY22CfFMo39+4TSGlifqrawatGT9tVQCY+xe2HyfdXtE+9M/GxpSWhmwxuo2soHJTk/jmCNkwatf3cRHRxKVZYs004KXOz7m/Mmu+vkk=", "nonce" => "52778ceea6cb", "original_type" => "transaction"}, "resource_type" => "encrypt-resource", "summary" => "支付成功"} Pipelines: [:api] [info] [WeChat NotifyPayment] Received notification: %{"create_time" => "2026-10-01T07:03:05.836693Z", "event_type" => "TRANSACTION.SUCCESS", "id" => "5c367800-a8c8-4e97-b19e-86a87f8eb800", "resource" => %{"associated_data" => "transaction", "ciphertext" => "yEtNhnVwRtOmkea37mZFmHGOyR16rBktIhYbko7DyfRU1+KiLHIxvwon1hNy/Ji5EVBnuBMDJvo7Z0iyOXf6aZ8EWnjCNsLLJwVv+PVnmw7GwzIdYkKxvOLh8WfO7gg6jFZMZGrxHdkrWXRnUgicLJB5vfxrt/VgFZkrG1wsyn635TGl0DQKoSO1/l9GeVEMzWNiK3H7+DpnpZeTf0ZfTCPpMCo6w6h7Yaz2jAMc4EugrdYVrTHaw/neJ84mW9C73zy8+afOlrk0+Qa57NLV1rm8xnvUyTdcbEBBVvmIIZhBYQFbwLlKCMKCYOupwkh7Iz+4eWjT38rsYl16Oq/m9aixnRuTgORZpBX1US5yLmRvJ7xxEaPKFkuMSB41Byvvf07/kL6c3DemvQfl1NQnIjTP8psmrF6UaPmQV9iwDjQGY22CfFMo39+4TSGlifqrawatGT9tVQCY+xe2HyfdXtE+9M/GxpSWhmwxuo2soHJTk/jmCNkwatf3cRHRxKVZYs004KXOz7m/Mmu+vkk=", "nonce" => "52778ceea6cb", "original_type" => "transaction"}, "resource_type" => "encrypt-resource", "summary" => "支付成功"} [info] [WeChat NotifyPayment] Decrypted resource: %{"amount" => %{"currency" => "AED", "payer_currency" => "AED", "payer_total" => 123, "total" => 123}, "appid" => "wxsimulatorappid0001", "bank_type" => "OTHERS", "mchid" => "1900000001", "out_trade_no" => "sh_F147D07F9BCCC", "payer" => %{"openid" => "sim-openid-0001"}, "success_time" => "2026-10-01T07:03:05.836582Z", "trade_state" => "SUCCESS", "trade_state_desc" => "SUCCESS", "trade_type" => "NATIVE", "transaction_id" => "SIM1790838185836"} [debug] QUERY OK source="transactions" db=8.2ms queue=0.5ms idle=1596.3ms SELECT t0.`id` FROM `transactions` AS t0 WHERE (t0.`m_ref_num` = ?) ["sh_F147D07F9BCCC"] ↳ DaProductAppWeb.WechatWebhookController.log_notification_received/3, at: lib/da_product_app_web/controllers/wechat_webhook_controller.ex:169 [debug] QUERY OK source="users" db=3.5ms idle=1605.5ms SELECT u0.`id`, u0.`email`, u0.`hashed_password`, u0.`confirmed_at`, u0.`role`, u0.`name`, u0.`first_name`, u0.`last_name`, u0.`data`, u0.`inserted_at`, u0.`updated_at` FROM `users` AS u0 WHERE (u0.`email` = ?) ["system"] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event/2, at: lib/da_product_app_web/services/event_logger.ex:232 [debug] QUERY OK source="custom_events" db=0.5ms idle=1609.3ms SELECT c0.`id`, c0.`is_published`, c0.`date_added`, c0.`created_by`, c0.`created_by_user`, c0.`date_modified`, c0.`modified_by`, c0.`modified_by_user`, c0.`checked_out`, c0.`checked_out_by`, c0.`checked_out_by_user`, c0.`name`, c0.`alias`, c0.`payloads`, c0.`idgoal`, c0.`discription`, c0.`inserted_at`, c0.`updated_at` FROM `custom_events` AS c0 WHERE (c0.`alias` = ?) ["notification_received_from_wechat"] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event/2, at: lib/da_product_app_web/services/event_logger.ex:235 [info] Creating custom event log with attributes: %{payload: %{status: "SUCCESS", username: "system", transaction_status: "success", amount: 1.23, m_ref_num: "sh_F147D07F9BCCC", provider_name: "wechat", merchant_ref_number: "sh_F147D07F9BCCC", notification_data: %{"amount" => %{"currency" => "AED", "payer_currency" => "AED", "payer_total" => 123, "total" => 123}, "appid" => "wxsimulatorappid0001", "bank_type" => "OTHERS", "mchid" => "1900000001", "out_trade_no" => "sh_F147D07F9BCCC", "payer" => %{"openid" => "sim-openid-0001"}, "success_time" => "2026-10-01T07:03:05.836582Z", "trade_state" => "SUCCESS", "trade_state_desc" => "SUCCESS", "trade_type" => "NATIVE", "transaction_id" => "SIM1790838185836"}, notification_type: "payment_success", payment_id: "sh_F147D07F9BCCC", qr_code_id: "sh_F147D07F9BCCC"}, event_name: "Notification Received from Wechat", transaction_id: 14755, refrence_id: "sh_F147D07F9BCCC", date_added: ~U[2026-10-01 07:03:06.095378Z], event_id: 58, event_value: "notification_received_from_wechat"} [debug] QUERY OK db=33.2ms queue=0.1ms idle=1611.4ms INSERT INTO `custom_event_log` (`payload`,`event_name`,`transaction_id`,`refrence_id`,`date_added`,`event_id`,`event_value`,`inserted_at`,`updated_at`) VALUES (?,?,?,?,?,?,?,?,?) [%{status: "SUCCESS", username: "system", transaction_status: "success", amount: 1.23, m_ref_num: "sh_F147D07F9BCCC", provider_name: "wechat", merchant_ref_number: "sh_F147D07F9BCCC", notification_data: %{"amount" => %{"currency" => "AED", "payer_currency" => "AED", "payer_total" => 123, "total" => 123}, "appid" => "wxsimulatorappid0001", "bank_type" => "OTHERS", "mchid" => "1900000001", "out_trade_no" => "sh_F147D07F9BCCC", "payer" => %{"openid" => "sim-openid-0001"}, "success_time" => "2026-10-01T07:03:05.836582Z", "trade_state" => "SUCCESS", "trade_state_desc" => "SUCCESS", "trade_type" => "NATIVE", "transaction_id" => "SIM1790838185836"}, notification_type: "payment_success", payment_id: "sh_F147D07F9BCCC", qr_code_id: "sh_F147D07F9BCCC"}, "Notification Received from Wechat", 14755, "sh_F147D07F9BCCC", ~U[2026-10-01 07:03:06Z], 58, "notification_received_from_wechat", ~N[2026-10-01 07:03:06], ~N[2026-10-01 07:03:06]] ↳ DaProductAppWeb.Services.EventLogger.store_custom_event_log/6, at: lib/da_product_app_web/services/event_logger.ex:285 [debug] QUERY OK source="transactions" db=51.8ms idle=1645.3ms UPDATE `transactions` AS t0 SET t0.`status` = ?, t0.`payload` = ?, t0.`settlement_date_time` = ?, t0.`updated_at` = ? WHERE ((t0.`m_ref_num` = ?) AND t0.`status` IN ('pending','QR_GENERATED')) ["success", %{"amount" => %{"currency" => "AED", "payer_currency" => "AED", "payer_total" => 123, "total" => 123}, "appid" => "wxsimulatorappid0001", "bank_type" => "OTHERS", "mchid" => "1900000001", "out_trade_no" => "sh_F147D07F9BCCC", "payer" => %{"openid" => "sim-openid-0001"}, "success_time" => "2026-10-01T07:03:05.836582Z", "trade_state" => "SUCCESS", "trade_state_desc" => "SUCCESS", "trade_type" => "NATIVE", "transaction_id" => "SIM1790838185836"}, ~U[2026-10-01 07:03:06Z], ~N[2026-10-01 07:03:06], "sh_F147D07F9BCCC"] ↳ DaProductAppWeb.WechatWebhookController.update_transaction_status/3, at: lib/da_product_app_web/controllers/wechat_webhook_controller.ex:132 [info] [WeChat NotifyPayment] Successfully updated transaction status to success for m_ref_num: sh_F147D07F9BCCC [info] [WeChat NotifyPayment] Notifying cloud layer http://127.0.0.1:4008/api/payment/notify-success for sh_F147D07F9BCCC (success) [info] [WeChat NotifyPayment] Cloud layer responded 200: {"message":"Payment notification processed","status":"success"} [info] Sent 200 in 459ms [info] Sent 200 in 703ms