Skip to content

fix(connector): [CYBERSOURCE] change ucaf_collection_indicator for mastercard payments via netcetera#7623

Merged
likhinbopanna merged 1 commit intomainfrom
fix_mastercard_ext_auth
Mar 26, 2025
Merged

fix(connector): [CYBERSOURCE] change ucaf_collection_indicator for mastercard payments via netcetera#7623
likhinbopanna merged 1 commit intomainfrom
fix_mastercard_ext_auth

Conversation

@dgeee13
Copy link
Contributor

@dgeee13 dgeee13 commented Mar 25, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

External 3ds payments for cybersource via netcetera external authentication is not working currently. To fix it, correct ucaf_collection_indicator has to be passed which is "2" according to cybersource doc. This PR introduces this correction.

Screenshot 2025-03-25 at 3 53 43 PM

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Configure business profile

Curl

curl --location 'http://localhost:8080/account/merchant_1742896618/business_profile/pro_ddmS9vKQBtVtjx1wOyxr' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "authentication_connector_details": { "authentication_connectors": [ "netcetera" ], "three_ds_requestor_url": "https://my.flowbirdapp.com/" } }'

Create payment request via Cybersoucrce with 3ds external auth enabled

Curl

curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_fqPovCsMoQb3EKJiZacxsXxoTN1bXCMrez3vwgYASVHPS9bKmtBONGbJ8LrcNVMo' \ --data-raw '{ "amount": 10000, "currency": "EUR", "confirm": true, "payment_link": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10000, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "request_external_three_ds_authentication": true, "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5512459816707531", "card_exp_month": "12", "card_exp_year": "2025", "card_cvc": "000", "card_network": "Mastercard" } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "CA", "city": "Musterhausen", "state": "California", "zip": "12345", "country": "US", "first_name": "Debarati", "last_name": "Ghatak" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "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, "ip_address": "103.77.139.95", "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "dg": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }'

Screenshot 2025-03-25 at 3 59 46 PM

Call 3ds authentication endpoint

Curl

curl --location 'http://localhost:8080/payments/pay_MfhkesST2jWyAXJkN0ap/3ds/authentication' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_89bfdedf18374b27b59ab42dc6508c57' \ --data '{ "client_secret": "pay_MfhkesST2jWyAXJkN0ap_secret_CCOCh7UEtByCqtmBYmq9", "device_channel": "BRW", "threeds_method_comp_ind": "Y" }'

Screenshot 2025-03-25 at 3 59 31 PM

Call authorize for Cybersource

Curl

curl --location --request POST 'http://localhost:8080/payments/pay_MfhkesST2jWyAXJkN0ap/merchant_1742896618/authorize/cybersource'
Screenshot 2025-03-25 at 3 59 15 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@dgeee13 dgeee13 requested a review from a team as a code owner March 25, 2025 10:30
@semanticdiff-com
Copy link

semanticdiff-com bot commented Mar 25, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs  77% smaller

@dgeee13 dgeee13 changed the title feat(connector): change ucaf_collection_indicator for mastercard payments via netcetera fix (connector): change ucaf_collection_indicator for mastercard payments via netcetera Mar 25, 2025
@dgeee13 dgeee13 self-assigned this Mar 25, 2025
@dgeee13 dgeee13 changed the title fix (connector): change ucaf_collection_indicator for mastercard payments via netcetera fix(connector): [CYBERSOURCE] change ucaf_collection_indicator for mastercard payments via netcetera Mar 25, 2025
@dgeee13 dgeee13 added the A-connector-integration Area: Connector integration label Mar 25, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Mar 26, 2025
Merged via the queue into main with commit b19b195 Mar 26, 2025
27 of 32 checks passed
@likhinbopanna likhinbopanna deleted the fix_mastercard_ext_auth branch March 26, 2025 12:33
GauravRawat369 pushed a commit that referenced this pull request Mar 27, 2025
…stercard payments via netcetera (#7623)

Co-authored-by: Debarati Ghatak <debarati.ghatak@Debarati-Ghatak-FW569NC29L.local>
pixincreate added a commit that referenced this pull request Mar 27, 2025
…e-status-check

* 'main' of github.com:juspay/hyperswitch:
  build(docker): specify user for runner stage (#7641)
  chore(version): 2025.03.27.0
  fix(connector): [Nexixpay] update status mapping nexixpay (#7612)
  refactor(connector): [TrustPay] Fix status and wasm changes  (#7649)
  fix(connector): [redsys] psync transaction type mapping (#7628)
  feat(themes): Add email configuration support for themes (#7580)
  feat(core): add profile level config for debit routing feature (#7470)
  fix(connector): [CYBERSOURCE]  change ucaf_collection_indicator for mastercard payments via netcetera (#7623)
  fix(connector): fix required fields for mandates supported connectors (#6930)
  chore(cypress): bump cypress to `v14.2.0` (#7640)
  feat(connector): [BRAINTREE] Pass connector request reference id (#7609)
  fix(connector): [GlobalPay] Address `5xx` when cancelling a paypal transaction (#7605)
  feat(dashboard_metadata): Add `ReconStatus` in `dashboard_metadata` (#7595)
  fix(connectors): [Adyen] remove redundant enums  (#7601)
  feat: add routing support for v2 sdk session flow (#6763)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-connector-integration Area: Connector integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants