Search code examples
apicallbackwhmcs

Why does my WHMCS log "hashReq" in error_log


In WHMCS; I've installed the custom payment module: EasyPaisa works by collecting the payment information and then returning back to the site after successful/unsuccessful transaction. as soon as customer attempt to pay; WHMCS Payment module adds the following lines in the log file; but as such payment module works without issues.

26-Jul-2020 14:08:18 Etc/GMT] Order INFO: 1890
[26-Jul-2020 14:08:18 Etc/GMT] MAPString: amount=1.0&autoRedirect=1&[email protected]&expiryDate=202032805 140818&orderRefNum=xxx&postBackURL=https://www.xxx.xxx/order/modules/gateways/callback/xxxx.php&storeId=xxxx
[26-Jul-2020 14:08:18 Etc/GMT] **hashReq**: UW12P8Dd8j5w2X9lD4QXiy9BaTc7zE3PlTDDfknMf6KFDoI02uFhaTujcoh+u0EidD2waU2LrjhCsX/IOI+BFF3s5gjTDf6K9NqkSC2sVJ6meD4KXOmbYbYZ9qvx45Cx8Y/8NfKAlZYp9fRjFV7Yg6WuN5ZUaefff/fXNqriIcbBm7PhGlJM7lbfffyjbkMK7soX1O0O5yhi8eHitAC58iUuXOLq83FNKuCdOCJLMpndlcWpfexjEbs4IN6WM3obfffZYBdXqwfEBZDx+5tERPDK+lemxMQ==

Solution

  • This will be occurring because the developers of this module have left some logActivity(); lines in place during the workflow these are created.

    To resolve this, you simply need to look for any logActivity lines in the module code (If the source is unencoded) - Otherwise, reach out to the module developer and have them remove those lines.

    Those lines look like they should only have been in place for debugging purposes and should not be present in a production version. Instead, you may wish to recommend to the module developers that they utilise the logTransaction functionality instead if these lines must be logged.

    https://developers.whmcs.com/payment-gateways/callbacks/