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

Fix error mapping when returning from 3DS #7499

Merged
merged 4 commits into from
Oct 25, 2023

Conversation

tillh-stripe
Copy link
Collaborator

@tillh-stripe tillh-stripe commented Oct 25, 2023

Summary

This pull request resolves an issue where we displayed the client-side error message when returning from 3DS instead of a valid server-side message.

Motivation

Resolves #7478

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 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.5 MiB │   3.5 MiB │ -184 B │   7.7 MiB │   7.7 MiB │ +60 B 
     arsc │   2.2 MiB │   2.2 MiB │    0 B │   2.2 MiB │   2.2 MiB │   0 B 
 manifest │   5.1 KiB │   5.1 KiB │    0 B │  25.4 KiB │  25.4 KiB │   0 B 
      res │ 900.3 KiB │ 900.3 KiB │    0 B │   1.3 MiB │   1.3 MiB │   0 B 
   native │   2.6 MiB │   2.6 MiB │    0 B │     6 MiB │     6 MiB │   0 B 
    asset │     3 MiB │     3 MiB │   +3 B │     3 MiB │     3 MiB │  +3 B 
    other │ 204.1 KiB │ 204.1 KiB │   -8 B │ 459.5 KiB │ 459.5 KiB │   0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼───────
    total │  12.4 MiB │  12.4 MiB │ -189 B │  20.8 MiB │  20.8 MiB │ +63 B 

 DEX     │ old   │ new   │ diff           
─────────┼───────┼───────┼────────────────
   files │     1 │     1 │  0             
 strings │ 38443 │ 38443 │  0 (+1 -1)     
   types │ 12612 │ 12612 │  0 (+0 -0)     
 classes │ 10601 │ 10601 │  0 (+0 -0)     
 methods │ 55268 │ 55269 │ +1 (+106 -105) 
  fields │ 35540 │ 35540 │  0 (+0 -0)     

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  292 │  292 │  0   
 entries │ 6929 │ 6929 │  0
APK
    compressed     │   uncompressed    │                               
──────────┬────────┼───────────┬───────┤                               
 size     │ diff   │ size      │ diff  │ path                          
──────────┼────────┼───────────┼───────┼───────────────────────────────
  3.5 MiB │ -184 B │   7.7 MiB │ +60 B │ ∆ classes.dex                 
 65.4 KiB │  -11 B │ 146.7 KiB │   0 B │ ∆ META-INF/CERT.SF            
  6.4 KiB │   +3 B │   6.3 KiB │  +3 B │ ∆ assets/dexopt/baseline.prof 
 49.7 KiB │   +2 B │ 146.7 KiB │   0 B │ ∆ META-INF/MANIFEST.MF        
  1.2 KiB │   +1 B │   1.2 KiB │   0 B │ ∆ META-INF/CERT.RSA           
──────────┼────────┼───────────┼───────┼───────────────────────────────
  3.7 MiB │ -189 B │     8 MiB │ +63 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff      
  ───────┼───────┼───────────
   38443 │ 38443 │ 0 (+1 -1) 
  + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:bd3af70,r8-mode:full,version:8.1.65}
  
  - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:07eb093,r8-mode:full,version:8.1.65}
  

METHODS:

   old   │ new   │ diff           
  ───────┼───────┼────────────────
   55268 │ 55269 │ +1 (+106 -105) 
  + mf.b A1(float[], float, float, float) → float
  + mf.b A2(long, e, d) → Object
  + mf.b B1(Object, a3) → l1
  + mf.b B2(o, b)
  + mf.b C1(Object) → l1
  + mf.b C2(Parcel, int, boolean)
  + mf.b D1(PackageInfo, File)
  + mf.b D2(Parcel, int, Bundle)
  + mf.b E1(int, i) → c
  + mf.b E2(Parcel, int, byte[])
  + mf.b F1(JSONObject) → u3
  + mf.b F2(Parcel, int, IBinder)
  + mf.b G1(String) → long
  + mf.b G2(Parcel, int, int)
  + mf.b H1(Object) → Object
  + mf.b H2(Parcel, int, int[])
  + mf.b I1(String) → ArrayList
  + mf.b I2(Parcel, int, ArrayList)
  + mf.b J1(v)
  + mf.b J2(Parcel, int, long)
  + mf.b K1(Object, i) → f1
  + mf.b K2(Parcel, int, Parcelable, int)
  + mf.b L1(float[])
  + mf.b L2(Context, a, c, boolean)
  + mf.b M1(Type, Class, Type, HashMap) → Type
  + mf.b M2(Parcel, int, String)
  + mf.b N1(d, Object, c)
  + mf.b N2(Parcel, int, String[])
  + mf.b O1(e, d, c, e) → Object
  + mf.b O2(Parcel, int, Parcelable[], int)
  + mf.b P1(boolean, m, i1, boolean, g, a) → n
  + mf.b P2(Parcel, int, List)
  + mf.b Q1(n, boolean, boolean, a, int) → n
  + mf.b Q2(Parcel, int) → int
  + mf.b R1(ImageView, int)
  + mf.b R2(Parcel, int)
  + mf.b S1(b2, e) → Object
  + mf.b S2(Parcel, Parcelable, int)
  + mf.b T1(g5) → boolean
  + mf.b U1() → x
  + mf.b V1(a) → i
  + mf.b W1(int, e, m, boolean)
  + mf.b X1(int, e, m, e, boolean)
  + mf.b Y1(int, e, m)
  + mf.b Z1(int, e, m, e)
  + mf.b a1() → boolean
  + mf.b a2(ImageView, int)
  + mf.b b1(Throwable) → boolean
  + mf.b b2(byte[], int, int) → byte[]
  + mf.b c1(Type, Class, Class) → Type
  + mf.b c2(String, long, long, long) → long
  + mf.b d1(Spanned, Class) → boolean
  + mf.b d2(String, int, int, int, int) → int
  + mf.b e1(byte[]) → int
  + mf.b e2(n1, c, Object, i) → p0
  + mf.b f1(int[]) → int
  + mf.b f2(char) → String
  + mf.b g1(short[]) → int
  + mf.b g2(String, v1) → g
  + mf.b h1(short[][]) → int
  + mf.b h2(a) → l
  + mf.b i1(g, g[]) → int
  + mf.b i2(double, c) → long
  + mf.b j1(int, e, m, boolean)
  + mf.b j2(int, c) → long
  + mf.b k1(int) → int
  + mf.b k2(long, c) → long
  + mf.b l1(float[]) → float[]
  + mf.b l2(a, s1) → Map
  + mf.b m1(d1, boolean, h1, int) → n0
  + mf.b m2(z) → Map
  + mf.b n1(Context) → boolean
  + mf.b n2(m) → Object
  + mf.b o1(char) → boolean
  + mf.b o2(Map) → Map
  + mf.b p1(Collection) → String
  + mf.b p2(w, i) → CharSequence
  + mf.b q1(float[], long) → long
  + mf.b q2(c, c) → m3
  + mf.b r1(float[], b)
  + mf.b r2(float[], float, float)
  + mf.b s1(int) → int
  + mf.b s2(v, c)
  + mf.b t1(Context, String) → String
  + mf.b t2(Type) → String
  + mf.b u1(g) → Map
  + mf.b u2(d, Collection) → String
  + mf.b v2(h, Set) → String
  + mf.b w1(float[], float[]) → float[]
  + mf.b w2(l, Set) → String
  + mf.b x1(float[], float[])
  + mf.b x2(g, Context, p, String, String)
  + mf.b y2(int, e, m)
  + mf.b z2(h, Object, Object, e, d) → Object
  + yg.w T2(Object, Map) → Object
  + yg.w U2(g[]) → Map
  + yg.w V2(g[]) → LinkedHashMap
  + yg.w W2(LinkedHashMap) → Map
  + yg.w X2(Map, Map) → LinkedHashMap
  + yg.w Y2(ArrayList, Map) → Map
  + yg.w Z2(Map, g) → Map
  + yg.w a3(ArrayList, LinkedHashMap)
  + yg.w b3(HashMap, g[])
  + yg.w c3(ArrayList) → Map
  + yg.w d3(Map) → Map
  + yg.w e3(Map) → LinkedHashMap
  
  - mf.b A1(Object, a3) → l1
  - mf.b A2(o, b)
  - mf.b B1(Object) → l1
  - mf.b B2(Parcel, int, boolean)
  - mf.b C1(PackageInfo, File)
  - mf.b C2(Parcel, int, Bundle)
  - mf.b D1(int, i) → c
  - mf.b D2(Parcel, int, byte[])
  - mf.b E1(JSONObject) → u3
  - mf.b E2(Parcel, int, IBinder)
  - mf.b F1(String) → long
  - mf.b F2(Parcel, int, int)
  - mf.b G1(Object) → Object
  - mf.b G2(Parcel, int, int[])
  - mf.b H1(String) → ArrayList
  - mf.b H2(Parcel, int, ArrayList)
  - mf.b I1(v)
  - mf.b I2(Parcel, int, long)
  - mf.b J1(Object, i) → f1
  - mf.b J2(Parcel, int, Parcelable, int)
  - mf.b K1(float[])
  - mf.b K2(Context, a, c, boolean)
  - mf.b L1(Type, Class, Type, HashMap) → Type
  - mf.b L2(Parcel, int, String
...✂

@tillh-stripe tillh-stripe marked this pull request as ready for review October 25, 2023 13:19
@tillh-stripe tillh-stripe requested review from a team as code owners October 25, 2023 13:19
val original = Locale.getDefault()
Locale.setDefault(locale)
block()
Locale.setDefault(original)
Copy link
Collaborator

Choose a reason for hiding this comment

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

You probably want this in a finally block. Otherwise one test could cause later tests to fail.

@tillh-stripe tillh-stripe enabled auto-merge (squash) October 25, 2023 15:29
@tillh-stripe tillh-stripe merged commit 838fbb3 into master Oct 25, 2023
@tillh-stripe tillh-stripe deleted the tillh/fix-error-mapping-after-3ds branch October 25, 2023 16:54
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.

[BUG] Wrong translations
2 participants