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

[MOBILESDK-2686] Add setAsDefault to ConfirmPaymentIntentParams and ConfirmSetupIntentParams #10206

Closed
wants to merge 3 commits into from

Conversation

tianzhao-stripe
Copy link
Contributor

Summary

Added setAsDefaultPaymentMethod as field to ConfirmPaymentIntentParams and ConfirmSetupIntentParams

Motivation

https://jira.corp.stripe.com/browse/MOBILESDK-2684
https://jira.corp.stripe.com/browse/MOBILESDK-2686

Testing

N.A.

Screenshots

N.A.

Changelog

N.A.

Copy link
Contributor

github-actions bot commented Feb 19, 2025

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 │ -37 B │  8.8 MiB │  8.8 MiB │ +624 B 
     arsc │   2.4 MiB │   2.4 MiB │   0 B │  2.4 MiB │  2.4 MiB │    0 B 
 manifest │   5.1 KiB │   5.1 KiB │   0 B │ 25.7 KiB │ 25.7 KiB │    0 B 
      res │ 910.9 KiB │ 910.9 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 │   0 B │  1.6 MiB │  1.6 MiB │    0 B 
    other │   1.4 MiB │   1.4 MiB │   0 B │  1.6 MiB │  1.6 MiB │    0 B 
──────────┼───────────┼───────────┼───────┼──────────┼──────────┼────────
    total │  12.8 MiB │  12.8 MiB │ -37 B │ 21.9 MiB │ 21.9 MiB │ +624 B 

 DEX     │ old   │ new   │ diff       
─────────┼───────┼───────┼────────────
   files │     1 │     1 │  0         
 strings │ 41287 │ 41288 │ +1 (+3 -2) 
   types │ 14299 │ 14299 │  0 (+0 -0) 
 classes │ 11950 │ 11950 │  0 (+0 -0) 
 methods │ 60641 │ 60641 │  0 (+4 -4) 
  fields │ 40910 │ 40912 │ +2 (+2 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  243 │  243 │  0   
 entries │ 6250 │ 6250 │  0
APK
    compressed    │   uncompressed   │                                           
──────────┬───────┼─────────┬────────┤                                           
 size     │ diff  │ size    │ diff   │ path                                      
──────────┼───────┼─────────┼────────┼───────────────────────────────────────────
    4 MiB │ -37 B │ 8.8 MiB │ +624 B │ ∆ classes.dex                             
    272 B │  +1 B │   120 B │    0 B │ ∆ META-INF/version-control-info.textproto 
 53.7 KiB │  -1 B │ 119 KiB │    0 B │ ∆ META-INF/CERT.SF                        
──────────┼───────┼─────────┼────────┼───────────────────────────────────────────
  4.1 MiB │ -37 B │ 8.9 MiB │ +624 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   41287 │ 41288 │ +1 (+3 -2) 
  
  + , setAsDefaultPaymentMethod=
  + VLLLLLLLZLLLLLLL
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"b925e3e","r8-mode":"full","version":"8.7.14"}
  
  - VLLLLLLLZLLLLLL
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"f383193","r8-mode":"full","version":"8.7.14"}
  

METHODS:

   old   │ new   │ diff      
  ───────┼───────┼───────────
   60641 │ 60641 │ 0 (+4 -4) 
  
  + R6.o <init>(S1, String, H2, String, String, String, Boolean, boolean, b2, String, N0, m, n, String, Boolean)
  + R6.o <init>(S1, String, String, Boolean, boolean, b2, String, N0, m, n, Boolean, int)
  + R6.p <init>(String, String, S1, String, N0, Boolean, int)
  + R6.p <init>(String, String, S1, String, boolean, String, N0, Boolean)
  
  - R6.o <init>(S1, String, H2, String, String, String, Boolean, boolean, b2, String, N0, m, n, String)
  - R6.o <init>(S1, String, String, Boolean, boolean, b2, String, N0, m, n, int)
  - R6.p <init>(String, String, S1, String, N0, int)
  - R6.p <init>(String, String, S1, String, boolean, String, N0)
  

FIELDS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   40910 │ 40912 │ +2 (+2 -0) 
  
  + R6.o r: Boolean
  + R6.p k: Boolean

Copy link
Collaborator

@amk-stripe amk-stripe left a comment

Choose a reason for hiding this comment

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

As part of this PR, can we include how this new parameter is being set? As this currently is, it looks like we're checking in this new parameter unused, which also means we can't add testing to this PR. I'd prefer it to be a bit larger so that we can validate that it actually works and so I can see how it hooks up to everything else

/**
* Indicates that this should be the default payment method going forward
*/
var setAsDefaultPaymentMethod: Boolean? = null,
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 this an internal val? I don't think this needs to be public API

/**
* Indicates that this should be the default payment method going forward
*/
var setAsDefaultPaymentMethod: Boolean? = null,
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as for payment intents -- can this be internal?

@tianzhao-stripe
Copy link
Contributor Author

closing PR b/c too small

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