Skip to content

fix(authentication): fixed notification_url and updated authentication bug #8843

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
merged 3 commits into from
Aug 8, 2025

Conversation

sahkal
Copy link
Contributor

@sahkal sahkal commented Aug 5, 2025

Type of Change

  • Bugfix

Description

fixed notification_url and updated authentication bug

How did you test it?

Do Authentication create

curl --location 'localhost:8080/authentication' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_0NG9Fnn4XGvH2Q0MDxoRzB4o9q2uy7x5dgqiXYzoc08osUXbzh6z2Lzew0j28hgD' \
--data '{
    "amount": 10,
    "currency": "USD",
    "acquirer_details": {
        "acquirer_merchant_id": "12134",
        "acquirer_bin": "438309",
        "merchant_country_code": "004"
    },
    "authentication_connector":"juspaythreedsserver"
}'

Do eligibility call

curl --location 'localhost:8080/authentication/authn_O4hug1u4X0yddHYmFQxl/eligibility' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_0NG9Fnn4XGvH2Q0MDxoRzB4o9q2uy7x5dgqiXYzoc08osUXbzh6z2Lzew0j28hgD' \
--data-raw '{
     "payment_method": "card",
    "payment_method_data": {
        "card": {
            "card_number": "4916994064252017",
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "CA",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX"
        },
        "phone": {
            "number": "123456789",
            "country_code": "12"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX"
        },
        "phone": {
            "number": "123456789",
            "country_code": "12"
        }
    },
    "email": "[email protected]",
    "browser_information": {
        "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": "115.99.183.2"
    },
    "profile_acquirer_id": "pro_acq_AiKYTHTtgcUeVZDvSQl3"

}'

do authenticate

curl --location 'localhost:8080/authentication/authn_O4hug1u4X0yddHYmFQxl/authenticate' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_0NG9Fnn4XGvH2Q0MDxoRzB4o9q2uy7x5dgqiXYzoc08osUXbzh6z2Lzew0j28hgD' \
--data '{
    "device_channel": "BRW",
    "threeds_method_comp_ind": "Y"
}

'
curl --location 'https://mock-three-ds-server-frosty-paper-8641.fly.dev/processor/mock/acs/trigger-otp?redirectUrl=http%3A%2F%2Flocalhost%3A8080%2Fauthentication%2Fsahkal11%2Fauthn_O4hug1u4X0yddHYmFQxl%2Fsync' \
--header 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
--header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'cache-control: no-cache' \
--header 'content-type: application/x-www-form-urlencoded' \
--header 'origin: https://juspay-3ds-sdk.netlify.app' \
--header 'pragma: no-cache' \
--header 'priority: u=0, i' \
--header 'referer: https://juspay-3ds-sdk.netlify.app/' \
--header 'sec-ch-ua: "Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: iframe' \
--header 'sec-fetch-mode: navigate' \
--header 'sec-fetch-site: cross-site' \
--header 'sec-fetch-storage-access: active' \
--header 'upgrade-insecure-requests: 1' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36' \
--data-urlencode 'creq={"messageType":"CReq","threeDSServerTransID":"db9cb0d5-d38b-4c15-a7a1-c2f7d41e6056","acsTransID":"fd5aa71e-6125-4de7-8382-0ad24a5fd8d8","challengeWindowSize":"01","messageVersion":"2.2.0"}'

Then do sync

curl --location 'localhost:8080/authentication/sahkal11/authn_O4hug1u4X0yddHYmFQxl/sync' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_0NG9Fnn4XGvH2Q0MDxoRzB4o9q2uy7x5dgqiXYzoc08osUXbzh6z2Lzew0j28hgD' \
--data '{
}'

Should provide terminal state in 1st call itself

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

@sahkal sahkal added this to the July 2025 Release milestone Aug 5, 2025
@sahkal sahkal self-assigned this Aug 5, 2025
@sahkal sahkal added the C-bug Category: Bug label Aug 5, 2025
@sahkal sahkal requested a review from a team as a code owner August 5, 2025 11:55
Copy link

semanticdiff-com bot commented Aug 5, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/unified_authentication_service.rs  66% smaller

deepanshu-iiitu
deepanshu-iiitu previously approved these changes Aug 7, 2025
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Aug 8, 2025
Merged via the queue into main with commit be4b43f Aug 8, 2025
17 of 22 checks passed
@Gnanasundari24 Gnanasundari24 deleted the fix-modular-auth-3ds-bug branch August 8, 2025 10:06
sahkal added a commit that referenced this pull request Aug 8, 2025
…n bug (#8843)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants