-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat(router): add debit routing support for saved card flow #7923
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(router): add debit routing support for saved card flow #7923
Conversation
…pay/hyperswitch into debit-routing/save-card-flow
I also don't see the logs that's present in test cases |
|
"Failed to parse payment method data in payment method info" | ||
); | ||
}) | ||
.ok() |
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.
is this intentional?
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.
Yes, since this will be used to retrieve the payment method data in the saved card flow, if parsing fails, instead of breaking the flow, we will simply skip debit routing.
3be182e
into
debit-routing/add-core-logic
Type of Change
Description
Once debit routing is performed for a card and the card is saved in the payment, we can also store the debit routing output. This allows us to reuse the saved data in future saved card flows instead of re-running the debit routing process.
Changes:
In this PR, support for co-badged card data has been introduced. This data will be stored in the payment_method_data column of the payment_methods table and will contain the debit routing output.
In the saved card flow, we check if the co-badged card data is present in the payment_method_data of the payment method. If it is present, the same data will be sent to the open router for debit routing.
If the co-badged card data is not available, then the card_isin, which contains the card BIN, will be used to call the open router.
Additional Changes
add debit routing support for saved card flow
Motivation and Context
How did you test it?
Tested locally by creating dummy co-badged card bin dump
-> Create a merchant account and business profile
-> Enable debit routing and provide merchant business country for the business profile
-> Create a payment
-> Connector request indicating the card brand as star

-> Create a payment for the same customer
-> list payment methods for the same customer
-> Confirm the a payment with the payment token
-> Logs showing the debit routing flow was triggered with the previously saved co-badged card data


-> Logs showing the card brand was set star in the connector request
Checklist
cargo +nightly fmt --all
cargo clippy