-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Feature Description
Currently, the logic that filters out ineligible payment methods when listing available payment methods for the merchant, and the logic that filters out ineligible connectors for a particular payment have the same underlying validation checks involved. These validations checks are based on the same data, namely the merchant's connector account configuration and application configs. Yet, both the aforementioned pieces of logic use different implementations for carrying out said checks.
- The Payment Methods filtering logic makes use of handwritten code to check merchant configs and app configs
- The Eligibility Analysis during payments confirmation makes use of the Constraint Graph framework to carry out checks.
We want to essentially unify the aforementioned implementations such that both pieces of logic make use of the same implementation.
Possible Implementation
We can make use of the constraint graph framework to represent all the checks as a constraint graph. One thing to be aware of is that the Payment Methods filtering logic checks the eligibility of payment methods whereas the Eligibility Analysis checks the eligibility of a connector for a particular payment, i.e. the goals differ even if the underlying checks are based on the same data.
The Constraint Graph can be build in a way that's sensitive to the domain of the constraints, and hence is a viable approach for the implementation.
Have you spent some time checking if this feature request has been raised before?
- I checked and didn't find a similar issue
Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to submit a PR?
No, but I'm happy to collaborate on a PR with someone else