feat(router): collect customer address details based on business profile config regardless of connector required fields#5418
Merged
likhinbopanna merged 23 commits intomainfrom Aug 22, 2024
Conversation
…ile config regardless of connector required fields
de1ba8f to
12c488d
Compare
12c488d to
c2bb0a8
Compare
…actor/express-check-out
…ping_details_from_wallet_connector_if_required
SamraatBansal
previously approved these changes
Jul 29, 2024
| ), | ||
| ] | ||
| ), | ||
| common: HashMap::new(), |
Contributor
There was a problem hiding this comment.
Are these changes tested with Express Checkout and Klarna as well?
Comment on lines
+1496
to
+1501
| pub collect_billing_details_from_wallet_connector_if_required: Option<bool>, | ||
|
|
||
| /// A boolean value to indicate if customer shipping details needs to be collected from wallet | ||
| /// connector irrespective of connector required fields (Eg. Apple pay, Google pay etc) | ||
| #[schema(default = false, example = false)] | ||
| pub always_collect_shipping_details_from_wallet_connector: Option<bool>, |
Contributor
There was a problem hiding this comment.
Optional Suggestion:
Suggested change
| pub collect_billing_details_from_wallet_connector_if_required: Option<bool>, | |
| /// A boolean value to indicate if customer shipping details needs to be collected from wallet | |
| /// connector irrespective of connector required fields (Eg. Apple pay, Google pay etc) | |
| #[schema(default = false, example = false)] | |
| pub always_collect_shipping_details_from_wallet_connector: Option<bool>, | |
| pub collect_billing_details_from_wallet_connector_if_required: Option<bool>, | |
| /// A boolean value to indicate if customer shipping details needs to be collected from wallet | |
| /// connector irrespective of connector required fields (Eg. Apple pay, Google pay etc) | |
| #[schema(default = false, example = false)] | |
| pub collect_shipping_details_from_wallet_connector_always: Option<bool>, |
Narayanbhat166
previously approved these changes
Jul 31, 2024
3fc422d
…actor/express-check-out
…y/hyperswitch into refactor/express-check-out
ea7d699
…y/hyperswitch into refactor/express-check-out
Contributor
There was a problem hiding this comment.
nit: nothing critical. but it would be great if you merge these 2 migrations
NishantJoshi00
previously approved these changes
Aug 22, 2024
NishantJoshi00
approved these changes
Aug 22, 2024
Narayanbhat166
approved these changes
Aug 22, 2024
SamraatBansal
approved these changes
Aug 22, 2024
Chethan-rao
approved these changes
Aug 22, 2024
14 tasks
pixincreate
added a commit
that referenced
this pull request
Aug 23, 2024
* 'main' of github.com:juspay/hyperswitch: feat(connector): [Adyen] add dispute flows for adyen connector (#5514) chore(version): 2024.08.23.0 feat(router): [cybersource] add disable_avs and disable_cvn flag in connector metadata (#5667) feat(customer_v2): add route for customer retrieve v2 (#5516) chore(version): 2024.08.22.1 fix(router): [Adyen] prevent partial submission of billing address and add required fields for all payment methods (#5660) docs(README): Adding Contributors guide (#5184) Docs: Adding redirect url details (#5507) feat(global_id): create a `GlobalId` domain type (#5644) feat(router): collect customer address details based on business profile config regardless of connector required fields (#5418) feat: add new routes for profile level list apis (#5589) refactor(core): Refactor fallback routing behaviour in payments for v2 (#5642) refactor(router): add connector_transaction_id, send response body and use admin_api_auth_with_merchant_id for payments manual update flow (#5658)
This was referenced Sep 19, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Currently, we have business profile fields (
collect_shipping_details_from_wallet_connectorandcollect_billing_details_from_wallet_connector) which will collect the address details from the wallet during the session call. Additionally, the address fields will be added to the payment method list, but only if these flags are enabled and the connector requires it.This change is to collect address details (both billing and shipping) based on the merchant's requirements, regardless of the connector's required fields. The above details describes the behaviour of the payment method list and the session call based on the
Always collect address details,Collect address details only if required by connector, andConnector required fields.Always collect address detailsfields for this arealways_collect_shipping_details_from_wallet_connectorandalways_collect_billing_details_from_wallet_connectorCollect address details only if required by connectorfields for this arecollect_shipping_details_from_wallet_connectorandcollect_billing_details_from_wallet_connectorAdditional Changes
Motivation and Context
How did you test it?
-> Create a merchant connector account for cybersource and enable the below payment method
-> Create a payment with confirm false
Test case 1
-> Perform merchant payment method list
-> Session call
-> For test purpose I have kept the shipping details in the connector required fields of apple pay boa
Test case 2
-> Session call
-> Pml list
Test case 3
-> Create payment with confirm false
-> Session call
-> Pml
Test case 4
-> Create payment with confirm false
-> Session call
-> pml
Test case 6
-> Payment create with confirm false
session call
-> pml
Checklist
cargo +nightly fmt --allcargo clippy