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

Recurring contributions show Failed in CiviCRM but completed in journal #413

Open
yashodha opened this issue Mar 7, 2023 · 7 comments
Open

Comments

@yashodha
Copy link

yashodha commented Mar 7, 2023

Is there a follow up on
#253

Some of our recurring contributions are showing as Failed in CiviCRM even though in the journal table status_id is updated as Completed. Somehow the civicrm contributions are not updated/sync. We ran the verify job as well still no update. The users get confused with this and try multiple recurring contributions which have all completed but show as Failed.

We are running Civi 5.19 /iats 1.7.4.

Is this behavior fixed in the later versions of iats/CiviCRM?

Should we be processing Failed contributions in addition to the Pending as well in this case?
https://github.com/iATSPayments/com.iatspayments.civicrm/blob/master/api/v3/Job/Iatsverify.php#L87

@adixon
Copy link
Contributor

adixon commented Mar 7, 2023

Are these credit card or ACH/EFT? Is this is one-time, occasional, or recurring issue?

Normally, I'd expect that a contribution marked as failed in CiviCRM to have been marked as failed in iATS as well (and the iats journal on CiviCRM should reflect what iATS thinks). There could be ways that a transaction is initially identified as failed by iATS and only later changed to completed, but I would expect that to be a weird edge case related to issues over at iATS.

@adixon
Copy link
Contributor

adixon commented Mar 7, 2023

Interestingly, a client just had a similar issue, maybe the same one. It was for a credit card transaction, which showed up on Feb 16 as Failed, but was showing as completed in the iATS journal.

The way I fixed it was:

  1. Update the contribution status to "Pending" (the interface wouldn't let me do this, so I did it with some sql, the pending status id is '2').
  2. Run the verify job, e.g. cv api3 job.iatsverify contribution_id=102672 [you could do it via the web gui as well].

As I think about it, it might be nice if you could do the verify without resetting the status to pending.

@shaneonabike
Copy link
Contributor

shaneonabike commented Mar 9, 2023

We have been experiencing this as well (CC payments)... once a month which is strange. I'm investigating whether some job is taking up resources but I haven't found anything just yet.

I was wondering if perhaps it could be good to create a new job that basically retrieves transactions that have passed (maybe configurable to how many days). Then these could then be put in the journal and verified against pending/failed transactions OR even in the future import the transactions done via iATS.

Ideally though, it would compare against existing transaction ids to see if there is already one in Civi and then change the status and all the rest.

@adixon
Copy link
Contributor

adixon commented Mar 9, 2023

Yes, the journal would be a useful tool for reconciling CiviCRM vs iATS. I'm not convinced you want it to be making any automated changes - these discrepancies point to issues as iATS that need attention. But some kind of button to fix these apparently failed transactions seems like a good idea.

@shaneonabike
Copy link
Contributor

Ahh! A button is a great idea that allows our clients to intervene to rectify this is a great idea. 👍

@yashodha
Copy link
Author

+1 on button or some way to reconcile the transactions.

@shaneonabike
Copy link
Contributor

I was thinking that maybe we could gleen a bit of what veda-consulting did for ncn-civi-zoom. They add a button to their form for entries that don't match an actual item.

@yashodha would you be willing to fund some of this work perhaps to get it going?

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

No branches or pull requests

3 participants