Page MenuHomePhabricator

[Epic] Architecture, separation of concerns and refactors in DonationInterface and SmashPig (2021)
Open, Needs TriagePublic

Description

General task for tracking current (2021) work to improve DonationInterface and SmashPig architecture, separation of concerns of stuff, and other refactors. (Includes investigation, planning and actual coding.)

Here's a place for notes.

See also T278171: Investigation: General architectural directions for FR-Tech stack.

I feel refactoring should and can be incremental, with each increment being a substantial improvement in code quality and maintainability in itself.

Including DI and SP together in this epic, since it seems many, maybe even most, refactors would touch both codebases, at least a little.

Thanks!!

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone

Event Timeline

We now have 2 (or 3) of 5 integrations using mostly SmashPig calls (the iffy one is Amazon) rather than direct DonationInterface->processor API logic. Once we get AstroPay and PayPal rewritten we will be able to remove a whole lot of base gateway adapter code.

We now have 2 (or 3) of 5 integrations using mostly SmashPig calls (the iffy one is Amazon) rather than direct DonationInterface->processor API logic. Once we get AstroPay and PayPal rewritten we will be able to remove a whole lot of base gateway adapter code.

Ah cool thanks, that's super important to consider! :) I was wondering how we might decide the best order for these (and maybe any other similar tasks we might decide to make..). Some tasks I feel could be broken down into investigation, planning and implementation subtasks... So, for example, for the GatewayAdapter refactoring, maybe we'd want to complete an investigation and make a plan before rewriting AstroyPay and PayPal, then do those rewrites taking that plan into account, and actually do the refactor (including the code superclass removal you mention) after old AstroPay and PayPal are removed... does that make sense?

Thanks again!! :) :)

We have to reintegrate PayPal next year. Not sure when D*Local will push us off our current (deprecated) integration, but we probably won't rewrite them till we have to. The 'remove globalcollect and refactor ingenico' task up there would be a good one to do in the meantime towards the same ends.

I think the goal would be to remove most all of the do_transaction, define_transaction, curl_exec logic (i.e. functions that set up specific API call structures, call cURL and handle repeats, and do processor-specific response parsing) from DonationInterface.

AndyRussG renamed this task from [Epic] Architecture, separation of concerns and refactors in DonationInterface (2021) to [Epic] Architecture, separation of concerns and refactors in DonationInterface and SmashPig (2021).Nov 4 2021, 9:39 PM
AndyRussG updated the task description. (Show Details)