opened
grandpalacko
username_0
I have been working on the implementation of Wirecard payment in a custom webshop and run into a weird error. When I'm trying to reserve the payment by using the `$transactionService->processJsResponse()` method, I receive multiple warnings and a `String could not be parsed as XML` fatal error.

I cloned the SDK and changed the city in the `createUiWppV2NonThreeD.php` to München, and after sending the credit card form I received the same fatal error.

The problem resides in the `XmlBuilder.php` file where you are using the `htmlentities()` function, which actually doesn't create XML safe strings:

https://github.com/wirecard/paymentSDK-php/blob/77dd6713c633d96d6e0cba44d41e761b2a675030/src/Helper/XmlBuilder.php#L62-L64

Using `htmlspecialchars()` seems to be fixing the issue.

SDK version: 4.0.3
PHP version: 7.3.19
XML encoding error
issue