added intentbased pg
This commit is contained in:
@@ -177,5 +177,14 @@ public class Helper {
|
||||
user.setAge(request.getAge());
|
||||
return user;
|
||||
}
|
||||
|
||||
public <T> T convertJsonToObject(String json, Class<T> clazz) {
|
||||
try {
|
||||
return objectMapper.readValue(json, clazz);
|
||||
} catch (Exception e) {
|
||||
throw new CustomException("Invalid JSON from payment API", "FAILED", 400, json);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user