Problem/Motivation

We are having duplicate -Direct 2c2p- payments and we're suspecting a race condition that leads to having duplicate payments

The race condition we're suspecting is between onNotify and createPayment

Steps to reproduce

Create a delay before saving the payment inside create payment and let onNotify creates the payment and complete it
This will lead to a duplicate payments with completed state

Proposed resolution

Add a check inside createPayment for existing completed payments and prevent save if it exists

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

abdelrahman khlefat created an issue. See original summary.

abdelrahman khlefat’s picture

redwan jamous’s picture

Merged. Thanks!

redwan jamous’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.