smsapi / smsapi-php-client

SMSAPI PHP client that allows you to send messages, manage Short URLs and administrate your SMSAPI account.
https://www.smsapi.pl
Other
64 stars 39 forks source link

Mfa verification error when code validity period has expired #126

Closed lozynskiadam closed 9 months ago

lozynskiadam commented 9 months ago
$mfaBag = new VerificationMfaBag($code, $phoneNumber); // expired code

$mfaResponse = (new SmsapiHttpClient())
  ->smsapiPlService($apiToken)
  ->mfaFeature()
  ->verifyMfa($mfaBag);

output:

2024-01-03 11:01:03 [83.16.11.142][173][34e4df4529f07064a3755c27facf89c1][error][TypeError] TypeError: Smsapi\Client\Infrastructure\ResponseMapper\JsonDecode::decode(): Return value must be of type stdClass, array returned in /vendor/smsapi/php-client/src/Infrastructure/ResponseMapper/JsonDecode.php:28
Stack trace:
#0 /vendor/smsapi/php-client/src/Infrastructure/ResponseMapper/RestResponseMapper.php(44): Smsapi\Client\Infrastructure\ResponseMapper\JsonDecode->decode('[]')
#1 /vendor/smsapi/php-client/src/Infrastructure/RequestExecutor/RestRequestExecutor.php(80): Smsapi\Client\Infrastructure\ResponseMapper\RestResponseMapper->map(Object(GuzzleHttp\Psr7\Response))
#2 /vendor/smsapi/php-client/src/Infrastructure/RequestExecutor/RestRequestExecutor.php(45): Smsapi\Client\Infrastructure\RequestExecutor\RestRequestExecutor->sendRequestAndMapResponse(Object(Smsapi\Client\Infrastructure\Request))
#3 /vendor/smsapi/php-client/src/Feature/Mfa/MfaHttpFeature.php(42): Smsapi\Client\Infrastructure\RequestExecutor\RestRequestExecutor->create('mfa/codes/verif...', Array)
mpawikowski commented 9 months ago

Hello,

I forwarded it to our IT department for verification.

Best regards,