Skip to content

payment_succeeded overwrites payment_failed doc #711

@albsinger

Description

@albsinger

Bug report

  • Extension name: [e.g. firestore-stripe-payments]

Describe the bug

when a payment fails and then succeeds, the extension creates a doc with the same id as the prior one, overwriting it, instead of creating a new one. This means that the failed payment is not recorded in the db as it is overwritten by the successful one.

To Reproduce

make a failed payment then within the same checkout session (I think) create a successful one.

Expected behavior

create docs with separate ids for each payment failed or succeeded so the entire history is logged.

Screenshots

System information

Additional context

This created a downstream bug for me, as I update user accounts based on documents created, but given that the latter document "created" is actually an update, the user account doesn't update unless I change my code to update the user account on document updated as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions