Skip to content
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

[WOOSUBS] Improve handling of renewal orders with SEPA payments? #143

Closed
davdebcom opened this issue Aug 14, 2017 · 13 comments
Closed

[WOOSUBS] Improve handling of renewal orders with SEPA payments? #143

davdebcom opened this issue Aug 14, 2017 · 13 comments

Comments

@davdebcom
Copy link
Contributor

@JorikMollie and I were discussing the issue where shop-customers did not have access to an online community (WooCommerce & WooCommerce Subscriptions) when their subscription was being renewed. I understand that this issue has been discussed at Mollie in the past but no solution was implemented. It was also mentioned in issue #108.

The issue happens because subscriptions are set to 'on-hold' when a renewal order is created. This is normal behaviour for WooCommerce subscriptions.

In the case of credit card payments, this is not a problem because getting the status for that payment is a lot faster. But in the case of SEPA Direct Debit payments, processing them takes some time, and during this time shop-customers don't have access to an online community, downloads etc etc.

Jorik, the WooCommerce support team and I think this should be solved by changing the subscriptions status (for subscriptions with a renewal order and SEPA payment) to active after the renewal payment is initiated.

From WooCommerce:

For now, you could have the iDEAL team change the subscription's status if it gets a valid authentication or something else prior to actually capturing the payment.


If we implement this, I believe it would be in this function:
https://github.com/mollie/WooCommerce/blob/master/mollie-payments-for-woocommerce/includes/mollie/wc/gateway/abstractsubscription.php#L167

I think we should also consider giving preference to creditcard mandates here, as this would solve the issue for customers that have an iDEAL/SEPA and creditcard mandate. Advantage: creditcard payments are faster, disadvantage: they are also more expensive.
https://github.com/mollie/WooCommerce/blob/master/mollie-payments-for-woocommerce/includes/mollie/wc/gateway/abstractsubscription.php#L213-L229

Payment for that subscription/renewal order is created here:
https://github.com/mollie/WooCommerce/blob/master/mollie-payments-for-woocommerce/includes/mollie/wc/gateway/abstractsubscription.php#L225

After the payment is created we can check if the payment is for SEPA Direct Debit, and if yes, set the subscription status to 'Active'.

If the payment fails, the renewal order will be set to failed by WooCommerce and the subscription will be set to 'on-hold' again, so it seems to be a solid solution.

Are there use-cases in which this change would not be ideal? Any feedback would be appreciated.

@ndijkstra
Copy link
Contributor

I think this is a good solution, also it's more clear for the merchants that the status is active instead of on-hold.

@davdebcom
Copy link
Contributor Author

Tomas via mail:

Het klinkt mij eigenlijk wel logisch en als een goed oplossing. Voor mij zijn er dan ook geen situaties bekend waarbij dit een probleem zou kunnen opleveren.

@Antal72
Copy link

Antal72 commented Aug 17, 2017

This would be an ideal solution. Much clearer to have an active status when using SEPA debit for memberships.
(Big thumbs up voor jullie, Dave en Jorik!)

@davdebcom
Copy link
Contributor Author

Making progress:
edit subscription e2 80 b9 woo 3 0 e2 80 94 wordpress 2017-08-23 14-39-50

@davdebcom
Copy link
Contributor Author

@Antal72 Fixed in 2.6.1, please consider contributing by testing this beta 😄
https://github.com/mollie/WooCommerce/releases/tag/2.6.1-beta

I would also like to point out:
http://www.subscribepage.com/mollie-for-woocommerce-testers

@Antal72
Copy link

Antal72 commented Aug 23, 2017

@davdebcom Thanks David, will install the beta. On sept 1 the subscriptions renew, will report back :D

@Jan-Paul-Kleijn
Copy link

Dear people from Mollie,
Don't you think it's wise to contact Prospress to see if such adjustments have an impact on the WCS plugin?
Perhaps then you would not be making a plugin that is not compatible with WCS.

@davdebcom
Copy link
Contributor Author

The goal is to always support completely WooCommerce and WCS. That's what I also test extensively with every change I make. And as you can read in the first comment in this issue, WooCommerce has been consulted.

@Jan-Paul-Kleijn
Copy link

If that is your goal, perhaps also consultation with Prospress (the creator of WCS) would be advisable in the future?

@davdebcom
Copy link
Contributor Author

At that time communication and support for WCS ran via WooCommerce, so contacting WooCommerce is the same as contacting Prospress. It was likely a Prospress employee that replied to our request. It's just that WooCommerce requires sellers on the market place (at that time) to communicate via their support system (I kno this because I am also a seller on the WooCommerce marketplace).

@Jan-Paul-Kleijn
Copy link

Grand! So in the future you will be communicating directly with Prospress?

@davdebcom
Copy link
Contributor Author

Yes, off course 👍

@ibrahimonder
Copy link

ibrahimonder commented Dec 26, 2018

So what if a payment has failed and the retry system of WooCommerce Subscriptions is firing off? This isn't a correct implementation then and needs a further implementation.

Now whenever the first attempt of a SEPA has failed. WooCommerce Subscription will attempt this again, in total 5 times. Imagine waiting for a SEPA 5 days for a charge and it fails all the attempts? The member will have acces to the site for over a month while nothing gets charged.

I've started a new thread to discuss #269.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants