Metaissue for ensuring our preferred order->pay->createPayment flow is used everywhere.
We have long had the principle (since 4.6 was pre-alpha) that we want to work towards the following flow at a code level.
- Create a pending Order using Order.create api
- Optionally process a payment against that order using PaymentProcessor.pay api
- Create a payment record (either from above or just recording an offline payment) using Payment.create api
The expectation is that the code correctly creates a pending contribution (order) with all the related entities when Order.create is called.
When a payment is added the related entities are updated & if appropriate notification emails are sent out.
(Note an earlier iteration of this was to create a pending contribution always & then update it with contribution.completetransaction - this maps to the above as the Order.create creates the pending contribution and Payment.create calls contribution.completetransaction when the payment completes the order).
This issue is a metaissue to link to & categorise all the things that need to be done to reach this. 'High' Priority are any issues that stand before people adopting the recommended flow.
|Document order api / Pseudoentity||In progress||High||-||At the sprint this was startedCurrent tweak|
|Identify any issues that would block someone moving off a non-preferred flow to our preferred flow||Started||High||This is really what this issue is about|
|Update payment instrument id when adding a payment to a pending order||To discuss||High||Discussion||#81 and possibly #47|
|PR||High||Needed to ease adaption to us deprecating creating Orders as non-pending pr|
|Fix identified core bug on ParticipantPayment creation||To do||High||Tests not yet passing||#74|
|Done||High||PR - since we have agreed for policy (not technical) reasons to do this we should try to get a test & merged|
|Consider generating default invoice ID in Order.create||To do||Medium||Discussion||#78|
|Done - could do more maybe||Medium||#82|
|Deprecate & remove calls to CRM_Contribute_BAO_Contribution::addPayments||To do||Low||This is part of consolidating all payment creation on Payment.create|
|Fix all remaining places in core to create a pending contribution/order & then complete||Needs chipping away at - tacking events at the moment||In progress||Low||#53|