mangopay2-php-sdk
mangopay2-php-sdk copied to clipboard
chore: use logger context
This PR replaces all $this->logger->debug('Response JSON : ' . print_r($responseResult->Body, true)); by 2 logs (request and response) with a static message and all variable data passed in the context.
This refacto allows using a custom Logger and getting variable data without parsing actual log messages in order to transform print_r strings back into php or json array.
Debug calls have been refactored in order to avoid duplication of if ($this->_root->Config->DebugMode) {