-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MemberPress subscription gateway not updating to "Pronamic" payment method #22
Comments
I'm not entirely convinced we need to fix this.
Why should we update the payment gateway of the MemberPress subscription to the "Pronamic" payment method? If users disable gateways, do they expect recurring payments to continue? And what if the "Pronamic" gateway is not active/available? I also find the code as in the PR a bit difficult to follow. If we want to continue with this, some clarification would be nice. Perhaps by introducing a helper function wp-pronamic-pay-memberpress/src/Extension.php Lines 253 to 278 in 5725cdb
|
Because we're only creating transactions for MemberPress subscriptions having a 'Pronamic Pay gateway'. Not updating the gateway will currently result in an expiring membership (as was the case in https://secure.helpscout.net/conversation/2670974885/27569) even though the recurring payment has been completed successfully.
I'd expect so and at least the user in https://secure.helpscout.net/conversation/2670974885/27569 did too, otherwise the membership should be cancelled if they no longer want to receive payments for it.
Then we're back at "we're only creating transactions for MemberPress subscriptions having a 'Pronamic Pay gateway'" and the the membership will expire, even though the next (possibly successful) recurring payment has already been started by Pronamic Pay. That is why I was wondering why we're only creating a MemberPress transaction if the gateway is 'ours'. If we do not want to create any recurring payments anymore if the gateway changes, it would be better to prevent the next recurring payment already, instead of starting the payment and not creating a corresponding MemberPress transaction to prolong the membership. |
This has been discussed @pronamic HQ, we will process payment method changes ( wp-pronamic-pay-memberpress/src/Extension.php Lines 253 to 298 in 5725cdb
wp-pronamic-pay-memberpress/src/Extension.php Line 309 in 5725cdb
|
When a recurring payment is created, we're updating the MemberPress subscription gateway to the one corresponding to the payment method of the recurring payment (if it exists). This ensures that the correct MemberPress gateway is listed in the admin and with subscription payments in the customer account.
For recurring payments, we also create a MemberPress transaction for the subscription, which MemberPress then uses to determine the membership status. However, we only create this transaction if the MemberPress subscription gateway is 'one of ours'.
We came across a case where:
Sei0x6-q2
as "Method" in the admin).As recurring payments are created for active Pronamic subscriptions for these memberships, the payment gateway of the MemberPress subscription should be updated to the "Pronamic" payment method. However, this doesn't seem to work for this payment method:
wp-pronamic-pay-memberpress/src/Extension.php
Lines 253 to 269 in 942843e
Because of this, the MemberPress transaction is not created, which results in an expiring membership.
This can be fixed by updating to either the "Pronamic" payment method or — with priority — the specific payment method, so that the
null
payment method is no longer ignored when updating the MemberPress subscription payment method.I'm also wondering why/if we should only create the MemberPress transaction if the gateway is one of ours? We might be able to remove this?
wp-pronamic-pay-memberpress/src/Extension.php
Lines 271 to 281 in 942843e
Internal Help Scout ticket: https://secure.helpscout.net/conversation/2670974885/27569
CC @remcotolsma
The text was updated successfully, but these errors were encountered: