Cancel subscription fails on CiviCRM < 5.25
There are to issues with cancelSubscription that affects the extension when working in a CiviCRM lower than 5.25. The first one is just a Class 'PaymentProcessorException' not found
that can be fixed by replacing this line:
throw new PaymentProcessorException("cancelSubscription requires the recurProcessorID");
with:
throw new \Civi\Payment\Exception\PaymentProcessorException("cancelSubscription requires the recurProcessorID");
By doing so, a this error message starts being shown when trying to cancel a recurring contribution (with the notification to Stripe enabled):
cancelSubscription requires the recurProcessorID
I'll post a comment below with a fix that's working for me, so it can be discussed. If it looks correct, I'll send a merge request.
Versions
- CiviCRM 5.24.4
- Stripe 6.4.2
- MJWShared 0.8.1
- Firewall 1.0.3