Skip to content

fix(payment_request): Prevent payment creation when invoices are payment succeeded #3910

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

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

vincent-pochet
Copy link
Collaborator

@vincent-pochet vincent-pochet commented Jul 3, 2025

Context

When retrying a failed PaymentRequests::Payments::CreateJob (manually or automatically), we are not checking if the attached invoices are still ready for payment processing. This lead to a risk of duplicated payments.

Description

This pull request adds a new guard to the PaymentRequests::Payments::CreateService to early return when one of the invoice of the PaymentRequest is not flagged as ready_for_payment_processing

@vincent-pochet vincent-pochet merged commit 9aefd79 into main Jul 3, 2025
14 checks passed
@vincent-pochet vincent-pochet deleted the fix-duplicated-payment-request-payments branch July 3, 2025 11:45
diegocharles pushed a commit that referenced this pull request Jul 11, 2025
…ent succeeded (#3910)

## Context

When retrying a failed `PaymentRequests::Payments::CreateJob` (manually
or automatically), we are not checking if the attached invoices are
still ready for payment processing. This lead to a risk of duplicated
payments.

## Description

This pull request adds a new guard to the
`PaymentRequests::Payments::CreateService` to early return when one of
the invoice of the `PaymentRequest` is not flagged as
`ready_for_payment_processing`
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.

2 participants