-
Notifications
You must be signed in to change notification settings - Fork 24
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
Set order status to failed for testing failed recurring payments. #40
Set order status to failed for testing failed recurring payments. #40
Conversation
Hey @peterwilsoncc, Thank you for the PR! I tested your change locally by:
but the created subscription was set to 'Pending Payment' -- same as before your change. Moreover, having a look at a Subscription, I noticed that it doesn't have a 'Failed' order status: Only Orders have a 'Failed' status. If I manually set an order to 'Failed', then the respective Subscription is put 'On hold'. Can you please have another look? Moreover, can you please provide some more details about why a 'Pending payment' status is not ideal for failed Subscriptions? |
4096675
to
1f04d28
Compare
This occurred to me overnight, the This removes the exceptions from this gateway but I think that's fine as it matches the behavior of gateways I've tested (Stripe, WooPayments, Braintree). If you wish, I can add
This is correct. Subscriptions hooks on to
The difference between pending payment and failed payment statuses is a little subtle. In testing various gateways, the difference is:
If you wish, I can add a |
Hey @peterwilsoncc, Thank you for the additional details! I tested your changes and now, when using the block-based checkout, a fatal error is triggered:
As you can see here, the Moreover, if you want to add special handling for Subscriptions inside |
@jimjasson I've pushed the following changes in 554d535
This removes the fatal error you were seeing last week while testing this PR and allows subs to handle payment retries for recurring payments. |
What I tested with the dummy gateway (DG) and block cart & checkout:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the testing described in my previous comment, I think the change looks good. Thanks!
This sets the status of a failed recurring payment to
failed
when testing a failing gateway.Woo Subscriptions hooks in to the status transition when the payments fail to trigger features such as the automatic retry of failed payments.
Fixes #38.