dev/core#927 Move cancelling of related memberships to extension from BaseIPN
This moves the code to cancel memberships on a related contribution cancel to the contributioncancelactions
core extension.
Before
The cancellations are done using convoluted & elsewhere duplicated logic in BaseIPN
using convoluted input params
After
When a contribution is updated & the status_id of 'Cancellled' is set then
the hook will kick in, look for any related pending memberships and cancel them.
The test demonstrates that the api call will ensure related pending memberships
are cancelled.
Note that I am using line_items table to get the membership - we have been storing this
membership_payment link there for log enough it should be reliable but if there
are remaining data issues then this is a lower risk flow to flush them out.
Also note that once this is cleaned up I'll move to the 2 other flows I'm aware of
Order.create api & Contribuion form edits