pronamic / wp-pronamic-pay-memberpress

MemberPress driver for the WordPress payment processing library.
http://www.wp-pay.org/extensions/memberpress/
4 stars 1 forks source link

Revise update account form feature #19

Open remcotolsma opened 4 months ago

remcotolsma commented 4 months ago

To update payment details for a subscription we currently have this in place:

https://github.com/pronamic/wp-pronamic-pay-memberpress/blob/4218e02826ab4ae3249aca3649a425ea5f4c97bd/src/Gateways/Gateway.php#L878-L929

It uses the mandate selection feature from https://github.com/pronamic/wp-pay-core.

If a payment method is chosen on the mandate change page from core for which no MemberPress gateway is active, a strange situation arises.

https://github.com/pronamic/wp-pronamic-pay-memberpress/blob/4218e02826ab4ae3249aca3649a425ea5f4c97bd/src/Extension.php#L253-L281

We may need to limit updating information to, for example, credit card information. Within MemberPress itself, the options for switching payment methods are limited:

Switch from PayPal to Stripe or Vice Versa

Sometimes a customer may have used PayPal or Stripe when they originally signed up, or they used Stripe and want to switch to PayPal.

If the customer is using PayPal and just wants to change the payment method, they can do this from within their PayPal account and do not need to switch to Stripe. But sometimes a customer will not want to update their PayPal account (or won't be able to access it anymore) in which case they would need to switch to Stripe.

In these scenarios, you would need to cancel their current membership and have them sign up again. You can have them wait until their current term ends (recommended), or if you want them to sign up again right away you will have to create a coupon for them to use to give them a prorated price.

https://memberpress.com/docs/how-to-change-a-customers-payment-method/

CC @rvdsteege