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

Support update functionality in PaymentSheet. #7640

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

samer-stripe
Copy link
Collaborator

Summary

Support update functionality in PaymentSheet.

Note: The update API call is currently not returning a success result. This will be changed in near future.

Motivation

Allows merchants to update their card brand choice for their payment method.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Copy link
Contributor

github-actions bot commented Nov 16, 2023

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 │   3.6 MiB │   3.6 MiB │ +1.4 KiB │   7.8 MiB │   7.8 MiB │ +4.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.4 KiB │  25.4 KiB │      0 B 
      res │ 905.5 KiB │ 905.5 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 │     3 MiB │     3 MiB │    -11 B │     3 MiB │     3 MiB │    -11 B 
    other │ 204.5 KiB │ 204.5 KiB │     +8 B │ 460.3 KiB │ 460.3 KiB │      0 B 
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼──────────
    total │  12.5 MiB │  12.5 MiB │ +1.4 KiB │  20.9 MiB │  20.9 MiB │ +4.6 KiB 

 DEX     │ old   │ new   │ diff              
─────────┼───────┼───────┼───────────────────
   files │     1 │     1 │   0               
 strings │ 38543 │ 38557 │ +14 (+62 -48)     
   types │ 12679 │ 12688 │  +9 (+56 -47)     
 classes │ 10662 │ 10668 │  +6 (+13 -7)      
 methods │ 55519 │ 55547 │ +28 (+2866 -2838) 
  fields │ 35707 │ 35732 │ +25 (+2266 -2241) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  292 │  292 │  0   
 entries │ 6936 │ 6936 │  0
APK
     compressed      │     uncompressed     │                                
──────────┬──────────┼───────────┬──────────┤                                
 size     │ diff     │ size      │ diff     │ path                           
──────────┼──────────┼───────────┼──────────┼────────────────────────────────
  3.6 MiB │ +1.4 KiB │   7.8 MiB │ +4.6 KiB │ ∆ classes.dex                  
  6.4 KiB │    -10 B │   6.2 KiB │    -10 B │ ∆ assets/dexopt/baseline.prof  
 65.6 KiB │    +10 B │ 147.1 KiB │      0 B │ ∆ META-INF/CERT.SF             
 49.9 KiB │     -2 B │ 147.1 KiB │      0 B │ ∆ META-INF/MANIFEST.MF         
    775 B │     -1 B │     643 B │     -1 B │ ∆ assets/dexopt/baseline.profm 
──────────┼──────────┼───────────┼──────────┼────────────────────────────────
  3.7 MiB │ +1.4 KiB │   8.1 MiB │ +4.6 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff          
  ───────┼───────┼───────────────
   38543 │ 38557 │ +14 (+62 -48) 
  + Card(expiryMonth=
  + Failed to update payment method
  + Failed to update payment method 
  + Invalid internal state in PaymentMethodUpdateParams
  + Lai/s1;
  + Lbd/s0;
  + Lef/g;
  + Lgd/n;
  + Lif/j;
  + Lqe/c0;
  + Ltf/m;
  + Lue/l;
  + Lyc/w5;
  + Lyc/x5;
  + Lyc/y5;
  + Lye/s;
  + Lye/t;
  + [Lef/g;
  + [Lfg/d4;
  + [Lfg/i7;
  + [Lfg/o3;
  + [Lfg/o4;
  + [Lfg/u5;
  + [Lfg/v0;
  + [Lgd/g;
  + [Lgd/k;
  + [Lgd/m;
  + [Lhf/b1;
  + [Lhf/e;
  + [Lhf/o1;
  + [Lhf/o;
  + [Lhf/r0;
  + [Lhf/t;
  + [Lhf/z;
  + [Lif/j;
  + [Lmf/a0;
  + [Lmf/y;
  + [Lnd/k2;
  + [Lnd/n2;
  + [Lne/e0;
  + [Lod/b;
  + [Lod/h;
  + [Lqe/o;
  + [Lsg/a2;
  + [Lsg/e1;
  + [Lsg/n2;
  + [Lsg/p1;
  + [Lsg/w1;
  + [Lsg/x0;
  + [Lxf/d;
  + [Lyc/j5;
  + [Lyc/o5;
  + [Lyc/p5;
  + [Lyc/q4;
  + [Lyc/q5;
  + [Lyc/s3;
  + [Lyc/v3;
  + [Lyc/w5;
  + [Lyc/x5;
  + [Lyc/y5;
  + payment_methods/
  + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:b182cd8,r8-mode:full,version:8.1.65}
  
  - Landroidx/compose/ui/platform/m3;
  - Lfg/p7;
  - Lhf/p1;
  - Lid/p;
  - Lmf/n0;
  - Lqg/x;
  - Lxf/k;
  - [Lef/f;
  - [Lfg/e4;
  - [Lfg/j7;
  - [Lfg/p3;
  - [Lfg/p4;
  - [Lfg/v5;
  - [Lfg/w0;
  - [Lgd/f;
  - [Lgd/h;
  - [Lgd/i;
  - [Lhf/c1;
  - [Lhf/f0;
  - [Lhf/j;
  - [Lhf/p1;
  - [Lhf/r;
  - [Lhf/u0;
  - [Lhf/x;
  - [Lif/f;
  - [Lmf/f0;
  - [Lmf/z;
  - [Lnd/i2;
  - [Lnd/l2;
  - [Lne/b0;
  - [Lod/a;
  - [Lod/f;
  - [Lqe/k;
  - [Lsg/d1;
  - [Lsg/l2;
  - [Lsg/o1;
  - [Lsg/v1;
  - [Lsg/w0;
  - [Lsg/z1;
  - [Lxf/e;
  - [Lyc/m5;
  - [Lyc/r5;
  - [Lyc/t4;
  - [Lyc/t5;
  - [Lyc/u3;
  - [Lyc/v5;
  - [Lyc/w3;
  - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:1fabef3,r8-mode:full,version:8.1.65}
  

TYPES:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   12679 │ 12688 │ +9 (+56 -47) 
  + Lai/s1;
  + Lbd/s0;
  + Lef/g;
  + Lgd/n;
  + Lif/j;
  + Lqe/c0;
  + Ltf/m;
  + Lue/l;
  + Lyc/w5;
  + Lyc/x5;
  + Lyc/y5;
  + Lye/s;
  + Lye/t;
  + [Lef/g;
  + [Lfg/d4;
  + [Lfg/i7;
  + [Lfg/o3;
  + [Lfg/o4;
  + [Lfg/u5;
  + [Lfg/v0;
  + [Lgd/g;
  + [Lgd/k;
  + [Lgd/m;
  + [Lhf/b1;
  + [Lhf/e;
  + [Lhf/o1;
  + [Lhf/o;
  + [Lhf/r0;
  + [Lhf/t;
  + [Lhf/z;
  + [Lif/j;
  + [Lmf/a0;
  + [Lmf/y;
  + [Lnd/k2;
  + [Lnd/n2;
  + [Lne/e0;
  + [Lod/b;
  + [Lod/h;
  + [Lqe/o;
  + [Lsg/a2;
  + [Lsg/e1;
  + [Lsg/n2;
  + [Lsg/p1;
  + [Lsg/w1;
  + [Lsg/x0;
  + [Lxf/d;
  + [Lyc/j5;
  + [Lyc/o5;
  + [Lyc/p5;
  + [Lyc/q4;
  + [Lyc/q5;
  + [Lyc/s3;
  + [Lyc/v3;
  + [Lyc/w5;
  + [Lyc/x5;
  + [Lyc/y5;
  
  - Landroidx/compose/ui/platform/m3;
  - Lfg/p7;
  - Lhf/p1;
  - Lid/p;
  - Lmf/n0;
  - Lqg/x;
  - Lxf/k;
  - [Lef/f;
  - [Lfg/e4;
  - [Lfg/j7;
  - [Lfg/p3;
  - [Lfg/p4;
  - [Lfg/v5;
  - [Lfg/w0;
  - [Lgd/f;
  - [Lgd/h;
  - [Lgd/i;
  - [Lhf/c1;
  - [Lhf/f0;
  - [Lhf/j;
  - [Lhf/p1;
  - [Lhf/r;
  - [Lhf/u0;
  - [Lhf/x;
  - [Lif/f;
  - [Lmf/f0;
  - [Lmf/z;
  - [Lnd/i2;
  - [Lnd/l2;
  - [Lne/b0;
  - [Lod/a;
  - [Lod/f;
  - [Lqe/k;
  - [Lsg/d1;
  - [Lsg/l2;
  - [Lsg/o1;
  - [Lsg/v1;
  - [Lsg/w0;
  - [Lsg/z1;
  - [Lxf/e;
  - [Lyc/m5;
  - [Lyc/r5;
  - [Lyc/t4;
  - [Lyc/t5;
  - [Lyc/u3;
  - [Lyc/v5;
  - [Lyc/w3;
  

METHODS:

   old   │ new   │ diff              
  ───────┼───────┼───────────────────
   55519 │ 55547 │ +28 (+2866 -2838) 
  + a0.p a(boolean, n0, y0, i, int)
  + a0.p b(f, p, i, int)
  + a0.p m(String) → z0
  + a0.p n(c7, i, int)
  + a0.p q(b, i, int)
  + a0.p w0(JSONObject) → x3
  + a7.b o0(JSONObject) → z3
  + af.b a(String, String, x5, i, k) → Object
  + af.b c(String, Locale, x5, k0, String, i, n) → Object
  + ai.a0 <clinit>()
  + ai.a0 <init>()
  + ai.a0 c(c) → Object
  + ai.a0 d(d, Object)
  + ai.a0 e() → g
  + ai.a1 <clinit>()
  + ai.a1 a(String) → String
  + ai.b0 a() → b[]
  + ai.b0 b()
  + ai.b1 <init>(g)
  + ai.b1 a(String) → int
  + ai.b1 b() → String
  + ai.b1 c() → m
  + ai.b1 d() → List
  + ai.b1 e() → int
  + ai.b1 equals(Object) → boolean
  + ai.b1 f(int) → String
  + ai.b1 g() → boolean
  + ai.b1 h() → Set
  + ai.b1 hashCode() → int
  + ai.b1 i() → boolean
  + ai.b1 j(int) → List
  + ai.b1 k(int) → g
  + ai.b1 l(int) → boolean
  + ai.b1 toString() → String
  + ai.c0 <init>(g, g, int)
  + ai.c1 <init>(short[])
  + ai.c1 a() → Object
  + ai.c1 b(int)
  + ai.c1 d() → int
  + ai.d0 <init>(b, b, int)
  + ai.d0 e() → g
  + ai.d0 f() → Object
  + ai.d0
...✂

@samer-stripe samer-stripe force-pushed the samer/support-update-in-payment-sheet branch from 4d03a2f to cd3ebd7 Compare November 17, 2023 16:14
@samer-stripe samer-stripe enabled auto-merge (squash) November 17, 2023 16:18
@samer-stripe samer-stripe merged commit 79cc4a3 into master Nov 17, 2023
10 checks passed
@samer-stripe samer-stripe deleted the samer/support-update-in-payment-sheet branch November 17, 2023 16:47
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