Skip to content

Drop org.json: read webhook fields from the verified Stripe Event object #36

Description

@chaudhary-lakshay

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions