I've got an interesting puzzle on my hands.
A client's site (CiviCRM 4.7.x; Drupal 7.x) has stopped recording some recurring transactions.
The transactions show as settled successfully in AuthorizeNet but it seems that when AuthorizeNet sends that info back to civi, it's hitting an error.
This only happens with a small subset of recurring donations, the one thing they all share in common is that the donor, after making the initial donation, decided to change how much they want to give monthly.
If I look in Authorizenet, I see that in one case the initial payment was made for $20, then it was changed to $25. All payments have the right invoice id; contact id; and everything else necessary for civi to match them up correctly.
SELECT c.id, c.receive_date, c.financial_type_id, r.amount, c.total_amount FROM civicrm_contribution c RIGHT JOIN civicrm_contribution_recur r on r.id = c.contribution_recur_id where r.amount != c.total_amount;
shows all the records having this problem.
In those cases, I believe because the Amount in the expected recurrence is not the same as the amount in the data from Authorizenet they are not getting recorded.
Does anyone have any ideas for:
1: how to edit the existing data (either in the UI, or via SQL or the civi API) so it will work moving forward?
2: where I might start digging to find where this is happening and how I might fix it?
Thanks
CRM/Core/Payment/AuthorizeNetIPN.php
for easy reading :)