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

Expand gateway-specific support for getting $pmpro_next_payment_timestamp, via API when possible #9

Open kimcoleman opened 3 years ago

kimcoleman commented 3 years ago

Is your feature request related to a problem? Please describe. The logic right now to retrieve and set $pmpro_next_payment_timestamp is specifically written for the Stripe and PayPal Express gateways. We should look to expand the gateway-conditional logic where possible.

Describe the solution you'd like Look at each gateway class in core PMPro to create methods for the pmpro_next_payment logic. Then, use those methods to set $pmpro_next_payment_timestamp more confidently, via The API, when possible.

The most straightforward gateway we can configure this for would be PayPal Website Payments Pro, which uses similar IPN logic as the existing PayPal Express logic already in this plugin.

mircobabini commented 2 years ago

This work may conflict with the "subs table" work we are doing. We should revisit after the subs table work is ready.