Skip to content
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

fix(router): add config to avoid connector tokenization for apple pay simplified flow #3234

Merged
merged 14 commits into from
Jan 11, 2024

Conversation

ShankarSinghC
Copy link
Contributor

@ShankarSinghC ShankarSinghC commented Jan 3, 2024

Type of Change

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

Description

Currently tokenization flow for a connector can be decide based on the payment method type. Now as there are two different flows (manual and simplified) for apple pay we need to consider this as well while decide the type of tokenization. This changes is required because some connectors follow connector tokenization for manual apple pay flow and network tokenization for simplified apple pay flow.

To handle this an config (apple_pay_pre_decrypt_flow) is been added which can be set to network_tokenization or connector_tokenization according to the connector.

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?

-> Connector create for manual flow
Screenshot 2024-01-03 at 2 56 13 PM
-> Apple pay payment create for manual flow
Screenshot 2024-01-03 at 2 57 00 PM
-> Connector create for simplified flow
Screenshot 2024-01-03 at 2 57 47 PM
-> Apple pay payment create for simplified flow
Screenshot 2024-01-03 at 2 58 03 PM
-> Verified the payment status in connector dashboard
Screenshot 2024-01-03 at 2 59 46 PM
-> Google pay payment create for Stripe
image
-> Google pay payment create for Checkout
image
image

Test case :-
As this pr contains tokenization changes different tokenization flow needs to be tested. Also wallet payments needs to be tested.
For apple pay both the flows needs to be tested (manual and simplified)
-> metadata for manul

"metadata": {
        "apple_pay_combined": {
            "manual": {
                "session_token_data": {
                    "initiative": "web",
                    "certificate": "",
                    "display_name": "",
                    "certificate_keys": "",
                    "initiative_context": "",
                    "merchant_identifier": ""
                },
                "payment_request_data": {
                    "label": "applepay",
                    "supported_networks": [
                        "visa",
                        "masterCard",
                        "amex",
                        "discover"
                    ],
                    "merchant_capabilities": [
                        "supports3DS"
                    ]
                }
            }
        }

-> metadata for simplified

"metadata": {
        "apple_pay_combined": {
            "simplified": {
                "session_token_data": {
                    "initiative_context": ""
                },
                "payment_request_data": {
                    "label": "applepay",
                    "supported_networks": [
                        "visa",
                        "masterCard",
                        "amex",
                        "discover"
                    ],
                    "merchant_capabilities": [
                        "supports3DS"
                    ]
                }
            }
        }
    }

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
  • I added a CHANGELOG entry if applicable

@ShankarSinghC ShankarSinghC added A-core Area: Core flows C-bug Category: Bug S-waiting-on-review Status: This PR has been implemented and needs to be reviewed A-payment-methods Area: Payment Methods labels Jan 3, 2024
@ShankarSinghC ShankarSinghC self-assigned this Jan 3, 2024
@ShankarSinghC ShankarSinghC requested review from a team as code owners January 3, 2024 12:29
vspecky
vspecky previously approved these changes Jan 10, 2024
SamraatBansal
SamraatBansal previously approved these changes Jan 10, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 10, 2024
@SanchithHegde SanchithHegde removed this pull request from the merge queue due to a manual request Jan 10, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 11, 2024
Merged via the queue into main with commit 4f9c04b Jan 11, 2024
9 of 11 checks passed
@likhinbopanna likhinbopanna deleted the fix-apple-pay-ntwt-flow branch January 11, 2024 08:25
pixincreate added a commit that referenced this pull request Jan 12, 2024
…-router

* 'main' of github.com:juspay/hyperswitch: (84 commits)
  chore(config): add merchant_secret config for webhooks for  cashtocode and volt in wasm dashboard (#3333)
  chore(version): 2024.01.12.0
  fix: update amount_capturable based on intent_status and payment flow (#3278)
  feat: add support for card extended bin in payment attempt (#3312)
  feat(connector): [cybersource] Implement 3DS flow for cards (#3290)
  chore: remove connector auth TOML files from `.gitignore` and `.dockerignore` (#3330)
  fix(refund): add merchant_connector_id in refund (#3303)
  feat(connector): [BOA/CYB] Store AVS response in connector_metadata (#3271)
  feat(outgoingwebhookevent): adding api for query to fetch outgoing webhook events log (#3310)
  feat(router): payment_method block (#3056)
  feat(connector): [Volt] Add support for refund webhooks  (#3326)
  feat(users): invite user without email (#3328)
  feat(euclid_wasm): config changes for NMI (#3329)
  refactor(router): restricted list payment method Customer to api-key based (#3100)
  feat(connector): [BOA/Cyb] Include merchant metadata in capture and void requests (#3308)
  fix(router): add config to avoid connector tokenization for `apple pay` `simplified flow` (#3234)
  refactor(router): flagged order_details validation to skip validation (#3116)
  fix(core): surcharge with saved card failure (#3318)
  feat(payment_link): Added sdk layout option payment link (#3207)
  chore(version): 2024.01.11.0
  ...
pixincreate added a commit that referenced this pull request Jan 13, 2024
* 'main' of github.com:juspay/hyperswitch: (22 commits)
  chore(version): 2024.01.12.1
  chore: add api reference for blocklist (#3336)
  chore(config): add merchant_secret config for webhooks for  cashtocode and volt in wasm dashboard (#3333)
  chore(version): 2024.01.12.0
  fix: update amount_capturable based on intent_status and payment flow (#3278)
  feat: add support for card extended bin in payment attempt (#3312)
  feat(connector): [cybersource] Implement 3DS flow for cards (#3290)
  chore: remove connector auth TOML files from `.gitignore` and `.dockerignore` (#3330)
  fix(refund): add merchant_connector_id in refund (#3303)
  feat(connector): [BOA/CYB] Store AVS response in connector_metadata (#3271)
  feat(outgoingwebhookevent): adding api for query to fetch outgoing webhook events log (#3310)
  feat(router): payment_method block (#3056)
  feat(connector): [Volt] Add support for refund webhooks  (#3326)
  feat(users): invite user without email (#3328)
  feat(euclid_wasm): config changes for NMI (#3329)
  refactor(router): restricted list payment method Customer to api-key based (#3100)
  feat(connector): [BOA/Cyb] Include merchant metadata in capture and void requests (#3308)
  fix(router): add config to avoid connector tokenization for `apple pay` `simplified flow` (#3234)
  refactor(router): flagged order_details validation to skip validation (#3116)
  fix(core): surcharge with saved card failure (#3318)
  ...
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows A-payment-methods Area: Payment Methods C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants