contributte / fio

:euro: Fio API integration for Nette Framework
https://contributte.org/packages/contributte/fio.html
MIT License
4 stars 3 forks source link

PaymentResponse::getErrorCodeMessage() must be of the type string, null returned #4

Open majun opened 4 years ago

majun commented 4 years ago

On FIO error is not possible to read message from Contributte\Fio\Http\PaymentResponse->getErrorCodeMessage() and throws exception:

TypeError
Return value of Contributte\Fio\Http\PaymentResponse::getErrorCodeMessage() must be of the type string, null returned

Usage (Nette):

<?php
$response = $paymentService->sendPayments();
if ($response->isOk()) {
    ...
    $this->onSuccess();
} else {
    $this->onError($response->getErrorCodeMessage());
}
f3l1x commented 4 years ago

Hi. Could you repair it and send PR? Thx.

f3l1x commented 3 years ago

Ping @majun