Ingenico-ePayments / connect-sdk-php

Ingenico Connect PHP Server SDK
https://docs.connect.worldline-solutions.com/documentation/sdk/server/php/
MIT License
39 stars 16 forks source link

UnexpectedValueException in ResponseFactory after updateToken call. #12

Closed hanken closed 5 years ago

hanken commented 5 years ago

Hi

If the $client->merchant()->tokens()->update() method is used. The server responses with a 204 and no Content-Type header. ResponseFactory requires a Conent-Type of application/json and hence throws an UnexpectedValueException (https://github.com/Ingenico-ePayments/connect-sdk-php/blob/master/lib/Ingenico/Connect/Sdk/ResponseFactory.php#L63).

Still happens after updating to the 5.34.0 release.

rob-spoor commented 5 years ago

Thanks for reporting this. This was an oversight that was already planned to be fixed. We moved the fix forward - for 204 responses, the content type is no longer required.