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

[FC] Add app verification to signup flows (Networking+ID) #9830

Merged

Conversation

carlosmuvi-stripe
Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe commented Dec 25, 2024

Summary

Added mobile signup endpoint and shared SignUpParams.

We'll be calling the new mobile signup endpoint on verified flows (manifest.app_verification_enabled).

To better understand the changes see this tables of endpoint changes for Networking and IBP:

image.png

image.png

Motivation

Creating the foundation for implementing user sign up functionality in the Stripe Android SDK

Testing

  • Added tests
  • Modified tests
  • Manually verified

Changelog

[Added] Created SignUpParams class structure for upcoming sign up implementation

@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from f9b77e8 to f0e8694 Compare December 25, 2024 11:24
Copy link
Contributor

github-actions bot commented Dec 25, 2024

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │            compressed            │          uncompressed          
          ├───────────┬───────────┬──────────┼──────────┬──────────┬──────────
 APK      │ old       │ new       │ diff     │ old      │ new      │ diff     
──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼──────────
      dex │     4 MiB │     4 MiB │ +1.5 KiB │  8.6 MiB │  8.6 MiB │ +3.6 KiB 
     arsc │   2.3 MiB │   2.3 MiB │      0 B │  2.3 MiB │  2.3 MiB │      0 B 
 manifest │   5.1 KiB │   5.1 KiB │      0 B │ 25.2 KiB │ 25.2 KiB │      0 B 
      res │ 908.4 KiB │ 908.4 KiB │      0 B │  1.4 MiB │  1.4 MiB │      0 B 
   native │   2.6 MiB │   2.6 MiB │      0 B │    6 MiB │    6 MiB │      0 B 
    asset │   1.6 MiB │   1.6 MiB │     -1 B │  1.6 MiB │  1.6 MiB │     -1 B 
    other │   1.4 MiB │   1.4 MiB │     +9 B │  1.6 MiB │  1.6 MiB │      0 B 
──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼──────────
    total │  12.7 MiB │  12.7 MiB │ +1.5 KiB │ 21.6 MiB │ 21.6 MiB │ +3.6 KiB 

 DEX     │ old   │ new   │ diff            
─────────┼───────┼───────┼─────────────────
   files │     1 │     1 │   0             
 strings │ 40855 │ 40865 │ +10 (+21 -11)   
   types │ 14086 │ 14088 │  +2 (+11 -9)    
 classes │ 11756 │ 11758 │  +2 (+4 -2)     
 methods │ 59968 │ 59976 │  +8 (+338 -330) 
  fields │ 40046 │ 40074 │ +28 (+444 -416) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  243 │  243 │  0   
 entries │ 6209 │ 6209 │  0
APK
     compressed      │     uncompressed     │                                           
──────────┬──────────┼───────────┬──────────┤                                           
 size     │ diff     │ size      │ diff     │ path                                      
──────────┼──────────┼───────────┼──────────┼───────────────────────────────────────────
    4 MiB │ +1.5 KiB │   8.6 MiB │ +3.6 KiB │ ∆ classes.dex                             
 53.5 KiB │     +8 B │ 118.7 KiB │      0 B │ ∆ META-INF/CERT.SF                        
 50.3 KiB │     +3 B │ 118.6 KiB │      0 B │ ∆ META-INF/MANIFEST.MF                    
    271 B │     -1 B │     120 B │      0 B │ ∆ META-INF/version-control-info.textproto 
    989 B │     -1 B │     857 B │     -1 B │ ∆ assets/dexopt/baseline.profm            
  1.2 KiB │     -1 B │   1.2 KiB │      0 B │ ∆ META-INF/CERT.RSA                       
──────────┼──────────┼───────────┼──────────┼───────────────────────────────────────────
  4.1 MiB │ +1.5 KiB │   8.9 MiB │ +3.6 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff          
  ───────┼───────┼───────────────
   40855 │ 40865 │ +10 (+21 -11) 
  
  + , requestSurface=
  + , verificationToken=
  + LP6/u3;
  + LS5/L;
  + LS5/M;
  + Lf8/g;
  + SignUpParams(email=
  + [LP6/J2;
  + [LP6/N2;
  + [LP6/Z2;
  + [LP6/e3;
  + [LP6/j3;
  + [LP6/u3;
  + [LS5/h;
  + consentAction
  + consumers/mobile/sign_up
  + mobileSignUp
  + mobileSignUp-0E7RQCE(Lcom/stripe/android/model/SignUpParams;Lcom/stripe/android/core/networking/ApiRequest_Options;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
  + requestSurface
  + signUp-0E7RQCE(Lcom/stripe/android/model/SignUpParams;Lcom/stripe/android/core/networking/ApiRequest_Options;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"3a43e94","r8-mode":"full","version":"8.7.14"}
  
  - LLLLLLLLLLLLL
  - LS6/W;
  - Lk7/q;
  - [LP6/K2;
  - [LP6/O2;
  - [LP6/a3;
  - [LP6/f3;
  - [LP6/n3;
  - [LP6/o2;
  - [LS5/f;
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"340629f","r8-mode":"full","version":"8.7.14"}
  

TYPES:

   old   │ new   │ diff        
  ───────┼───────┼─────────────
   14086 │ 14088 │ +2 (+11 -9) 
  
  + LP6/u3;
  + LS5/L;
  + LS5/M;
  + Lf8/g;
  + [LP6/J2;
  + [LP6/N2;
  + [LP6/Z2;
  + [LP6/e3;
  + [LP6/j3;
  + [LP6/u3;
  + [LS5/h;
  
  - LS6/W;
  - Lk7/q;
  - [LP6/K2;
  - [LP6/O2;
  - [LP6/a3;
  - [LP6/f3;
  - [LP6/n3;
  - [LP6/o2;
  - [LS5/f;
  

METHODS:

   old   │ new   │ diff           
  ───────┼───────┼────────────────
   59968 │ 59976 │ +8 (+338 -330) 
  
  + A5.H0 <init>(d, o, c, h, a, a)
  + A5.H0 <init>(d, a, a, a, a, a)
  + A5.r c(Throwable, t3) → Throwable
  + B9.b t0(JSONObject) → r2
  + B9.b v0(l3)
  + C0.c q0(l3) → L
  + D8.g k(String) → q3
  + E6.b <init>(s, o, W)
  + F2.c d(l3, int) → String
  + G5.Q M(l3) → int
  + I2.b <init>(d, a, a, a, a, int)
  + I4.B k() → l3
  + I4.F k() → l3
  + I4.t k() → l3
  + I4.x <init>(u2, String)
  + J6.g o(l3, String) → f
  + K6.l <init>(l3, n0, boolean, boolean, List, c, String, k0, a, List, List, boolean, boolean, b, q, K0, z, e, boolean, a)
  + L7.l <init>(s, c, boolean, boolean, a, a)
  + P6.A2 <init>(z2, Integer, String, String, String, Integer)
  + P6.B2 <init>(c, String, String, String, String)
  + P6.C2 <init>(ArrayList, B2)
  + P6.C2 d() → Map
  + P6.D2 <init>(Map)
  + P6.D2 describeContents() → int
  + P6.D2 equals(Object) → boolean
  + P6.D2 hashCode() → int
  + P6.D2 toString() → String
  + P6.D2 writeToParcel(Parcel, int)
  + P6.E2 <init>(String, int, String)
  + P6.E2 valueOf(String) → E2
  + P6.E2 values() → E2[]
  + P6.G2 <init>(String, String)
  + P6.H2 <init>(String, Long, String, F2, Source_Usage, String, E2, C2, String, LinkedHashMap, G2, D2, LinkedHashSet)
  + P6.H2 d() → Map
  + P6.I2 <init>(String, String, i, String, String, String, Integer, Integer, j, String, SourceTypeModel_Card_ThreeDSecureStatus, q3)
  + P6.J2 <clinit>()
  + P6.J2 <init>(String, String, String, String, String, String, String)
  + P6.J2 describeContents() → int
  + P6.J2 equals(Object) → boolean
  + P6.J2 hashCode() → int
  + P6.J2 toString() → String
  + P6.J2 writeToParcel(Parcel, int)
  + P6.L2 <init>(String, String, String, String, String, String, String, int, String)
  + P6.L2 d() → Map
  + P6.L2 e() → JSONObject
  + P6.M2 <init>(String, String, String, String, String, String, String, ArrayList, String, String, String, String)
  + P6.N2 <clinit>()
  + P6.N2 <init>(String, boolean, String, Map)
  + P6.N2 describeContents() → int
  + P6.N2 equals(Object) → boolean
  + P6.N2 hashCode() → int
  + P6.N2 toString() → String
  + P6.N2 writeToParcel(Parcel, int)
  + P6.O2 <init>(int)
  + P6.O2 createFromParcel(Parcel) → Object
  + P6.O2 newArray(int) → Object[]
  + P6.P2 <init>(String, String, String, String, String, String, String, String, String, String, String)
  + P6.Q2 <init>(String, M2, Long, String, String, boolean, P2, String, String)
  + P6.R2 <init>(String, PublicKey, ArrayList, String)
  + P6.S2 <init>(e3)
  + P6.S2 <init>(String, String, String, R2)
  + P6.T2 <init>(String, String, Uri, String)
  + P6.Y2 <init>(String)
  + P6.Z2 <clinit>()
  + P6.Z2 <init>(String, int, String)
  + P6.Z2 describeContents() → int
  + P6.Z2 equals(Object) → boolean
  + P6.Z2 hashCode() → int
  + P6.Z2 toString() → String
  + P6.Z2 writeToParcel(Parcel, int)
  + P6.Z e() → q3
  + P6.a0 e() → q3
  + P6.a1 <init>(String, List,
...✂

@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch 2 times, most recently from 8881bad to fc381b6 Compare December 26, 2024 08:45
@carlosmuvi-stripe carlosmuvi-stripe changed the title Add SignUpParams model class [FC] Add app verification to signup flows (Networking+ID) Dec 26, 2024
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from 83d5bb9 to 077d40d Compare December 28, 2024 11:35
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from fc381b6 to 6732c0b Compare December 28, 2024 11:35
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from 077d40d to 6e7869f Compare December 28, 2024 11:50
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from 6732c0b to 30ff0fa Compare December 28, 2024 11:50
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from 6e7869f to 121957d Compare December 28, 2024 14:53
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from 30ff0fa to d440b8b Compare December 28, 2024 14:53
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from 121957d to d2e2584 Compare December 28, 2024 15:26
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from d440b8b to 95103be Compare December 28, 2024 15:31
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from d2e2584 to 656119b Compare December 28, 2024 16:26
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from 95103be to 439af93 Compare December 28, 2024 16:27
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from 656119b to ee050b2 Compare December 28, 2024 16:30
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch 2 times, most recently from c466db6 to 8984961 Compare December 30, 2024 09:48
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from ee050b2 to 69327fb Compare January 2, 2025 15:55
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from 8984961 to 5a1f7e4 Compare January 2, 2025 15:55
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from 69327fb to d820ca2 Compare January 2, 2025 15:59
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from 5a1f7e4 to 738d2c0 Compare January 2, 2025 16:00
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from d820ca2 to e32dab7 Compare January 2, 2025 18:09
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from 738d2c0 to 4e61478 Compare January 2, 2025 18:09
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows branch from 0acfafe to bdcf9f7 Compare January 14, 2025 22:23
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from 3574205 to 827243e Compare January 14, 2025 22:24
@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as ready for review January 14, 2025 22:31
@carlosmuvi-stripe carlosmuvi-stripe requested review from a team as code owners January 14, 2025 22:31
@carlosmuvi-stripe carlosmuvi-stripe requested review from tillh-stripe and cttsai-stripe and removed request for a team January 14, 2025 22:31
@carlosmuvi-stripe carlosmuvi-stripe changed the base branch from carlosmuvi/12-22-updates_lookup_call_to_use_mobile_endpoint_on_verified_flows to graphite-base/9830 January 15, 2025 19:39
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from 827243e to 1951e79 Compare January 15, 2025 19:39
@carlosmuvi-stripe carlosmuvi-stripe changed the base branch from graphite-base/9830 to master January 15, 2025 19:40
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch 5 times, most recently from 93f4ce1 to 9fd1a9f Compare January 16, 2025 20:35
Comment on lines 135 to 136
// SaveAccountToLink endpoint Signs up when providing email + phone number
// **and** saves accounts to link in the same request.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// SaveAccountToLink endpoint Signs up when providing email + phone number
// **and** saves accounts to link in the same request.
// SaveAccountToLink endpoint signs up when providing email + phone number
// **and** saves accounts to Link in the same request.

@@ -111,6 +121,7 @@ internal interface FinancialConnectionsConsumerSessionRepository {
}
}

@Suppress("TooManyFunctions")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we capture this in our baseline file instead?

}.getOrThrow()
}

override suspend fun mobileSignUp(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make both signUp methods call some internal method, so that we can avoid the code duplication?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added performSignUp!

)

@Test
fun `performSignup should navigate to next pane on success`() = runTest {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a test for the non-verified case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done! also added a test For the Networking Handler.

@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch 2 times, most recently from ac2c19d to 2b2a4e4 Compare January 16, 2025 22:16
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/12-25-adds-signup-mobile-endpoint branch from 2b2a4e4 to ed914cb Compare January 16, 2025 22:22
@toluo-stripe toluo-stripe mentioned this pull request Jan 16, 2025
3 tasks
@carlosmuvi-stripe carlosmuvi-stripe merged commit 86ad1f7 into master Jan 17, 2025
17 checks passed
@carlosmuvi-stripe carlosmuvi-stripe deleted the carlosmuvi/12-25-adds-signup-mobile-endpoint branch January 17, 2025 17:39
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.

2 participants