-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(payment_methods_v2): add payment methods list endpoint #6938
base: main
Are you sure you want to change the base?
Conversation
…payment methods list" This reverts commit 70cb8a1.
#[cfg(feature = "v2")] | ||
PaymentMethodListForPaymentMethods { | ||
payment_method_id: id_type::GlobalPaymentMethodId, | ||
}, |
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.
Do we need this enum variant, is this being used anywhere?
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.
This is being used when we receive only global_payment_method_id
in the request
There are conflicts @Narayanbhat166 |
pub struct DefaultPaymentMethod { | ||
#[schema(value_type = String, max_length = 64, min_length = 1, example = "12345_cus_y3oqhf46pyzuxjbcn2giaqnb44")] | ||
pub customer_id: id_type::GlobalCustomerId, | ||
#[schema(value_type = String, max_length = 64, min_length = 1, example = "12345_pm_y3oqhf46pyzuxjbcn2giaqnb44")] | ||
pub payment_method_id: id_type::GlobalPaymentMethodId, | ||
} |
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.
What's the use case for a default Payment Method in v2?
Type of Change
Description
This PR adds payment methods list endpoint for payment methods endpoint for payment methods. This will be used to display the list of payment methods that are enabled by the merchant, and also the saved payment methods by the customer.
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy