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

invoice: Fix issue when transititionning a (invoice) REFUND from PEND… #1457

Merged
merged 1 commit into from Jul 14, 2021

Conversation

sbrossie
Copy link
Member

…ING -> SUCCESS. See #1453

The test written for #1453 showed that we need a similar mechanism we have in place for ATTEMPT,
where we support having a row into invoice_payments table with a success=false to support cases
for PENDING ATTEMPT.

We now, have a similar mechanism in place for REFUND with this fix, and the beatrix test was updated to reflect
that upon creating the PENDING refund we now get a INVOICE_PAYMENT_ERROR event and later when doing the
notifyPendingTransactionOfStateChangedWithPaymentControl we see the INVOICE_ADJUSTMENT.

TODO:

  • The same logic is missing for CHARGEBACK
  • We should aggregate this code as this is realy the same logic for all 3 use cases

…ING -> SUCCESS. See #1453

The test written for #1453 showed that we need a similar mechanism we have in place for ATTEMPT,
where we support having a row into `invoice_payments` table with a `success=false` to support cases
for PENDING ATTEMPT.

We now, have a similar mechanism in place for REFUND with this fix, and the beatrix test was updated to reflect
that upon creating the PENDING refund we now get a `INVOICE_PAYMENT_ERROR` event and later when doing the
notifyPendingTransactionOfStateChangedWithPaymentControl we see the `INVOICE_ADJUSTMENT`.

TODO:
* The same logic is missing for CHARGEBACK
* We should aggregate this code as this is realy the same logic for all 3 use cases
@sbrossie sbrossie requested a review from pierre July 13, 2021 21:44
Base automatically changed from fix-for-1453 to master July 14, 2021 12:16
@sbrossie sbrossie merged commit 8cc3d0d into master Jul 14, 2021
@pierre pierre deleted the fix-for-1453-ext branch July 29, 2021 07:25
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.

None yet

2 participants