hyperswitch-funcdiff / prs /pr_10010.json
SirajRLX's picture
Add files using upload-large-folder tool
57fb334 verified
{
"number": 10010,
"title": "fix(connector): [Finix] Add authentication_type check only for cards",
"description": "## Type of Change\r\n<!-- Put an `x` in the boxes that apply -->\r\n\r\n- [x] Bugfix\r\n- [ ] New feature\r\n- [ ] Enhancement\r\n- [ ] Refactoring\r\n- [ ] Dependency updates\r\n- [ ] Documentation\r\n- [ ] CI/CD\r\n\r\n## Description\r\n<!-- Describe your changes in detail -->\r\n\r\n\r\n### Additional Changes\r\n\r\n- [ ] This PR modifies the API contract\r\n- [ ] This PR modifies the database schema\r\n- [ ] This PR modifies application configuration/environment variables\r\n\r\n<!--\r\nProvide links to the files with corresponding changes.\r\n\r\nFollowing are the paths where you can find config files:\r\n1. `config`\r\n2. `crates/router/src/configs`\r\n3. `loadtest/config`\r\n-->\r\n\r\n\r\n## Motivation and Context\r\n<!--\r\nWhy is this change required? What problem does it solve?\r\nIf it fixes an open issue, please link to the issue here.\r\n\r\nIf you don't have an issue, we'd recommend starting with one first so the PR\r\ncan focus on the implementation (unless it is an obvious bug or documentation fix\r\nthat will have little conversation).\r\n-->\r\n\r\nAdd authentication_type check only for cards only.\r\nEarlier authentication_type check was added for all payment methods, leading to payment failure when payment method is wallet and authentication_type is three_ds. Restricted the check to cards only.\r\n\r\n\r\n## How did you test it?\r\n<!--\r\nDid you write an integration/unit/API test to verify the code changes?\r\nOr did you test this change manually (provide relevant screenshots)?\r\n-->\r\nApple pay:\r\n\r\n<details>\r\n<summary> No Three DS</summary>\r\n\r\nRequest : \r\n\r\n```\r\n\r\ncurl --location 'http://localhost:8080/payments/pay_6S6iL6i97Nckey5ZTLSR/confirm' \\\r\n--header 'Content-Type: application/json' \\\r\n--header 'Accept: application/json' \\\r\n--header 'api-key: dev_EFGjVNpZncvG3dIvg5yrXWuRTODrU5hcimMQ4TgelrGtf4WbnFbTImlqniJdDWWA' \\\r\n--data '{\r\n\t\"confirm\": true,\r\n\t\"payment_method\": \"wallet\",\r\n\t\"payment_method_type\": \"apple_pay\",\r\n \"payment_method_data\": {\r\n \"wallet\": {\r\n \"apple_pay\": {\r\n \"payment_data\": \"eyJkYXRhIjo......\",\r\n \"payment_method\": {\r\n \"display_name\": \"MasterCard 0049\",\r\n \"network\": \"MasterCard\",\r\n \"type\": \"credit\"\r\n },\r\n \"transaction_identifier\": \"7b4689add59919353b1b07cb5de05fd8840725de82fd811bdebb7b7ca383d799\"\r\n }\r\n }\r\n },\r\n\t\"browser_info\": {\r\n\t\t\"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\",\r\n\t\t\"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\r\n\t\t\"language\": \"nl-NL\",\r\n\t\t\"color_depth\": 24,\r\n\t\t\"screen_height\": 723,\r\n\t\t\"screen_width\": 1536,\r\n\t\t\"time_zone\": 0,\r\n\t\t\"java_enabled\": true,\r\n\t\t\"java_script_enabled\": true,\r\n\t\t\"ip_address\": \"127.0.0.1\"\r\n\t},\r\n\t\"billing\": {\r\n\t\t\"address\": {\r\n\t\t\t\"line1\": \"1467\",\r\n\t\t\t\"line2\": \"Harrison Street\",\r\n\t\t\t\"line3\": \"Harrison Street\",\r\n\t\t\t\"city\": \"San Fransico\",\r\n\t\t\t\"state\": \"California\",\r\n\t\t\t\"zip\": \"94122\",\r\n\t\t\t\"country\": \"US\",\r\n\t\t\t\"first_name\": \"John\",\r\n\t\t\t\"last_name\": \"Doe\"\r\n\t\t}\r\n\t},\r\n\t\"shipping\": {\r\n\t\t\"address\": {\r\n\t\t\t\"line1\": \"1467\",\r\n\t\t\t\"line2\": \"Harrison Street\",\r\n\t\t\t\"line3\": \"Harrison Street\",\r\n\t\t\t\"city\": \"San Fransico\",\r\n\t\t\t\"state\": \"California\",\r\n\t\t\t\"zip\": \"94122\",\r\n\t\t\t\"country\": \"US\",\r\n\t\t\t\"first_name\": \"John\",\r\n\t\t\t\"last_name\": \"Doe\"\r\n\t\t}\r\n\t}\r\n}'\r\n\r\n```\r\n\r\nResponse:\r\n\r\n```\r\n\r\n{\r\n \"payment_id\": \"pay_6S6iL6i97Nckey5ZTLSR\",\r\n \"merchant_id\": \"merchant_1761554688\",\r\n \"status\": \"succeeded\",\r\n \"amount\": 1000,\r\n \"net_amount\": 1000,\r\n \"shipping_cost\": null,\r\n \"amount_capturable\": 0,\r\n \"amount_received\": 1000,\r\n \"connector\": \"finix\",\r\n \"client_secret\": \"pay_6S6iL6i97Nckey5ZTLSR_secret_yJwYBtjjNDM38dakRpKb\",\r\n \"created\": \"2025-10-27T10:29:53.273Z\",\r\n \"currency\": \"USD\",\r\n \"customer_id\": \"StripeCustomer\",\r\n \"customer\": {\r\n \"id\": \"StripeCustomer\",\r\n \"name\": \"John Doe\",\r\n \"email\": \"likhin.bopanna@gmail.com\",\r\n \"phone\": \"999999999\",\r\n \"phone_country_code\": \"+65\"\r\n },\r\n \"description\": \"Its my first payment request\",\r\n \"refunds\": null,\r\n \"disputes\": null,\r\n \"mandate_id\": null,\r\n \"mandate_data\": null,\r\n \"setup_future_usage\": null,\r\n \"off_session\": null,\r\n \"capture_on\": null,\r\n \"capture_method\": \"automatic\",\r\n \"payment_method\": \"wallet\",\r\n \"payment_method_data\": {\r\n \"wallet\": {\r\n \"apple_pay\": {\r\n \"last4\": \"0049\",\r\n \"card_network\": \"MasterCard\",\r\n \"type\": \"credit\"\r\n }\r\n },\r\n \"billing\": null\r\n },\r\n \"payment_token\": null,\r\n \"shipping\": {\r\n \"address\": {\r\n \"city\": \"San Fransico\",\r\n \"country\": \"US\",\r\n \"line1\": \"1467\",\r\n \"line2\": \"Harrison Street\",\r\n \"line3\": \"Harrison Street\",\r\n \"zip\": \"94122\",\r\n \"state\": \"California\",\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"origin_zip\": null\r\n },\r\n \"phone\": null,\r\n \"email\": null\r\n },\r\n \"billing\": {\r\n \"address\": {\r\n \"city\": \"San Fransico\",\r\n \"country\": \"US\",\r\n \"line1\": \"1467\",\r\n \"line2\": \"Harrison Street\",\r\n \"line3\": \"Harrison Street\",\r\n \"zip\": \"94122\",\r\n \"state\": \"California\",\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"origin_zip\": null\r\n },\r\n \"phone\": null,\r\n \"email\": null\r\n },\r\n \"order_details\": null,\r\n \"email\": \"likhin.bopanna@gmail.com\",\r\n \"name\": \"John Doe\",\r\n \"phone\": \"999999999\",\r\n \"return_url\": \"https://duck.com/\",\r\n \"authentication_type\": \"no_three_ds\",\r\n \"statement_descriptor_name\": \"joseph\",\r\n \"statement_descriptor_suffix\": \"JS\",\r\n \"next_action\": null,\r\n \"cancellation_reason\": null,\r\n \"error_code\": null,\r\n \"error_message\": null,\r\n \"unified_code\": null,\r\n \"unified_message\": null,\r\n \"payment_experience\": null,\r\n \"payment_method_type\": \"apple_pay\",\r\n \"connector_label\": \"finix_US_default\",\r\n \"business_country\": \"US\",\r\n \"business_label\": \"default\",\r\n \"business_sub_label\": null,\r\n \"allowed_payment_method_types\": null,\r\n \"ephemeral_key\": null,\r\n \"manual_retry_allowed\": null,\r\n \"connector_transaction_id\": \"TRuDqLDuHNAE1BXELPrYpWpt\",\r\n \"frm_message\": null,\r\n \"metadata\": {\r\n \"udf1\": \"value1\",\r\n \"login_date\": \"2019-09-10T10:11:12Z\",\r\n \"new_customer\": \"true\"\r\n },\r\n \"connector_metadata\": null,\r\n \"feature_metadata\": {\r\n \"redirect_response\": null,\r\n \"search_tags\": null,\r\n \"apple_pay_recurring_details\": null,\r\n \"gateway_system\": \"direct\"\r\n },\r\n \"reference_id\": null,\r\n \"payment_link\": null,\r\n \"profile_id\": \"pro_5nKzVSCRGEnvGyAkO2W3\",\r\n \"surcharge_details\": null,\r\n \"attempt_count\": 1,\r\n \"merchant_decision\": null,\r\n \"merchant_connector_id\": \"mca_TykfySGJdEnr2RrWf4iQ\",\r\n \"incremental_authorization_allowed\": false,\r\n \"authorization_count\": null,\r\n \"incremental_authorizations\": null,\r\n \"external_authentication_details\": null,\r\n \"external_3ds_authentication_attempted\": false,\r\n \"expires_on\": \"2025-10-27T10:44:53.273Z\",\r\n \"fingerprint\": null,\r\n \"browser_info\": {\r\n \"os_type\": null,\r\n \"referer\": null,\r\n \"language\": \"nl-NL\",\r\n \"time_zone\": 0,\r\n \"ip_address\": \"127.0.0.1\",\r\n \"os_version\": null,\r\n \"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\",\r\n \"color_depth\": 24,\r\n \"device_model\": null,\r\n \"java_enabled\": true,\r\n \"screen_width\": 1536,\r\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\r\n \"screen_height\": 723,\r\n \"accept_language\": \"en\",\r\n \"java_script_enabled\": true\r\n },\r\n \"payment_channel\": null,\r\n \"payment_method_id\": null,\r\n \"network_transaction_id\": null,\r\n \"payment_method_status\": null,\r\n \"updated\": \"2025-10-27T10:30:07.030Z\",\r\n \"split_payments\": null,\r\n \"frm_metadata\": null,\r\n \"extended_authorization_applied\": null,\r\n \"request_extended_authorization\": null,\r\n \"capture_before\": null,\r\n \"merchant_order_reference_id\": null,\r\n \"order_tax_amount\": null,\r\n \"connector_mandate_id\": null,\r\n \"card_discovery\": null,\r\n \"force_3ds_challenge\": false,\r\n \"force_3ds_challenge_trigger\": false,\r\n \"issuer_error_code\": null,\r\n \"issuer_error_message\": null,\r\n \"is_iframe_redirection_enabled\": null,\r\n \"whole_connector_response\": null,\r\n \"enable_partial_authorization\": null,\r\n \"enable_overcapture\": null,\r\n \"is_overcapture_enabled\": null,\r\n \"network_details\": null,\r\n \"is_stored_credential\": null,\r\n \"mit_category\": null\r\n}\r\n\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary> Three DS </summary>\r\n\r\nResponse:\r\n```\r\n\r\n{\r\n \"payment_id\": \"pay_wytMe0aR93ai1VsN1hSc\",\r\n \"merchant_id\": \"merchant_1761554688\",\r\n \"status\": \"succeeded\",\r\n \"amount\": 1000,\r\n \"net_amount\": 1000,\r\n \"shipping_cost\": null,\r\n \"amount_capturable\": 0,\r\n \"amount_received\": 1000,\r\n \"connector\": \"finix\",\r\n \"client_secret\": \"pay_wytMe0aR93ai1VsN1hSc_secret_fN7GArxZnTfj98TC8LLb\",\r\n \"created\": \"2025-10-27T10:34:03.753Z\",\r\n \"currency\": \"USD\",\r\n \"customer_id\": \"StripeCustomer\",\r\n \"customer\": {\r\n \"id\": \"StripeCustomer\",\r\n \"name\": \"John Doe\",\r\n \"email\": \"likhin.bopanna@gmail.com\",\r\n \"phone\": \"999999999\",\r\n \"phone_country_code\": \"+65\"\r\n },\r\n \"description\": \"Its my first payment request\",\r\n \"refunds\": null,\r\n \"disputes\": null,\r\n \"mandate_id\": null,\r\n \"mandate_data\": null,\r\n \"setup_future_usage\": null,\r\n \"off_session\": null,\r\n \"capture_on\": null,\r\n \"capture_method\": \"automatic\",\r\n \"payment_method\": \"wallet\",\r\n \"payment_method_data\": {\r\n \"wallet\": {\r\n \"apple_pay\": {\r\n \"last4\": \"0049\",\r\n \"card_network\": \"MasterCard\",\r\n \"type\": \"credit\"\r\n }\r\n },\r\n \"billing\": null\r\n },\r\n \"payment_token\": null,\r\n \"shipping\": {\r\n \"address\": {\r\n \"city\": \"San Fransico\",\r\n \"country\": \"US\",\r\n \"line1\": \"1467\",\r\n \"line2\": \"Harrison Street\",\r\n \"line3\": \"Harrison Street\",\r\n \"zip\": \"94122\",\r\n \"state\": \"California\",\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"origin_zip\": null\r\n },\r\n \"phone\": null,\r\n \"email\": null\r\n },\r\n \"billing\": {\r\n \"address\": {\r\n \"city\": \"San Fransico\",\r\n \"country\": \"US\",\r\n \"line1\": \"1467\",\r\n \"line2\": \"Harrison Street\",\r\n \"line3\": \"Harrison Street\",\r\n \"zip\": \"94122\",\r\n \"state\": \"California\",\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"origin_zip\": null\r\n },\r\n \"phone\": null,\r\n \"email\": null\r\n },\r\n \"order_details\": null,\r\n \"email\": \"likhin.bopanna@gmail.com\",\r\n \"name\": \"John Doe\",\r\n \"phone\": \"999999999\",\r\n \"return_url\": \"https://duck.com/\",\r\n \"authentication_type\": \"three_ds\",\r\n \"statement_descriptor_name\": \"joseph\",\r\n \"statement_descriptor_suffix\": \"JS\",\r\n \"next_action\": null,\r\n \"cancellation_reason\": null,\r\n \"error_code\": null,\r\n \"error_message\": null,\r\n \"unified_code\": null,\r\n \"unified_message\": null,\r\n \"payment_experience\": null,\r\n \"payment_method_type\": \"apple_pay\",\r\n \"connector_label\": \"finix_US_default\",\r\n \"business_country\": \"US\",\r\n \"business_label\": \"default\",\r\n \"business_sub_label\": null,\r\n \"allowed_payment_method_types\": null,\r\n \"ephemeral_key\": null,\r\n \"manual_retry_allowed\": null,\r\n \"connector_transaction_id\": \"TRg8kPDQGCjbrEveNDBodh79\",\r\n \"frm_message\": null,\r\n \"metadata\": {\r\n \"udf1\": \"value1\",\r\n \"login_date\": \"2019-09-10T10:11:12Z\",\r\n \"new_customer\": \"true\"\r\n },\r\n \"connector_metadata\": null,\r\n \"feature_metadata\": {\r\n \"redirect_response\": null,\r\n \"search_tags\": null,\r\n \"apple_pay_recurring_details\": null,\r\n \"gateway_system\": \"direct\"\r\n },\r\n \"reference_id\": null,\r\n \"payment_link\": null,\r\n \"profile_id\": \"pro_5nKzVSCRGEnvGyAkO2W3\",\r\n \"surcharge_details\": null,\r\n \"attempt_count\": 1,\r\n \"merchant_decision\": null,\r\n \"merchant_connector_id\": \"mca_TykfySGJdEnr2RrWf4iQ\",\r\n \"incremental_authorization_allowed\": false,\r\n \"authorization_count\": null,\r\n \"incremental_authorizations\": null,\r\n \"external_authentication_details\": null,\r\n \"external_3ds_authentication_attempted\": false,\r\n \"expires_on\": \"2025-10-27T10:49:03.753Z\",\r\n \"fingerprint\": null,\r\n \"browser_info\": {\r\n \"os_type\": null,\r\n \"referer\": null,\r\n \"language\": \"nl-NL\",\r\n \"time_zone\": 0,\r\n \"ip_address\": \"127.0.0.1\",\r\n \"os_version\": null,\r\n \"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\",\r\n \"color_depth\": 24,\r\n \"device_model\": null,\r\n \"java_enabled\": true,\r\n \"screen_width\": 1536,\r\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\",\r\n \"screen_height\": 723,\r\n \"accept_language\": \"en\",\r\n \"java_script_enabled\": true\r\n },\r\n \"payment_channel\": null,\r\n \"payment_method_id\": null,\r\n \"network_transaction_id\": null,\r\n \"payment_method_status\": null,\r\n \"updated\": \"2025-10-27T10:34:13.188Z\",\r\n \"split_payments\": null,\r\n \"frm_metadata\": null,\r\n \"extended_authorization_applied\": null,\r\n \"request_extended_authorization\": null,\r\n \"capture_before\": null,\r\n \"merchant_order_reference_id\": null,\r\n \"order_tax_amount\": null,\r\n \"connector_mandate_id\": null,\r\n \"card_discovery\": null,\r\n \"force_3ds_challenge\": false,\r\n \"force_3ds_challenge_trigger\": false,\r\n \"issuer_error_code\": null,\r\n \"issuer_error_message\": null,\r\n \"is_iframe_redirection_enabled\": null,\r\n \"whole_connector_response\": null,\r\n \"enable_partial_authorization\": null,\r\n \"enable_overcapture\": null,\r\n \"is_overcapture_enabled\": null,\r\n \"network_details\": null,\r\n \"is_stored_credential\": null,\r\n \"mit_category\": null\r\n}\r\n\r\n```\r\n</details>\r\n\r\n## Checklist\r\n<!-- Put an `x` in the boxes that apply -->\r\n\r\n- [x] I formatted the code `cargo +nightly fmt --all`\r\n- [x] I addressed lints thrown by `cargo clippy`\r\n- [x] I reviewed the submitted code\r\n- [ ] I added unit tests for my changes where possible\r\n",
"author": "Vani-1107",
"created_at": "2025-10-27T10:04:51+00:00",
"merged_at": "2025-10-28T10:22:23+00:00",
"base_branch": "main",
"labels": [
"C-bug"
],
"url": "https://github.com/juspay/hyperswitch/pull/10010",
"commits": [
{
"sha": "f3d91e0ec573e6247a915cbac8c6e38e68e9185c",
"message": "fix-wasm",
"author": "Vani Gupta",
"date": "2025-10-17T12:36:28+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/f3d91e0ec573e6247a915cbac8c6e38e68e9185c"
},
{
"sha": "7fee67bb1a9647fc96237530b0f3c42be98fdd21",
"message": "remove 3ds check for wallets",
"author": "Vani Gupta",
"date": "2025-10-27T10:03:56+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/7fee67bb1a9647fc96237530b0f3c42be98fdd21"
},
{
"sha": "63fe62f25bff4f20a97238dcf59cf5fcb19dbe3f",
"message": "Merge branch 'main' into fix-finix",
"author": "Vani Gupta",
"date": "2025-10-27T10:12:08+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/63fe62f25bff4f20a97238dcf59cf5fcb19dbe3f"
},
{
"sha": "a324d7775304b9b6dfc9d5d53fa9f9150bcf53bc",
"message": "fix",
"author": "Vani Gupta",
"date": "2025-10-27T10:27:33+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/a324d7775304b9b6dfc9d5d53fa9f9150bcf53bc"
},
{
"sha": "8e770f0c793f0daa9af99555753b339f894d363d",
"message": "chore: run formatter",
"author": "hyperswitch-bot[bot]",
"date": "2025-10-27T10:30:28+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/8e770f0c793f0daa9af99555753b339f894d363d"
}
]
}