Closed altay9 closed 1 year ago
The root cause of this problem is related to this line: https://github.com/iyzico/iyzipay-java/blob/03947b1a2b0e31b4c258a0060bd5cc278167b183/src/main/java/com/iyzipay/HashGenerator.java#L20
As the getBytes()
method uses the platform's default encoding, this line is platform-dependent.
Passing encoding parameter might be considered in the future: getBytes("UTF-8")
Hi @altayhunoglu ,
In a spring boot project, getBytes("UTF-8")
doesn't seem to work. Could you please help if you overcomed this ?
Thanks
Hello @ozelox34 Sure, glad to help you. Could you try to change your Java system's encoding to UTF-8?
For example if you use VSCode, you can edit launch.json for that.
Otherwise you can try this link:
https://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding
Thanks @altayhunoglu , I have tried several options and come to know that only some methods give this error where others work without any issue in sandbox environment. Getting touch with support. Thanks for your prompt response.
Problemin çözülmüş olması ve zaman aşımından dolayı kapatılmıştır.
Hello,
I am not sure if this error is about the integration department of Iyzico, but we needed to inform you about the issue. The code below is just copied and pasted from the Iyzico Readme.
Indeed, it works quite well when we implement it as a JUnit test. We can even see the transaction on SandBox. But when we try it as a Spring Boot @Service method; the same method returns the aforementioned error message.
We try it on a Spring Boot project and on another pure Java project and got the same result.
Could you help us, please?
Kind regards.