CRM-11824 Pay later membership payment doesn't record a membership_payment

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.7
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      Here are the steps :

      • create a contribution page with pay later payment and only membership options
      • use the form to become a member, submit and confirm

      Result :

      • contribution is created
      • membership is created
      • there is no link between the contribution and membership (nothing in civicrm_membership_payment)

      Reproduced on demo site.

        Attachments

        1. CRM-11824.patch
          0.5 kB
          Samuel Vanhove
        2. Screen Shot 2013-02-04 at 7.09.37 PM.PNG
          73 kB
          David Greenberg
        3. Screen Shot 2013-02-04 at 7.09.54 PM.PNG
          52 kB
          David Greenberg

          Activity

          [CRM-11824] Pay later membership payment doesn't record a membership_payment
          Samuel Vanhove added a comment -

          After inspection :

          • it goes to CRM_Member_BAO_Membership::postProcess
          • the function CRM_Contribute_BAO_Contribution_Utils::processConfirm is called
          • $membershipResult is returned but never initialized in this specific case – not sure why but $form->_values['is_monetary'] = 0 in this case. If we remove this test, line 133, it works
          Samuel Vanhove added a comment -

          Ok is_monetary is 1 when doing a live transaction so it's ok to be 0 in this case.

          With my limited knowledge, here is a patch that work in my case. I don't know if there are cases where we don't want to return the contribution so please review.

          Donald A. Lobo added a comment -

          dgg:

          can u check logic and assign to yashi to implement

          David Greenberg added a comment -

          Samuel - I tried to reproduce this on my local 4.2 and 4.3 sandboxes, as well as on demo. In all cases the membership_payment record IS being created.

          On demo:
          1. Updated sample contrib page 2 to allow pay later
          http://drupal.demo.civicrm.org/civicrm/admin/contribute/amount?action=update&reset=1&id=2

          2. Made the pay later 'contribution' on that page
          http://drupal.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=2

          3. Checked the resulting membership record. It shows the linked Pending Pay Later contribution
          http://drupal.demo.civicrm.org/civicrm/contact/view/membership?action=view&reset=1&id=32&cid=102&context=home

          Are your steps different in some way ??

          Samuel Vanhove added a comment -

          Hi Dave - you need to disable "Execute real-time monetary transactions" in http://drupal.demo.civicrm.org/civicrm/admin/contribute/amount?action=update&reset=1&id=2

          David Greenberg added a comment -

          Hi Samuel - Why are you unchecking that box? The expected usage as explained in the on-screen help is:

          "Uncheck this box if you are using this contribution page for free membership signup ONLY, or to solicit in-kind / non-monetary donations such as furniture, equipment.. etc."

          ... and you can use ONLY Pay-later with the box checked.

          Since the business use case for the box being unchecked is FREE membership or in-kind donations - not sure it makes sense to create membership_payment record when the box is unchecked.

          Samuel Vanhove added a comment -

          Ok, Dave, my use case is that i do have membership fees but there is no real time transactions right now. We probably will add this but right now and for at least a few month the only choice is by sending a check. If it's a too specific use case, i suppose i can just add a hack in the meantime.

          David Greenberg added a comment -

          Samuel - Let's chat via IRC sometime today. You can definitely leave that box (Execute realtime transactions) checked and JUST offer Pay Later (no payment processors checked on Fees tab). I think that will do what you need - no hacking required.

          Samuel Vanhove added a comment -

          Ok, it works the way you describe. Thanks !

            People

            • Assignee:
              David Greenberg
              Reporter:
              Samuel Vanhove

              Dates

              • Created:
                Updated:
                Resolved: