Skip to content

feat: hs external vault flow and return user support#1643

Merged
ArushKapoorJuspay merged 5 commits into
mainfrom
feat/hs-external-and-return-user-flow
Jun 25, 2026
Merged

feat: hs external vault flow and return user support#1643
ArushKapoorJuspay merged 5 commits into
mainfrom
feat/hs-external-and-return-user-flow

Conversation

@sakksham7

@sakksham7 sakksham7 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Type of Change

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

Description

Added Hyperswitch External Vault flow support and return user flow
Handled Hyperswitch Vault for Two flows, PCI and Non PCI with a build time flag IS_PCI_COMPLIANT
Changed Request Payload for HS vault in two different flows

How did you test it?

#1642

Tested all the flows via Checking
HS as External Vault - Non PCI Mode

Screen.Recording.2026-06-25.at.8.49.41.PM.mov

HS as Default Vault - PCI Mode

Screen.Recording.2026-06-25.at.8.53.39.PM.mov
Screen.Recording.2026-06-25.at.8.52.55.PM.mov

VGS External Vault -

Uploading Screen Recording 2026-06-25 at 8.54.29 PM.mov…

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com

semanticdiff-com Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  webpack.common.js  70% smaller
  .env Unsupported file format
  src/CardCVCElement.res Unsupported file format
  src/Components/SavedCardItem.res Unsupported file format
  src/Components/SavedMethods.res Unsupported file format
  src/GlobalVars.res Unsupported file format
  src/LoaderController.res Unsupported file format
  src/Payments/CardsSDK.res Unsupported file format
  src/Payments/ParentCardComponent.res Unsupported file format
  src/Payments/VGSVault.res Unsupported file format
  src/Payments/VaultHelpers.res Unsupported file format
  src/Utilities/ApiEndpoint.res Unsupported file format
  src/Utilities/PaymentBody.res Unsupported file format
  src/Utilities/PaymentManagementBody.res Unsupported file format
  src/hyper-loader/LoaderPaymentElement.res Unsupported file format

@XyneSpaces

Copy link
Copy Markdown

PR Review: feat: hs external vault flow and return user support

Summary

Large feature addition (~700 lines added across 30 files) implementing external vault integration and return user functionality.

Findings

[blocking] High-risk change in CardCVCElement.res — CVV validation

Given this file is marked as payment-critical (handles sensitive card data), the changes need special scrutiny:

  • Verify CVV validation still occurs client-side before submission
  • Ensure external vault tokens don't bypass length/format validation
  • Check that return user flow doesn't expose previously-entered CVV values

[should-fix] New atoms added to RecoilAtoms.res need default values

The diff shows 44 lines added to RecoilAtoms.res. Verify each new atom has:

  1. A sensible default value (not undefined)
  2. Persistence configuration if the value should survive page reload
  3. Clear documentation of the atom's purpose

[should-fix] PaymentHelpers.res changes — error handling

With 342 lines added, ensure:

  • All new async operations have proper error boundaries
  • External vault failures gracefully degrade (don't crash the payment flow)
  • Timeouts are configured for external vault API calls

[nit] Hyper.resi interface additions

The 15 new lines in the interface file should include JSDoc/ResDoc comments explaining the new public API surface for external vault flows.

Recommendations

Given the size and sensitivity of this PR:

  1. Request manual testing of CVV entry with external vault enabled
  2. Verify saved card flows still work with return user feature
  3. Check bundle size impact (30 files changed)

Review conducted by XyneSpaces automated PR reviewer

Comment thread src/CardCVCElement.res Outdated
Comment thread src/Utilities/PaymentBody.res
Comment thread src/Payments/VaultHelpers.res Outdated
Comment thread src/Utilities/PaymentBody.res Outdated
Comment thread src/Payments/VGSVault.res
@XyneSpaces

Copy link
Copy Markdown

dummy call to check issue API

Comment thread webpack.common.js
aritro2002
aritro2002 previously approved these changes Jun 25, 2026
Comment thread src/Utilities/ApiEndpoint.res
Comment thread src/Utilities/ApiEndpoint.res Outdated
@ArushKapoorJuspay ArushKapoorJuspay merged commit 8afe79b into main Jun 25, 2026
18 of 20 checks passed
@ArushKapoorJuspay ArushKapoorJuspay deleted the feat/hs-external-and-return-user-flow branch June 25, 2026 15:27
@github-actions github-actions Bot added the Closed Label will be automatically added when the PR will get merged to main label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Closed Label will be automatically added when the PR will get merged to main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HS Vault extrenal flow and return user

5 participants