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

Add support for Swish in PaymentSheet and bindings #7337

Merged
merged 10 commits into from
Sep 25, 2023
Merged

Conversation

tillh-stripe
Copy link
Collaborator

@tillh-stripe tillh-stripe commented Sep 20, 2023

Summary

This pull request adds support for Swish for PaymentIntents in PaymentSheet and via bindings in private beta.

Motivation

🇸🇪

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

PaymentSheet

PaymentSheet now supports Swish for PaymentIntents in private beta.

Payments

Added support for Swish for PaymentIntents in private beta.

Comment on lines 1095 to 1096
"light_theme_png": null,
"light_theme_svg": null
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don’t have any icons for Swish. Should probably add them to pay-server first before merging this.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 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 │   +911 B │   7.8 MiB │   7.8 MiB │ +1.5 KiB 
     arsc │   2.2 MiB │   2.2 MiB │ +1.3 KiB │   2.2 MiB │   2.2 MiB │ +1.3 KiB 
 manifest │   4.9 KiB │   4.9 KiB │      0 B │  24.2 KiB │  24.2 KiB │      0 B 
      res │ 887.9 KiB │ 890.6 KiB │ +2.8 KiB │   1.4 MiB │   1.4 MiB │ +5.6 KiB 
   native │   2.6 MiB │   2.6 MiB │      0 B │     6 MiB │     6 MiB │      0 B 
    asset │     3 MiB │     3 MiB │    +20 B │     3 MiB │     3 MiB │    +80 B 
    other │ 202.1 KiB │ 202.5 KiB │   +395 B │ 455.1 KiB │ 455.9 KiB │   +822 B 
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼──────────
    total │  12.4 MiB │  12.4 MiB │ +5.4 KiB │  20.8 MiB │  20.8 MiB │ +9.4 KiB 

 DEX     │ old   │ new   │ diff              
─────────┼───────┼───────┼───────────────────
   files │     1 │     1 │   0               
 strings │ 38536 │ 38547 │ +11 (+42 -31)     
   types │ 12735 │ 12739 │  +4 (+33 -29)     
 classes │ 10741 │ 10743 │  +2 (+4 -2)       
 methods │ 56193 │ 56204 │ +11 (+1376 -1365) 
  fields │ 35439 │ 35446 │  +7 (+1230 -1223) 

 ARSC    │ old  │ new  │ diff       
─────────┼──────┼──────┼────────────
 configs │  292 │  292 │  0         
 entries │ 6967 │ 6973 │ +6 (+6 -0)
APK
     compressed      │     uncompressed     │                               
──────────┬──────────┼───────────┬──────────┤                               
 size     │ diff     │ size      │ diff     │ path                          
──────────┼──────────┼───────────┼──────────┼───────────────────────────────
  2.2 MiB │ +1.3 KiB │   2.2 MiB │ +1.3 KiB │ ∆ resources.arsc              
  3.6 MiB │   +911 B │   7.8 MiB │ +1.5 KiB │ ∆ classes.dex                 
    886 B │   +886 B │     2 KiB │   +2 KiB │ + res/VJ.xml                  
    495 B │   +495 B │     988 B │   +988 B │ + res/Fj.xml                  
    492 B │   +492 B │     988 B │   +988 B │ + res/4w.xml                  
    486 B │   +486 B │     988 B │   +988 B │ + res/sm.xml                  
    430 B │   +430 B │     796 B │   +796 B │ + res/c21.xml                 
 49.1 KiB │   +207 B │ 145.3 KiB │   +411 B │ ∆ META-INF/MANIFEST.MF        
 64.8 KiB │   +190 B │ 145.4 KiB │   +411 B │ ∆ META-INF/CERT.SF            
    449 B │    +21 B │     788 B │     -8 B │ ∆ res/c2.xml                  
  6.3 KiB │    +13 B │   6.2 KiB │    +13 B │ ∆ assets/dexopt/baseline.prof 
  2.9 KiB │     +7 B │  24.4 KiB │    +67 B │ ∆ assets/lpms.json            
    527 B │     +2 B │     956 B │      0 B │ ∆ res/66.xml                  
    598 B │     +2 B │   1.1 KiB │      0 B │ ∆ res/JB.xml                  
    354 B │     +2 B │     588 B │      0 B │ ∆ res/y6.xml                  
  1.2 KiB │     -2 B │   1.2 KiB │      0 B │ ∆ META-INF/CERT.RSA           
    798 B │     +1 B │   1.6 KiB │      0 B │ ∆ res/01.xml                  
    804 B │     +1 B │   1.7 KiB │      0 B │ ∆ res/0H.xml                  
    904 B │     -1 B │     2 KiB │      0 B │ ∆ res/2j.xml                  
    396 B │     +1 B │     688 B │      0 B │ ∆ res/6Q.xml                  
    270 B │     -1 B │     304 B │      0 B │ ∆ res/9m1.xml                 
    396 B │     -1 B │     680 B │      0 B │ ∆ res/A4.xml                  
    559 B │     +1 B │   1.1 KiB │      0 B │ ∆ res/GK.xml                  
    413 B │     -1 B │   1,012 B │      0 B │ ∆ res/Gt.xml                  
    328 B │     +1 B │     468 B │      0 B │ ∆ res/In.xml                  
    327 B │     +1 B │     464 B │      0 B │ ∆ res/Jl.xml                  
    355 B │     +1 B │     588 B │      0 B │ ∆ res/K-.xml                  
  1.1 KiB │     -1 B │   2.7 KiB │      0 B │ ∆ res/L-.xml                  
    369 B │     -1 B │     584 B │      0 B │ ∆ res/Lr.xml                  
    836 B │     -1 B │   1.8 KiB │      0 B │ ∆ res/So.xml                  
    468 B │     +1 B │     892 B │      0 B │ ∆ res/TK.xml                  
    709 B │     -1 B │   1.3 KiB │      0 B │ ∆ res/UK.xml                  
    519 B │     +1 B │   1.4 KiB │      0 B │ ∆ res/bL.xml                  
    760 B │     +1 B │   1.7 KiB │      0 B │ ∆ res/cZ.xml                  
    442 B │     -1 B │     816 B │      0 B │ ∆ res/fg.xml                  
    685 B │     -1 B │   1.3 KiB │      0 B │ ∆ res/hR.xml                  
    439 B │     -1 B │     816 B │      0 B │ ∆ res/kn.xml                  
    443 B │     +1 B │     816 B │      0 B │ ∆ res/oP.xml                  
    400 B │     +1 B │     688 B │      0 B │ ∆ res/rW.xml                  
    397 B │     +1 B │     680 B │      0 B │ ∆ res/rx.xml                  
    326 B │     -1 B │     464 B │      0 B │ ∆ res/sA.xml                  
    413 B │     -1 B │   1,012 B │      0 B │ ∆ res/t8.xml                  
    349 B │     +1 B │     588 B │      0 B │ ∆ res/xj.xml                  
