Merge pull request #13837 from eileenmcnaughton/event_conf
authorMatthew Wire <devel@mrwire.co.uk>
Sun, 14 Apr 2019 19:37:43 +0000 (20:37 +0100)
committerGitHub <noreply@github.com>
Sun, 14 Apr 2019 19:37:43 +0000 (20:37 +0100)
Create contribution before taking payment, per contribution page workflow

1  2 
CRM/Event/Form/Registration/Confirm.php

index 7ba4fdb95a0805d4669c656168d9c9bb652bb14f,71a3fd2bb8ca1c456e980dfeeca3edda26b49f79..bc800a62a5d4f61c6389efbfae848c577f0376a4
@@@ -973,9 -998,12 +998,12 @@@ class CRM_Event_Form_Registration_Confi
      }
  
      // CRM-20264: fetch CC type ID and number (last 4 digit) and assign it back to $params
+     // @todo remove this once backoffice form is doing it - front end is doing it twice.
+     // (in general they are sharing much more code than they should - anything that truly should be shared
+     // should not be on this class).
      CRM_Contribute_Form_AbstractEditPayment::formatCreditCardDetails($params);
  
 -    $contribParams = array(
 +    $contribParams = [
        'contact_id' => $contactID,
        'financial_type_id' => !empty($form->_values['event']['financial_type_id']) ? $form->_values['event']['financial_type_id'] : $params['financial_type_id'],
        'receive_date' => $now,