Skip to content

Error Mixed Date y Decimal JSON #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
IsraelGavino opened this issue May 22, 2024 · 2 comments
Closed

Error Mixed Date y Decimal JSON #14

IsraelGavino opened this issue May 22, 2024 · 2 comments

Comments

@IsraelGavino
Copy link

Fatal error: Uncaught TypeError: Return value of Aplazame\Serializer\Decimal::jsonSerialize() must be an instance of Aplazame\Serializer\mixed, int returned in /home//public_html/includes/vendor/aplazame/aplazame-api-sdk/src/Serializer/Decimal.php:38 Stack trace: #0 [internal function]: Aplazame\Serializer\Decimal->jsonSerialize() #1 /home//public_html/includes/vendor/aplazame/aplazame-api-sdk/src/Api/ApiRequest.php(67): json_encode(Object(stdClass)) #2 /home//public_html/includes/vendor/aplazame/aplazame-api-sdk/src/Api/Client.php(163): Aplazame\Api\ApiRequest->__construct(false, 1, '5981ee7c3b3b691...', 'POST', 'https://api.apl...', Object(stdClass)) #3 /home//public_html/includes/vendor/aplazame/aplazame-api-sdk/src/Api/Client.php(125): Aplazame\Api\Client->request('POST', '/checkout', Object(stdClass)) #4 /home//public_html/includes/modules/payment/aplazamev3.php(57): Aplazame\Api\Client->post('/checkout', Object(stdClass)) #5 /home//public_html/includes/modules/payment/aplazamev3.php(449 in /home/***/public_html/includes/vendor/aplazame/aplazame-api-sdk/src/Serializer/Decimal.php on line 38

@IsraelGavino
Copy link
Author

Es necesario quitar el mixed para evitar el error en la serialización del JSON

@alexhernandezord
Copy link
Collaborator

Esto es debido a que estáis usando una versión de PHP anterior a la 8.1. Usad la versión v0.3.5 del SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants