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

Free Membership still submits to payment processor

    Details

    • Documentation Required?:
      None
    • Sprint:
      Sprint 1
    • Funding Source:
      Core Team Funds

      Description

      Online contribution page configured for Membership signup and renewal.

      • If page is configured with a FREE membership type (either via quick config on Membership tab OR via a Price Set)
      • AND page uses PayPal Pro OR PayPal Standard

      The billing block is hidden when $0 membership is selected (as desired).

      However, for both PayPal Std and PayPal Pro - the transaction is submitted to the processor (this is incorrect). The actual behavior and resulting errors are different for Pro and Std.

      1. For PP Std - a fatal error is thrown:
      ./Core/Payment/PayPalImpl.php:748: CRM_Core_Error::fatal(ts('Please set the API URL. Please refer to the documentation for more details'));

      2. For PP Pro - the transaction appears to go through to PayPal (since w/ invalid credentials I get the expected error back from PayPal : Error message: 10002: Security error Security header is not valid).

      3. If only PayPal Express is configured as the processor for the contribution page, the PayPal Express button (which is the billing block contents) is hidden when user selects a $0 membership. However there is then no submit ("Contribute") button. In this case the dynamic logic needs to SHOW the Contribute button when the PP Express button is hidden.

      4. For Authorize.net it sends to the processor and returns an error that there is no card number, effectively the same situation as PP Pro.

      5. Using price-set, "Payment Method(s)" options are not hidden when Total Amount is $0.00 unlike quick-config.

      6. Using non-required quick-config membership set, payment section is not hidden. (Also ensure the behavior when Contribution other amount is enabled)

      ---- Original Post ----
      On a membership registration page, when a free membership is included the credit card payment details don't get hidden or removed. I am able to click through to next screen without filling out CC details, but it's confusing to potential new members.

      The following was added too: templates/CRM/Contribute/Form/Contribution/MembershipBlock.tpl and it works with using the member types but still displays using price-set.

      var memAmount = cj('input:radio[name='+priceSetName+']:checked').attr('data-amount');
      if ( memAmount == '0.00' )

      { cj('#billing-payment-block').hide(); }

      else

      { cj('#billing-payment-block').show(); }

        Attachments

        1. membership-080615.jpg
          66 kB
          Sanjay Jain
        2. test-free-membership-civi46.png
          61 kB
          Dana Skallman

          Issue Links

            Activity

              People

              • Assignee:
                andrewhunt Andrew Hunt
                Reporter:
                tadpole Tadpole Collective
              • Votes:
                2 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: