diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt index ac3092e6..49ecf275 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/FinTsClient.kt @@ -598,7 +598,7 @@ open class FinTsClient @JvmOverloads constructor( } protected open fun getResponseForMessage(requestBody: String, bank: BankData): WebClientResponse { - log.debug("Sending message:\n$requestBody") + log.debug("Sending message:\n${prettyPrintHbciMessage(requestBody)}") val encodedRequestBody = base64Service.encode(requestBody) @@ -614,7 +614,7 @@ open class FinTsClient @JvmOverloads constructor( val decodedResponse = decodeBase64Response(responseBody) - log.debug("Received message:\n$decodedResponse") + log.debug("Received message:\n${prettyPrintHbciMessage(decodedResponse)}") return responseParser.parse(decodedResponse) } @@ -629,6 +629,10 @@ open class FinTsClient @JvmOverloads constructor( return base64Service.decode(responseBody.replace("\r", "").replace("\n", "")) } + protected fun prettyPrintHbciMessage(message: String): String { + return message.replace("'", "'\r\n") + } + protected open fun handleMayRequiredTan(response: Response, bank: BankData, customer: CustomerData, dialogData: DialogData): Response { if (response.isStrongAuthenticationRequired) { response.tanResponse?.let { tanResponse ->