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?


  • I found where this is happening, as I thought it's a number mismatch. line 121 of AuthorizeNetIPN.php ` // At this point $object has first contribution loaded. // Lets do a check to make sure this payment has the amount same as that of first contribution. if ($objects['contribution']->total_amount != $input['amount']) { CRM_Core_Error::debug_log_message("Subscription amount mismatch."); echo "Failure: Subscription amount mismatch<p>"; return FALSE; }` adding in a way of allowing this seems simple but the big question is is it a stupid idea
    – ericG
    Nov 6, 2017 at 23:54
  • CRM/Core/Payment/AuthorizeNetIPN.php for easy reading :) Nov 7, 2017 at 0:47
  • thanks Chris. Still getting the hang of how stack exchange works/formats comments
    – ericG
    Nov 7, 2017 at 4:53
  • No problem! Looks like that code has been around a long time! Generally I think the plan is to get processors out of core. Nov 8, 2017 at 5:51
  • I opened a JIRA issue and will submit a patch for review to see "is it a stupid idea" :) issues.civicrm.org/jira/browse/CRM-21492 Nov 28, 2017 at 21:11


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.