Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-8719

membership triggers transaction on 0 value (authorize.net, possibly others)

    Details

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

      Description

      We have a contrib page setup where we are collecting membership and also a separate contribution amount. The list of membership options all have a minimum fee, with the exception of one option, which is a free level.

      Because we have membership + contrib, and they are attributed to different contrib types, doDirectPayment is called twice. I suspect that because some memberships do have a fee attached to them, we trigger the transaction regardless of the option selected.

      that means we trigger doDirectPayment even for the free option, which results in an error from the processor: Payment Processor Error message: 1:5 A valid amount is required — because a 0 value is not accepted. The contrib records appear to be saved correctly. but when that error occurs, the user is sent back to the form instead of the thank you page, and tempted to resubmit, which creates problems.

      i've fixed by adding the following directly inside the Authorize.net doDirectorPayment method:

      if ( $params['amount'] == '0.00' )

      { $params['gross_amount'] = $params['amount']; return $params; }

      but I suspect we should probably add that exclusion higher up in the code. i'm just unsure where.

        Attachments

          Activity

            People

            • Assignee:
              rajan Rajan P Mayekar
              Reporter:
              lcdweb Brian Shaughnessy
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h