PaymentIntent error when gson version is < 2.9.1
Siddikpatel opened this issue · 2 comments
Siddikpatel commented
Describe the bug
When I tried to create a PaymentIntent
with gson version 2.8.9
or 2.9.0
, it gave me this exception classNotFoundException: com.google.gson.ReflectionAccessFilter
. It only works when I set gson version to 2.9.1
.
To Reproduce
- Set the gson version to any version less than
2.9.1
- Try creating a
paymentIntent
using Spring boot. (setspring.mvc.converters.preferred-json-mapper=gson
inapplication.properties
file before running the program) - An error will occur.
Expected behavior
Gson should be able to parse the JSON values of a stripe object when gson 2.8.9 or 2.9.0 is used.
Code snippets
java.lang.ClassNotFoundException: com.google.gson.ReflectionAccessFilter
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
</dependency>
OS
Windows 11
Java version
Java 17
stripe-java version
v24.0.0
API version
2023-10-16
Additional context
No response
Siddikpatel commented
Well, the gson 2.9.0 and 2.8.9 were released in 2022 and 2021 so they might didn't have this class.
remi-stripe commented
Just confirming that we document in our readme that you need gson 2.10.1 with stripe-java