I am sending some data to a SoapService that contains escaped currency symbols. For example  € for the Euro symbol. However, when SoapClient::__soapCall is called, the strings are being escaped again so it ends up looking like  €
Here's how I'm doing the call:
$params = new \stdClass();
$params->recipient = new \stdClass();
$params->recipient->name = "Some buyer";
$params->recipient->email = "test@test.com";
$params->data = new \stdClass();
$params->data->name = "total";
$params->data->value = "91,04 €"
$soap = new \SoapClient(); //Skipping the usual settings for the sake of brevity
$soap->__soapCall('send', [$params]);
I'm actually using a class that extends SoapClient to stub out the method that calls SoapClient::__soapCall, but that is not affecting the payload. I've checked that up until the point when SoapClient::__soapCall is called it all looks as described above.
Any ideas on how to avoid this?
No comments:
Post a Comment