PaymentService verifies the webhook signature via Webhook.constructEvent(...) and then re-parses the raw payload with new JSONObject(payload) — the org.json dependency exists only for this. Read ids/receipt_url off the deserialized Event object (event.getDataObjectDeserializer()) instead and delete the dependency.
Bonus: removes the "Found multiple occurrences of org.json.JSONObject on the class path" warning in tests (clashes with spring-boot-test's android-json).
PaymentServiceverifies the webhook signature viaWebhook.constructEvent(...)and then re-parses the raw payload withnew JSONObject(payload)— theorg.jsondependency exists only for this. Read ids/receipt_url off the deserializedEventobject (event.getDataObjectDeserializer()) instead and delete the dependency.Bonus: removes the "Found multiple occurrences of org.json.JSONObject on the class path" warning in tests (clashes with spring-boot-test's android-json).