Subject: | cleanup _pre_submit kludge eventually |
Show quoted text
> - Used feedback from MSCHWERN / Bug #22074 to cleanup
new/_pre_submit more
Show quoted text> Definitely agree having modules use SUPER would be
cleaner/safer/better.
Show quoted text> Ivan, we should consider this idea very seriously.
I'm totally on board, I just think we need to keep the existing kludge
until most/all modules have switched over to the New Way. I
definately
do not want each module to have to update to take advantage of fraud
detection.
We should:
1. Define exactly what the New Way is.
The current idea I guess is gateway modules should call
"SUPER::submit" at the beginning of their own "submit" method, if
they
supply a "submit" method? Seems a little strange to me to do that
at
the beginning rather than end of a method, as long as they need to
make changes, do we want to have them call something besides
SUPER::submit instead? I suppose we also need to have them check
the
return value and return immediately if false, like B:OP:new sets up.
Lastly, we probably need to have them set some sort of flag that
tells the base class the kludge isn't needed for this class.
"sub_calls_submit_callback { 1; }" ?
(Tangent: At some point, gateway subclasses should probably provide
some meta-data for introspection,
i.e. "supports_cc", "supports_ach",
"supports_failure_status", "supports_voids", etc.)
2. Move one gateway module over to it. Make sure it works! Document
the change(s)s necessary to at the top of the
notes_for_module_writers_v3 file (this would be the most
important/only mandatory change for v3, so should put it up top and
label it prominently.)
3. Release a proper 3.00 non-developer release. Wait.
4. Deprecate the old way. Have B:OP issue a warning when it still has
to run the _pre_submit kludge for a module.
5. Wait.
6. After most/all gateway modules have updated, remove the old way.