Recording one payment against a "Pending (Incomplete Transaction)" results in two payments
To replicate:
- Create a pending contribution (via API, more on this below).
- Record a payment against the contribution.
- Note that two payments are created - one for the full amount, one for the partial amount.
I investigated why this didn't happen via the UI, and it's because the UI creates "Pending (Pay Later)" records. If you pass is_pay_later = 1
via API, this bug doesn't occur.
The "Pending (Incomplete Transaction)" generates a record in civicrm_financial_trxn
, which seems odd if the payment didn't happen - but if that IS correct, it should be consistent about whether it appears when you view payments in the UI.