──────────┼──────────┼───────────┼──────────┼───────────────────────────────
  5.9 MiB │ +5.4 KiB │  10.3 MiB │ +9.4 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff          
  ───────┼───────┼───────────────
   38536 │ 38547 │ +11 (+42 -31) 
  + , swish=
  + Lbd/q5;
  + Lbd/r5;
  + Lcg/q;
  + Lpd/x;
  + SEK
  + Swish
  + SwishRedirect
  + SwishRedirect(mobileAuthUrl=
  + VLZLLLLLLLLLLLLLLLLL
  + [Lbd/d5;
  + [Lbd/e5;
  + [Lbd/i5;
  + [Lbd/j5;
  + [Lbd/l3;
  + [Lbd/l4;
  + [Lbd/n3;
  + [Lbd/q5;
  + [Lbd/r5;
  + [Lcg/d;
  + [Lif/e0;
  + [Lmg/t2;
  + [Lmg/u0;
  + [Lmg/y2;
  + [Lmg/z1;
  + [Lpd/u;
  + [Lqd/a2;
  + [Lqd/d3;
  + [Lqd/g2;
  + [Lqd/j2;
  + [Lqd/l1;
  + [Lqd/q0;
  + [Lqd/r1;
  + [Lqd/s0;
  + [Lqd/z2;
  + [Lrd/f;
  + [Lrd/m;
  + [Lrd/q;
  + [Lwe/t;
  + swish
  + swish_handle_redirect_or_display_qr_code
  + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:31b1cec,r8-mode:full,version:8.1.65}
  
  - Lmg/j4;
  - Lrd/t0;
  - VLZLLLLLLLLLLLLLLLL
  - [Lbd/c5;
  - [Lbd/f5;
  - [Lbd/l5;
  - [Lbd/m3;
  - [Lbd/m4;
  - [Lbd/o3;
  - [Lbd/o5;
  - [Lcg/a;
  - [Lif/c0;
  - [Lmg/a2;
  - [Lmg/u2;
  - [Lmg/v0;
  - [Lmg/z2;
  - [Lpd/s;
  - [Lqd/b3;
  - [Lqd/e2;
  - [Lqd/f3;
  - [Lqd/i2;
  - [Lqd/n1;
  - [Lqd/q2;
  - [Lqd/r0;
  - [Lqd/v0;
  - [Lqd/y1;
  - [Lrd/h;
  - [Lrd/p;
  - [Lrd/s;
  - [Lwe/r;
  - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:0b7a7b6,r8-mode:full,version:8.1.65}
  

TYPES:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   12735 │ 12739 │ +4 (+33 -29) 
  + Lbd/q5;
  + Lbd/r5;
  + Lcg/q;
  + Lpd/x;
  + [Lbd/d5;
  + [Lbd/e5;
  + [Lbd/i5;
  + [Lbd/j5;
  + [Lbd/l3;
  + [Lbd/l4;
  + [Lbd/n3;
  + [Lbd/q5;
  + [Lbd/r5;
  + [Lcg/d;
  + [Lif/e0;
  + [Lmg/t2;
  + [Lmg/u0;
  + [Lmg/y2;
  + [Lmg/z1;
  + [Lpd/u;
  + [Lqd/a2;
  + [Lqd/d3;
  + [Lqd/g2;
  + [Lqd/j2;
  + [Lqd/l1;
  + [Lqd/q0;
  + [Lqd/r1;
  + [Lqd/s0;
  + [Lqd/z2;
  + [Lrd/f;
  + [Lrd/m;
  + [Lrd/q;
  + [Lwe/t;
  
  - Lmg/j4;
  - Lrd/t0;
  - [Lbd/c5;
  - [Lbd/f5;
  - [Lbd/l5;
  - [Lbd/m3;
  - [Lbd/m4;
  - [Lbd/o3;
  - [Lbd/o5;
  - [Lcg/a;
  - [Lif/c0;
  - [Lmg/a2;
  - [Lmg/u2;
  - [Lmg/v0;
  - [Lmg/z2;
  - [Lpd/s;
  - [Lqd/b3;
  - [Lqd/e2;
  - [Lqd/f3;
  - [Lqd/i2;
  - [Lqd/n1;
  - [Lqd/q2;
  - [Lqd/r0;
  - [Lqd/v0;
  - [Lqd/y1;
  - [Lrd/h;
  - [Lrd/p;
  - [Lrd/s;
  - [Lwe/r;
  

METHODS:

   old   │ new   │ diff              
  ───────┼───────┼───────────────────
   56193 │ 56204 │ +11 (+1376 -1365) 
  + a0.q L(i, w) → b
  + a3.b F(l5) → int
  + a3.b n(h3, String) → n
  + a3.b o(b, w2, z1) → h3
  + a3.b q(JSONObject) → h3
  + a3.b s(h3, String, l, m3, int) → m
  + androidx.appcompat.widget.a0 <init>(Context, f2, a0, LinkedHashSet)
  + b0.g A0(h3, m3, k) → o
  + b0.g B(boolean, b1, m, c1, l, i, int, int)
  + b0.g H(l2, i, int)
  + b0.g N(l, b1, boolean, Throwable, i, int)
  + b0.g R0() → z1
  + b0.g U(String, boolean, b1, int, f, m, boolean, c1, i, int)
  + b0.g h(boolean, a, Set, u0, i, int)
  + b0.g l(boolean, c1, Set, u0, i, int)
  + b1.j1 X(l5) → String
  + b1.j1 b(boolean, s0, Set, u0, i, int)
  + b1.j1 h(String, boolean, c, i, Set, List, u0, m, i, int, int)
  + b1.j1 k(boolean, h2, Set, u0, i, int)
  + b1.j1 l0(JSONObject) → p3
  + b1.j1 x0(String, s1) → e
  + b1.q0 <init>(int, f, b1, f1)
  + b1.q0 <init>(String, b1, int, f)
  + b1.v1 <init>(boolean, l3, a, l, int, e, k1, boolean, l3)
  + b1.z0 <init>(e1, c, int)
  + ba.b0 f() → l5
  + ba.b A0(h3, m3, k) → o
  + ba.c A0(h3, m3, k) → o
  + ba.e0 <init>(q3, String)
  + ba.f0 <init>(z3, String)
  + ba.k0 <init>(ArrayList, ArrayList, r3, boolean, boolean, int, int, ArrayList, boolean, LinkedHashSet, int, boolean, boolean, Integer)
  + ba.l0 <init>(boolean, boolean, long, long, r3, s3, t2, boolean)
  + ba.l0 d(l0, r3, s3, int) → l0
  + ba.n0 <init>(q3, int, String)
  + ba.n0 f() → l5
  + ba.p0 <init>(s0, h3, String, String, d)
  + ba.v0 f() → l5
  + bd.a4 <init>(int, Integer, String, String, Integer)
  + bd.a5 <init>(Uri, String)
  + bd.b4 <init>(c, String, String, String, String)
  + bd.b5 <init>(String)
  + bd.c4 <init>(Integer, String, String, ArrayList, b4)
  + bd.c5 <init>(int)
  + bd.c5 createFromParcel(Parcel) → Object
  + bd.c5 newArray(int) → Object[]
  + bd.d1 <init>(n5, c, String, String, String, r3)
  + bd.d4 <init>(int, Integer, String, String, String, Integer)
  + bd.d5 <clinit>()
  + bd.d5 <init>(String, String, String, List)
  + bd.d5 describeContents() → int
  + bd.d5 equals(Object) → boolean
  + bd.d5 hashCode() → int
  + bd.d5 toString() → String
  + bd.d5 writeToParcel(Parcel, in
...✂
ARSC
ENTRIES:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   6967 │ 6973 │ +6 (+6 -0) 
  + drawable/_stripe_ic_paymentsheet_pm_swish__0
  + drawable/_stripe_ic_paymentsheet_pm_swish__1
  + drawable/_stripe_ic_paymentsheet_pm_swish__2
  + drawable/_stripe_ic_paymentsheet_pm_swish__3
  + drawable/stripe_ic_paymentsheet_pm_swish
  + string/stripe_paymentsheet_payment_method_swish

@tillh-stripe tillh-stripe changed the title Add support for Swish in PaymentSheet Add support for Swish in PaymentSheet and bindings Sep 20, 2023
@tillh-stripe tillh-stripe marked this pull request as ready for review September 20, 2023 20:56
@tillh-stripe tillh-stripe requested review from a team as code owners September 20, 2023 20:56
@tillh-stripe tillh-stripe merged commit 7f2e0c1 into master Sep 25, 2023
10 checks passed
@tillh-stripe tillh-stripe deleted the tillh/swish branch September 25, 2023 17:18
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.

None yet

3 participants