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 Setup Intent confirmation when using GooglePayLauncher #4051

Merged
merged 2 commits into from
Jul 27, 2021

Conversation

brnunes-stripe
Copy link
Contributor

Summary

GooglePayLauncherViewModel was always confirming a Payment Intent, when that should depend on the GooglePayLauncher initialization arguments.

Motivation

Fix Setup Intent confirmation when using GooglePayLauncher

Testing

  • Added tests
  • Modified tests
  • Manually verified

@github-actions
Copy link
Contributor

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: none)
NEW: paymentsheet-example-release-pr.apk (signature: none)

          │          compressed           │         uncompressed          
          ├───────────┬───────────┬───────┼───────────┬───────────┬───────
 APK      │ old       │ new       │ diff  │ old       │ new       │ diff  
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼───────
      dex │  11.5 MiB │  11.5 MiB │ +56 B │    39 MiB │    39 MiB │ +88 B 
     arsc │   1.3 MiB │   1.3 MiB │   0 B │   1.3 MiB │   1.3 MiB │   0 B 
 manifest │   2.5 KiB │   2.5 KiB │   0 B │  10.5 KiB │  10.5 KiB │   0 B 
      res │ 695.6 KiB │ 695.6 KiB │   0 B │     1 MiB │     1 MiB │   0 B 
    asset │  23.9 KiB │  23.9 KiB │   0 B │  36.9 KiB │  36.9 KiB │   0 B 
    other │ 150.7 KiB │ 150.7 KiB │   0 B │ 308.1 KiB │ 308.1 KiB │   0 B 
──────────┼───────────┼───────────┼───────┼───────────┼───────────┼───────
    total │  13.6 MiB │  13.6 MiB │ +56 B │  41.7 MiB │  41.7 MiB │ +88 B 


         │          raw           │           unique            
         ├────────┬────────┬──────┼────────┬────────┬───────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff      
─────────┼────────┼────────┼──────┼────────┼────────┼───────────
   files │      3 │      3 │    0 │        │        │           
 strings │ 177113 │ 177113 │    0 │ 164726 │ 164726 │ 0 (+1 -1) 
   types │  31131 │  31131 │    0 │  29653 │  29653 │ 0 (+0 -0) 
 classes │  27373 │  27373 │    0 │  27373 │  27373 │ 0 (+0 -0) 
 methods │ 157514 │ 157514 │    0 │ 153534 │ 153534 │ 0 (+1 -1) 
  fields │ 107736 │ 107736 │    0 │ 107446 │ 107446 │ 0 (+0 -0) 


 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  292 │  292 │  0   
 entries │ 4310 │ 4310 │  0
APK
   compressed    │   uncompressed   │                
─────────┬───────┼──────────┬───────┤                
 size    │ diff  │ size     │ diff  │ path           
─────────┼───────┼──────────┼───────┼────────────────
 3.5 MiB │ +56 B │ 10.2 MiB │ +88 B │ ∆ classes2.dex 
─────────┼───────┼──────────┼───────┼────────────────
 3.5 MiB │ +56 B │ 10.2 MiB │ +88 B │ (total)
DEX
STRINGS:

   old    │ new    │ diff      
  ────────┼────────┼───────────
   164726 │ 164726 │ 0 (+1 -1) 
  
  + SMAP
  GooglePayLauncherViewModel.kt
  Kotlin
  *S Kotlin
  *F
  + 1 GooglePayLauncherViewModel.kt
  com/stripe/android/googlepaylauncher/GooglePayLauncherViewModel
  + 2 Transformations.kt
  androidx/lifecycle/TransformationsKt
  *L
  1#1,284:1
  87#2:285
  *S KotlinDebug
  *F
  + 1 GooglePayLauncherViewModel.kt
  com/stripe/android/googlepaylauncher/GooglePayLauncherViewModel
  *L
  50#1:285
  *E
  
  
  - SMAP
  GooglePayLauncherViewModel.kt
  Kotlin
  *S Kotlin
  *F
  + 1 GooglePayLauncherViewModel.kt
  com/stripe/android/googlepaylauncher/GooglePayLauncherViewModel
  + 2 Transformations.kt
  androidx/lifecycle/TransformationsKt
  *L
  1#1,273:1
  87#2:274
  *S KotlinDebug
  *F
  + 1 GooglePayLauncherViewModel.kt
  com/stripe/android/googlepaylauncher/GooglePayLauncherViewModel
  *L
  49#1:274
  *E
  
  

METHODS:

   old    │ new    │ diff      
  ────────┼────────┼───────────
   153534 │ 153534 │ 0 (+1 -1) 
  
  + com.stripe.android.googlepaylauncher.GooglePayLauncherViewModel confirmStripeIntent(AuthActivityStarterHost, PaymentMethodCreateParams, Continuation) → Object
  
  - com.stripe.android.googlepaylauncher.GooglePayLauncherViewModel confirmPaymentIntent(AuthActivityStarterHost, PaymentMethodCreateParams, Continuation) → Object

@brnunes-stripe brnunes-stripe merged commit b52fbb1 into master Jul 27, 2021
@brnunes-stripe brnunes-stripe deleted the brnunes/gpay branch July 27, 2021 01:07
brnunes-stripe added a commit that referenced this pull request Jul 27, 2021
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.

4 participants