Adyen/adyen-magento2

[ECP-9492]Adyen Logger is confusing for /connectedTerminals requests on live / production

Opened this issue · 0 comments

Describe the bug
When the module is on live mode, the Adyen Logger will still log /connectedTerminals requests but the log details are missing. This is caused by the applied filter for live / production requests, added when the logging itself was implemented: #1902

Example on test

[2024-09-05T13:13:15.999381+00:00] AdyenLoggerTest.INFO: Request to Adyen API /connectedTerminals {"apiVersion":"","body":{"merchantAccount":"..."}} {"uid":"2b94b52"}
[2024-09-05T13:13:16.079477+00:00] AdyenLoggerTest.INFO: Response from Adyen API {"body":{"uniqueTerminalIds":["..."]}} {"uid":"2b94b52"}

Example on live / production

[2024-09-05T13:36:27.711069+00:00] AdyenLoggerTest.INFO: Request to Adyen API /connectedTerminals {"apiVersion":"","livePrefix":"...","body":[]} {"uid":"835108d"}
[2024-09-05T13:36:27.759809+00:00] AdyenLoggerTest.INFO: Response from Adyen API {"body":[]} {"uid":"835108d"}

This log record is of course pretty useless.

To Reproduce
Steps to reproduce the behavior:

  1. Switch to production mode
  2. Start a POS (terminal) payment
  3. Check the logs

Expected behavior
Both merchantAccount and uniqueTerminalIds are present in the logs, or nothing is logged at all.

Magento version
2.4.7-p2

Plugin version
9.7.2

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
The log is confusing, it can make you think that there are no terminals active when there actually are.