Skip to content

[BDCC] Add requiresModification parameter to control card update submission #10997

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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

carlosmuvi-stripe
Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe commented Jun 25, 2025

Summary

Added a new requiresModification parameter to EditCardDetailsInteractor to control when card details can be submitted without requiring modifications.

  • On regular, user-triggered card updates, where no prefill occurs.modification is required to submit.
  • On pre-payment with missing billing details, where we pre-fill billing info, allow submission without form modification, so the form just needs to be completed.

Motivation

This change allows the billing details update flow to submit without requiring form modifications, while maintaining the existing behavior for regular card updates where modifications are required before submission.

Testing

  • Added tests for requiresModification parameter functionality
  • Modified existing tests to include new parameter
  • Manually verified both billing details update flow and regular update flow

- Fix ConsumerPaymentDetails model to properly handle billing details
- Update ConsumerPaymentDetailsCreateParams and UpdateParams for correct field mappings
- Fix ConsumerPaymentDetailsJsonParser to handle billing address parsing
- Update PaymentMethodMetadata to use proper billing details configuration
- Update LinkConfiguration to pass through billing details collection configuration
- Add LinkBillingDetailsUtils for effective billing details handling and validation
- Implement CompleteLinkFlow to unify payment completion logic
- Update Link UI components to handle billing details update flows
- Add support for billing details validation before payment confirmation
- Update PaymentElementLoader to properly handle billing details collection
- Enhance UpdateCard flow to support billing details collection
- Add comprehensive tests for ConsumerPaymentDetailsCreateParams functionality
- Update all Link-related test files to use new CompleteLinkFlow pattern
- Add tests for LinkBillingDetailsUtils validation logic
- Update test factories and fixtures to include billing details configuration
- Fix test compilation issues and update method signatures
- Add string resources for billing details update flows
- Update screenshot tests to handle new UI states
- Consolidate and clean up test naming conventions for better readability
- Add requiresModification parameter to control submission behavior
- Update UpdateCardScreenState logic from cardModified to readyToSubmit
- Set requiresModification=false for billing details update flow
- Set requiresModification=true for regular card update flow
- Add comprehensive unit tests for new functionality
- Fix compilation issues in test files
@carlosmuvi-stripe carlosmuvi-stripe changed the title Add requiresModification parameter to control card update submission [BDCC] Add requiresModification parameter to control card update submission Jun 25, 2025
Copy link
Contributor

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)

          │          compressed           │         uncompressed         
          ├───────────┬───────────┬───────┼───────────┬───────────┬──────
 APK      │ old       │ new       │ diff  │ old       │ new       │ diff 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼──────
      dex │   2.1 MiB │   2.1 MiB │   0 B │   4.3 MiB │   4.3 MiB │  0 B 
     arsc │     1 MiB │     1 MiB │   0 B │     1 MiB │     1 MiB │  0 B 
 manifest │   2.3 KiB │   2.3 KiB │   0 B │     8 KiB │     8 KiB │  0 B 
      res │ 302.9 KiB │ 302.9 KiB │   0 B │   457 KiB │   457 KiB │  0 B 
   native │   6.2 MiB │   6.2 MiB │   0 B │  15.8 MiB │  15.8 MiB │  0 B 
    asset │   7.7 KiB │   7.7 KiB │   0 B │   7.4 KiB │   7.4 KiB │  0 B 
    other │  95.8 KiB │  95.8 KiB │ -15 B │ 183.5 KiB │ 183.5 KiB │  0 B 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼──────
    total │   9.8 MiB │   9.8 MiB │ -15 B │  21.8 MiB │  21.8 MiB │  0 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 20682 │ 20682 │ 0 (+0 -0) 
   types │  6503 │  6503 │ 0 (+0 -0) 
 classes │  5266 │  5266 │ 0 (+0 -0) 
 methods │ 31511 │ 31511 │ 0 (+0 -0) 
  fields │ 18239 │ 18239 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  164 │  164 │  0   
 entries │ 3646 │ 3646 │  0
APK
    compressed    │   uncompressed   │                                           
──────────┬───────┼───────────┬──────┤                                           
 size     │ diff  │ size      │ diff │ path                                      
──────────┼───────┼───────────┼──────┼───────────────────────────────────────────
 29.2 KiB │  -8 B │  64.6 KiB │  0 B │ ∆ META-INF/CERT.SF                        
 25.9 KiB │  -6 B │  64.5 KiB │  0 B │ ∆ META-INF/MANIFEST.MF                    
    271 B │  -1 B │     120 B │  0 B │ ∆ META-INF/version-control-info.textproto 
──────────┼───────┼───────────┼──────┼───────────────────────────────────────────
 55.3 KiB │ -15 B │ 129.3 KiB │  0 B │ (total)

Base automatically changed from carlosmuvi/bdcc to master June 30, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant