Closed Revisor closed 5 years ago
Fixed in 4195dc2185fe6f0a8f578cac9a05431fd77f6e71
Recently two version have been released.
v1.3.6 - new payment instrument and new session sub state codes which our gateway may return were added v1.4.0 - includes 1.3.6 + fixes the issue described here, but breaks backwards compatibility
https://github.com/gopaycommunity/gopay-php-api/blob/8ce477a45fe29015c456789a4d591f28a4d747f8/src/Http/JsonBrowser.php#L42
The documentation promises that
$response->json
is an associative array. But if the response is unsuccessful,$response->json
is an object (ofstdClass
).In the line above,
json_decode()
is missing its second argument.The potential bugfix breaks compatibility for all who process Gopay response errors.
Edit: Ahh, I see the same issue is mentioned in #21