-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat(connector): [cybersource] add changes for field CybersourceConsumerAuthInformation #8768
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
Merged
Conversation
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
Changed Files
|
6170e4f
to
90e4bf7
Compare
2 tasks
2 tasks
2 tasks
crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
Outdated
Show resolved
Hide resolved
…merAuthInformation
cec6ae6
to
6630711
Compare
sai-harsha-vardhan
approved these changes
Jul 30, 2025
@@ -1330,6 +1348,8 @@ impl | |||
date_time::DateFormat::YYYYMMDDHHmmss, | |||
) | |||
.ok(); | |||
let effective_authentication_type = authn_data.authentication_type.map(Into::into); |
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.
Prefer using from
instead of into
deepanshu-iiitu
approved these changes
Jul 30, 2025
jagan-jaya
approved these changes
Jul 30, 2025
} | ||
|
||
#[derive(Debug, Serialize)] | ||
pub enum EffectiveAuthenticationType { |
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.
Will parsing fail incase of unknown variant?
pixincreate
added a commit
that referenced
this pull request
Aug 1, 2025
…rver * 'main' of github.com:juspay/hyperswitch: (25 commits) chore: `xof` currency to cybersource cards (#8799) chore(version): 2025.08.01.0 feat(core): Implement UCS based upi for paytm and phonepe (#8732) feat(connector): [katapult]add template code for katapult (#8783) feat(router): introduce `feature` and `feature_data` to gsm (#7771) feat(connector): [cybersource] add changes for field CybersourceConsumerAuthInformation (#8768) feat(authentication): added authentication sync api (#8596) feat(connector): [facilitapay] fix refunds, add webhook and void support (#8778) feat(connector): [payload] add recurring payments (#8597) chore(version): 2025.07.31.0 feat(connector): [Flexiti]Add support for flexiti connector (#8743) chore(router): events enhancement for kafka (#8780) ci(cypress): Making a mandate payment with large customer user agents (#8790) fix(openapi): update create_platform endpoint in api-reference docs (#8782) chore(version): 2025.07.30.0 fix(connector): [GLOBALPAY] Added Tokenization Flow for CITs (#8568) feat(routing): Add api-refs for new decision engine endpoints (#8709) fix: replace xtrim with xdel to support older redis version (#8515) fix(connector): [Worldpay] handle multiple ddc submission for CompleteAuthorize (#8741) feat(connector): [Adyen] receive incoming webhooks for pix expiry (#8720) ...
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
Context - Cybersource payments via Netcetera are failing for a France based acquirer in prod, the PR provides fix for the same by introducing field consumerAuthenticationInformation. effectiveAuthenticationType and making sure _consumerAuthenticationInformation.specificationVersion is sent.
Additional Changes
Motivation and Context
How did you test it?
Testing for field effective_authentication_type and specification_version
Step 1 - Call /payments
Curl
curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-feature: integ-custom' \ --header 'api-key: dev_TSUxfiSwiAelCPTr9xN2ValUdd1fvmeYg0AtMUwdJukRkTlCpHL9p2IWxn6fouYl' \ --data-raw '{ "amount": 2540, "currency": "USD", "profile_id": "pro_aKVBsBqyTIq2T1UIaapY", "confirm": true, "amount_to_capture": 2540, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "request_external_three_ds_authentication": true, "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "setup_future_usage": "on_session", "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" } }, "routing": { "type": "single", "data": "nmi" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000002370", "card_exp_month": "08", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "999" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" } } }'
Step 2- Call /3ds/authentication via Netcetera
Curl
curl --location 'http://localhost:8080/payments/pay_1tQlG51BwoiUpLE3YKBV/3ds/authentication' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_8891a001315d40d0a26d1028ad51fe0b' \ --data '{ "client_secret": "pay_1tQlG51BwoiUpLE3YKBV_secret_EqDy0WeEHEfkkOjUd9R0", "device_channel": "BRW", "threeds_method_comp_ind": "Y" }'
Step 3- Call /authorize via Cybersource
curl --location --request POST 'http://localhost:8080/payments/pay_1tQlG51BwoiUpLE3YKBV/merchant_1753777600/authorize/cybersource' \ --header 'api-key: dev_TSUxfiSwiAelCPTr9xN2ValUdd1fvmeYg0AtMUwdJukRkTlCpHL9p2IWxn6fouYl'
specificationVersion and effectiveAuthenticationType are getting populated, and are sent to Cybersource_

Please note - Effective authentication type is FR, since the test flow is Frictionless
Checklist
cargo +nightly fmt --all
cargo clippy