CRM-9036 Incorrect handling of cancelled automated recurring transactions

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.4.5
    • Fix Version/s: 4.1.0
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      When a automated recurring contribution that was submitted to the Authorize.net payment processor gets canceled on the Authorize.net system, the later handling of the related silent post URL message is incorrect.

      To reproduce this issue:
      1) Click the "Contribution" tab for a contact, then click "Submit Credit Card Contribution" and create a recurring schedule of $10. per month. ( either open ended, or a fixed number of installments.)

      2) Wait for the first installment to be processed successfully by Authorize.net

      3) Login to the Authorize.net website and cancel the rest of the "ARB" subscription. Leave the first and only successful installment alone, do not reverse it.

      4) Wait for the "silent Post URL" message from Auth.net to be sent to CiviCRM.

      Look at the contribution record in CiviCRM. The transaction # is correct, and record in the table "civicrm_contribution_recur" has the correct status of "canceled"

      However, At this point the status of the contribution record is now incorrectly listed as "canceled" even though the first transaction was completed successfully.

        Attachments

          Activity

          [CRM-9036] Incorrect handling of cancelled automated recurring transactions
          Sarah Gladstone added a comment -

          Some more details:
          In the case where 2 installments have processed successfully before the ARB subscription was canceled, then CiviCRM will incorrectly change the status of the oldest/first installment to "canceled"

          Donald A. Lobo added a comment -

          Can you try this patch please and let us know.

          I'm curious if there is an error message displayed on screen if your very first recuring contribution fails

          Sarah Gladstone added a comment -

          I applied the patch. But I will will not know the results until the next cycle is processed by Authorize.net sandbox.

          Donald A. Lobo added a comment -


          If that does not fix it, please comment and we'll reopen the issue

          Sarah Gladstone added a comment -

          From what I can observe, Authorize.net does not process the first transaction of a subscription until about 3am the next day from when the subscription was initiated by CiviCRM.

          From speaking to a customer service person at Authorize.net, they mentioned that their system will automatically suspend any subscription if the very first transaction fails. However, they consider "suspended" (which seems to always be system triggered) as a different status from the "canceled" status.

          They said the only way a subscription can get cancelled is by a staff member of the non-profit logging into the Authorize.net account and cancelling the subscription using a hyperlink within the Auth.net account. However, this statement seems false as my client has had a number of subscriptions canceled with no action by the non-profit.

          Sarah Gladstone added a comment -

          The patch fixed one issue but broke another.

          The good: With the patch: The completed contribution record is no longer marked as "cancelled"

          The bad: With the patch: The record in table "civicrm_contribution_recur" is no longer is updated at all. ( I would like to see the status here changed to "cancelled" or "failed" or whatever is reported from Authorize.net

          Donald A. Lobo added a comment -

          Since you have a working sandbox, can you please take a look at the code, debug and submit a patch. The code is here:

          CRM/Core/Payment/AuthorizeNetIPN.php, search for CRM-9036

            People

            • Assignee:
              Donald A. Lobo
              Reporter:
              Sarah Gladstone

              Dates

              • Created:
                Updated:
                Resolved: