feat(samsung_pay): collect customer address details form Samsung Pay based on business profile config and connector required fields#7320
Merged
Gnanasundari24 merged 4 commits intomainfrom Feb 22, 2025
Conversation
…based on business profile config and connector required fields
Changed Files
|
sai-harsha-vardhan
approved these changes
Feb 20, 2025
jagan-jaya
approved these changes
Feb 20, 2025
pixincreate
added a commit
that referenced
this pull request
Feb 22, 2025
…tusedPM * 'main' of github.com:juspay/hyperswitch: (22 commits) feat(connector): add Samsung pay mandate support for Cybersource (#7298) chore(masking): add peek_mut to PeekInterface (#7281) feat(samsung_pay): collect customer address details form Samsung Pay based on business profile config and connector required fields (#7320) ci: update creds (#7345) feat(router): add `merchant_configuration_id` in netcetera metadata and make other merchant configurations optional (#7347) fix(routing): Fixed 5xx error logs in dynamic routing metrics (#7335) fix(connector): [DATATRANS] Fix Force Sync Flow (#7331) chore(version): 2025.02.21.0 fix(connector): [DATATRANS] Add new payment status (#7327) feat(router): [Xendit] add support for split payments (#7143) fix(payment_methods_v2): update fingerprint implementation in v2 (#7270) feat(router): Add Payments - List endpoint for v2 (#7191) feat(core): add support for confirmation flow for click to pay (#6982) chore(version): 2025.02.20.0 fix(connector): [SCRIPT] Update template generating script and updated connector doc (#7301) ci(cypress): add assertions for `requires_cvv` (#7296) refactor(utils): match string for state with SDK's naming convention (#7300) feat(core): add hypersense integration api (#7218) chore(version): 2025.02.19.0 feat(connector): [Moneris] Add payments flow (#7249) ...
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
This pull request includes changes to enhance the handling of billing and shipping address requirements for Samsung Pay and Google Pay session tokens. The most important changes include adding new fields to the
SamsungPaySessionTokenResponsestruct, updating thecreate_samsung_pay_session_tokenfunction to include these new fields, and refactoring the code to use helper functions for determining address requirements.Enhancements to session token handling:
Added
billing_address_requiredandshipping_address_requiredfields to theSamsungPaySessionTokenResponsestruct.Updated the
create_samsung_pay_session_tokenfunction to include the new address requirement fields and refactored the logic to use helper functions for determining if billing and shipping addresses are required.Refactoring for address requirement determination:
Introduced the
is_billing_address_required_to_be_collected_from_walletandis_shipping_address_required_to_be_collected_form_walletfunctions to encapsulate the logic for determining address requirements based on business profile settings and connector fields.Refactored the
create_gpay_session_tokenfunction to use the new helper functions for determining billing and shipping address requirements.Additional Changes
Motivation and Context
Collect the customer's address details from Samsung Pay during payment to enhance the customer experience
How did you test it?
-> Create a merchant connector account with the samsung pay enabled for it
-> Create a payment with confirm false
-> Set the below profile configuration
-> For this profile configuration the
shipping_address_requiredandbilling_address_requiredbe true in the session resposne-> Set the below profile configuration
-> As per the above profile configuration the the
billing_address_requiredwill betrueas the cybersource requires billing derails to be passed andshipping_address_requiredwill befalseas shipping details are not required by cybserourec.Checklist
cargo +nightly fmt --allcargo clippy