Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(firestore-stripe-payments): Update payments collection for refunds #650

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

chetbox
Copy link
Contributor

@chetbox chetbox commented Jan 6, 2025

Resolves #315

Updates the charges property in the payments collection.

Requires adding the charge.refunded webhook handler event.

Screenshots from Firebase Console

Tested by deploying a local copy of the extension in our Firebase test environment.

charges.data[0] property of a payment before refund:

image

charges.data[0] property of the same payment after refund:

image

Edit: I realised that a retrieving a Payment Intent does not include the charges list and it's not listed in the Payment Intent object. The charges key does appear in the payments collection, however, so I've updated this change to find and update the Charge object in charges when the charge.refunded data is received.

Edit 2: I formatted the new code with Prettier and removed the package-lock.json changes.

@chetbox chetbox force-pushed the refunds branch 3 times, most recently from e14adbb to b4c6ca5 Compare January 9, 2025 12:52
Requires adding the `charge.refunded` webhook handler event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refunded state
1 participant