strangerstudios / pmpro-cancel-on-next-payment-date

Change membership cancellation in Paid Memberships Pro to set expiration for next payment date instead of cancelling immediately.
https://www.paidmembershipspro.com/add-ons/cancel-on-next-payment-date
8 stars 8 forks source link

PayPal Express: No extension if payment failed, skipped or suspended #36

Closed mircobabini closed 2 years ago

mircobabini commented 2 years ago

All Submissions:

Changes proposed in this Pull Request:

Since the new policy is to immediately cancel when a (recurring) payment is NOT completed, there's no reason to still maintain a glue piece of code to make it work with the "Failed payment limit" addon: https://github.com/strangerstudios/pmpro-failed-payment-limit/pull/12/commits/910e0e1943fd8395de69ba9f10f58c8282be246b

Instead, simply don't extend if the condition is met. There are 3 cases on which we should immediately cancel:

They are described here: https://www.bahjeez.com/recurring-payments-ipns/

Other information:

mircobabini commented 2 years ago

Resolves https://github.com/strangerstudios/pmpro-failed-payment-limit/issues/11