Open thomasplevy opened 3 years ago
@eri-trabiccolo can you have a second look at this and let me know if you have any suggestions or if I've missed anything before we open this up for ~debate~ civil discussion
@thomasplevy:
2A. An order can be resumed if:
- It is a one-time order with the status of failed or pending
- It is a recurring order with the failed or pending status that has not yet received at least one successful transaction.
Can't we just say unify as: It is an order with failed or pending status with no transaction or if its last transaction status has failed
I'm very positive for all the rest.
I don't think that will work...
And I think I actually need to make it more complicated.
A recurring order that has 1 successful payment and then fails will, therefore, be resumable, but we don't want it to be.
We only want a recurring order that has 0 successful transactions and the "Failed" status to be resumable.
We also should consider the "On Hold" recurring status to be resumable.
So the language for this second bullet should actually read
Looks like a solid payments enhancement set. The new "timeout" status, resume option, and allowing the user to see failed transaction error reports from their dashboard after the fact makes a lot of sense for UX improvement.
In the case of a red site, could theme authors choose to provide color style options for checkout error messages? For example, a theme could choose to provide the ability for a red site (or any color site) to change red background error messages to dark yellow (or any other color) background color error messages?
In the case of a red site, could theme authors choose to provide color style options for checkout error messages? For example, a theme could choose to provide the ability for a red site (or any color site) to change red background error messages to dark yellow (or any other color) background color error messages?
Yes, of course. It's all CSS and actually in the site in question there's already CSS from the theme that's changing the style of the error message, but they haven't changed the color. Of course theme author's could do something about this. My point is that it's complicated to automatically identify visual problems like this from within our codebase. IT would actually probably be difficult for theme authors to do this too.
An author could give theme options for notice colors though. This would keep the "challenge" in the hands of the site owner (or their dev) but still give them a simple way to solve it.
I haven't seen any theme offer this kind of setting before but it would be a good and useful one (IMO). Most platform plugins like ours have notices so the functionality doesn't even have to be LifterLMS specific. WooCommerce has notices too.
We have 4 kinds of notices:
https://github.com/gocodebox/lifterlms/blob/trunk/assets/scss/frontend/_notices.scss
Recently some issues with the way initial transaction failures for orders are handled, this proposal attempts to (A) outline current behaviors and explain the engineering / architectural reasons behind current behavior, (B) expose problems and pitfalls encountered as a result of these current behaviors, and (C) develop a set of changes which can be implemented to improve the existing system to both maintain existing behavior without regression and solve the issues with this current system.
@eri-trabiccolo and I have talked about this quite a bit and this proposal is a summation of our discussion(s). We'd like to open this up to the team (and any watchers) to discuss before we commit to development
A. Current Behaviors
The main reasoning for item 4 is to enable the functionality found in item 1A. A failed transaction automatically fails the associated order, and a failed order cannot be resumed through this functionality.
The reason that failed orders cannot be resumed is mainly in order to prevent recurring orders that have reached the end of their automatic retry cycle from being resumed later. In most scenarios it may not matter if a failed recurring order is resumed, but, in some scenarios it would be preferable that a recurring order cannot be resumed.
As an example, consider a recurring payment plan with 4 monthly payments that allows access for one year. Should the 2nd payment fail, 3 months pass, and then a user was allowed to resume the plan, LifterLMS would resume access, although technically they would owe 3 more payments. LifterLMS does not treat this as a true payment plan so it does not track or attempt to charge "back payments" like this. Instead of doing this LifterLMS prevents the orders from being resumable at all. A user who wishes to regain access in this scenario must start over or contact the site administartor for special accommodations.
B. Problems with Current Behavior
C. Changes We Can Make
pending-timeouts
by default 3.C. New order notifications (likely just to the admin) can be added for timeouts?