stripe / stripe-android

Stripe Android SDK
https://stripe.com/docs/mobile/android
MIT License
1.27k stars 640 forks source link

Pass default payment method ID to `elements/sessions` when using `CustomerSession` #8678

Closed samer-stripe closed 3 months ago

samer-stripe commented 3 months ago

Summary

Pass default payment method ID to elements/sessions when using CustomerSession

Motivation

Ensures payment methods are properly deduped in CustomerSession.

Testing

github-actions[bot] commented 3 months ago

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 │ +418 B │   8.7 MiB │   8.7 MiB │ +1.3 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.6 KiB │  25.6 KiB │      0 B 
      res │ 918.5 KiB │ 918.5 KiB │    0 B │   1.5 MiB │   1.5 MiB │      0 B 
   native │   2.6 MiB │   2.6 MiB │    0 B │     6 MiB │     6 MiB │      0 B 
    asset │   2.9 MiB │   2.9 MiB │   +6 B │   2.9 MiB │   2.9 MiB │     +6 B 
    other │   195 KiB │   195 KiB │    0 B │ 428.4 KiB │ 428.4 KiB │      0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼──────────
    total │  12.8 MiB │  12.8 MiB │ +424 B │  21.8 MiB │  21.8 MiB │ +1.3 KiB 

 DEX     │ old   │ new   │ diff           
─────────┼───────┼───────┼────────────────
   files │     1 │     1 │  0             
 strings │ 43504 │ 43507 │ +3 (+7 -4)     
   types │ 14957 │ 14958 │ +1 (+4 -3)     
 classes │ 12641 │ 12642 │ +1 (+1 -0)     
 methods │ 61900 │ 61906 │ +6 (+207 -201) 
  fields │ 40826 │ 40832 │ +6 (+104 -98)  

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  242 │  242 │  0   
 entries │ 6043 │ 6043 │  0
APK ``` compressed │ uncompressed │ ──────────┬────────┼───────────┬──────────┤ size │ diff │ size │ diff │ path ──────────┼────────┼───────────┼──────────┼──────────────────────────────── 4 MiB │ +418 B │ 8.7 MiB │ +1.3 KiB │ ∆ classes.dex 7.4 KiB │ +5 B │ 7.2 KiB │ +5 B │ ∆ assets/dexopt/baseline.prof 52.9 KiB │ -2 B │ 117.2 KiB │ 0 B │ ∆ META-INF/CERT.SF 885 B │ +1 B │ 753 B │ +1 B │ ∆ assets/dexopt/baseline.profm 1.2 KiB │ +1 B │ 1.2 KiB │ 0 B │ ∆ META-INF/CERT.RSA 49.6 KiB │ +1 B │ 117.1 KiB │ 0 B │ ∆ META-INF/MANIFEST.MF ──────────┼────────┼───────────┼──────────┼──────────────────────────────── 4.1 MiB │ +424 B │ 9 MiB │ +1.3 KiB │ (total) ```
DEX ``` STRINGS: old │ new │ diff ───────┼───────┼──────────── 43504 │ 43507 │ +3 (+7 -4) + , defaultPaymentMethodId= + Lp7/Q; + [Lp7/A; + [Lp7/J; + [Lp7/w; + client_default_payment_method + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:e6db348,r8-mode:full,version:8.3.37} - [Lp7/I; - [Lp7/t; - [Lp7/y; - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:32d9b2a,r8-mode:full,version:8.3.37} TYPES: old │ new │ diff ───────┼───────┼──────────── 14957 │ 14958 │ +1 (+4 -3) + Lp7/Q; + [Lp7/A; + [Lp7/J; + [Lp7/w; - [Lp7/I; - [Lp7/t; - [Lp7/y; METHODS: old │ new │ diff ───────┼───────┼──────────────── 61900 │ 61906 │ +6 (+207 -201) + F6.i A() → Integer + F6.i F() → String + F6.i x() → String + F6.j A() → Integer + F6.j F() → String + F6.j x() → String + F6.k A() → Integer + F6.k F() → String + F6.k x() → String + F6.l A() → Integer + F6.l F() → String + F6.l x() → String + F7.a D0(Boolean, String, x, f, boolean, List, F, a, a, boolean) → Q + G6.O1 (Application, o1, d, a, B, j, m, E, c, l, e, j, o0, W, j, j, J, g) + G6.O1 T(N2, I, e) → Object + G6.O1 U(J, e) → Object + G6.Y (J, Integer, boolean, Set) + H6.l U(Q, N, a, a, q, k, int, int) + H6.l Y(u, N, k, int) + H6.l z(B, Integer, Q, N, String, l, g, k, int) + R5.s v(k, int) → CharSequence + R5.t v(k, int) → CharSequence + R5.u v(k, int) → CharSequence + R5.v v(k, int) → CharSequence + V6.d Y(Throwable) → I + X4.N (p, j, List, ArrayList, boolean, A, I) + c7.A (B, J, e) + c7.B (B, j, d, D, E) + c7.D c() → J + c7.o (J, r, A, e) + c7.r e(A, J) + com.google.android.material.datepicker.q x(q) → int + f7.q A() → y1 + f7.q F() → F1 + f7.q x() → w1 + f7.r A() → y1 + f7.r F() → F1 + f7.r x() → w1 + f7.s A() → y1 + f7.s F() → F1 + f7.s x() → w1 + f7.v A() → y1 + f7.v F() → F1 + f7.v x() → w1 + f7.w A() → y1 + f7.w F() → F1 + f7.w x() → w1 + f8.c x() → Set + h8.i A() → y0 + h8.j A() → y0 + h8.j x() → Set + h8.k A() → y0 + h8.k x() → Set + h8.l A() → y0 + i7.B x() → boolean + i7.t x() → boolean + m6.j A() → boolean + m6.j F(String) → boolean + m6.j H() → ArrayList + m6.j I(String) → i + m6.j J() → List + m6.j x(String) → C + o7.o b(R0, I0, List, String, e) → Object + p0.Q x(H, H, H) → H + p0.X0 A() → e1 + p0.X0 F() → float + p0.X0 G(float) + p0.X0 x(H, H, H) → H + p0.Z0 A() → e1 + p0.Z0 F() → int + p0.Z0 G(int) + p0.Z0 x(H, H, H) → H + p0.b1 A() → e1 + p0.b1 F(long) + p0.b1 x(H, H, H) → H + p0.d1 A() → e1 + p0.d1 x(H, H, H) → H + p5.J c0(N2) → I + p7.A () + p7.A (i, z) + p7.A describeContents() → int + p7.A equals(Object) → boolean + p7.A hashCode() → int + p7.A toString() → String + p7.A writeToParcel(Parcel, int) + p7.C (E0) + p7.C equals(Object) → boolean + p7.C hashCode() → int + p7.C toString() → String + p7.D () + p7.E (String) + p7.G (StripeIntent_Status) + p7.H (Throwable) + p7.H equals(Object) → boolean + p7.H getCause() → Throwable + p7.H getMessage() → String + p7.H hashCode() → int + p7.H toString() → String + p7.I a() → String + p7.J () + p7.J (E0, a, boolean, A, boolean, A, I, j) + p7.J d(J, E0, a, A, int) → J + p7.J describeContents() → int + p7.J equals(Object) → boolean + p7.J hashCode() → int + p7.J toString() → String + p7.J writeToParcel(Parcel, int) + p7.K (a) + p7.L (c) + p7.M () + p7.M equals(Object) → boolean + p7.M hashCode() → int + p7.M toString() → String + p7.O (f, boolean, p) + p7.P (String) + p7.Q (P, O, boolean, int, a, a) + p7.Q equals(Object) → boolean + p7.Q hashCode() → int + p7.Q toString() → String + p7.c (I0, s, k0, j, F, e) + p7.d (s, F, F, e) + p7.e (s, E0, k0, e) + p7.f (k0, E0, s, F, j, String, e) + p7.g (s, E0, F, k0, e) + p7.h (j, k0, E0, s, e) + p7.i (s, e) + p7.j (s, e) + p7.k (s, e) + p7.l (s, boolean, E0, R0, boolean, e) + p7.m (s, e) + p7.n (s, e) + p7.o (s, e) + p7.p (s, e) + p7.q (s, e) + p7.r (s, e) + p7.r i(Obje ...✂ ```