-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(router): add pre-confirm payments eligibility api #9774
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
base: main
Are you sure you want to change the base?
feat(router): add pre-confirm payments eligibility api #9774
Conversation
…tch into add-eligibility-post-api
Changed Files
|
pub struct PaymentsEligibilityRequest { | ||
/// The identifier for the payment | ||
#[serde(skip)] | ||
pub payment_id: id_type::PaymentId, |
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.
Why we are adding serde skip and include payment_id field? The path only contains this field and not the payload. Remove this field
// Trait for Eligibility Checks | ||
#[cfg(feature = "v1")] | ||
#[async_trait::async_trait] | ||
trait EligibilityCheck { |
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.
How EligibilityCheck
is polymorphic?
|
||
#[cfg(feature = "v1")] | ||
impl EligibilityPipeline { | ||
pub async fn run( |
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.
Use function name respective to domain, these functions represents some kind of framework representation but there is no actual framework around this.
Type of Change
Description
Payments Eligibility API
This PR introduces the Payments Eligibility API, which is invoked by the SDK after the payment method data filled event. The API pre-processes the submitted payment method data to determine the appropriate next action and checks eligibility based on various parameters.
As part of this change, blocklist checks have been added to the eligibility flow to ensure that ineligible or restricted payment methods are identified early in the process.
Additional Changes
Motivation and Context
How did you test it?
Tested Manually
CURL
Response
CURL
Response
CURL
Response
Checklist
cargo +nightly fmt --all
cargo clippy