stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

Add `ShippingAddressConfig` to `GooglePayLauncher`

Open brnunes-stripe opened this issue 1 year ago • 4 comments

Summary

Allows requesting a shipping address on GooglePayLauncher configuration.

Motivation

#5586

Testing

  • [ ] Added tests
  • [ ] Modified tests
  • [x] Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

brnunes-stripe avatar Sep 23 '22 22:09 brnunes-stripe

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 │  5.2 MiB │  5.2 MiB │ +1.2 KiB │  13.5 MiB │  13.5 MiB │ +3 KiB 
     arsc │  1.9 MiB │  1.9 MiB │      0 B │   1.9 MiB │   1.9 MiB │    0 B 
 manifest │  4.1 KiB │  4.1 KiB │      0 B │  19.2 KiB │  19.2 KiB │    0 B 
      res │    1 MiB │    1 MiB │      0 B │   1.8 MiB │   1.8 MiB │    0 B 
   native │  2.5 MiB │  2.5 MiB │      0 B │   5.9 MiB │   5.9 MiB │    0 B 
    asset │    3 MiB │    3 MiB │    -16 B │     3 MiB │     3 MiB │  -16 B 
    other │ 82.5 KiB │ 82.5 KiB │      0 B │ 158.5 KiB │ 158.5 KiB │    0 B 
──────────┼──────────┼──────────┼──────────┼───────────┼───────────┼────────
    total │ 13.7 MiB │ 13.7 MiB │ +1.1 KiB │  26.2 MiB │  26.2 MiB │ +3 KiB 

         │          raw           │             unique             
         ├────────┬────────┬──────┼────────┬────────┬──────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff         
─────────┼────────┼────────┼──────┼────────┼────────┼──────────────
   files │      2 │      2 │    0 │        │        │              
 strings │  84264 │  84279 │  +15 │  69878 │  69893 │ +15 (+17 -2) 
   types │  21729 │  21731 │   +2 │  19447 │  19449 │  +2 (+3 -1)  
 classes │  17424 │  17425 │   +1 │  17424 │  17425 │  +1 (+2 -1)  
 methods │  93712 │  93741 │  +29 │  89501 │  89530 │ +29 (+36 -7) 
  fields │ 101770 │ 101775 │   +5 │ 100426 │ 100431 │  +5 (+6 -1)  

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  334 │  334 │  0   
 entries │ 6246 │ 6246 │  0
APK
     compressed     │   uncompressed    │                                
─────────┬──────────┼──────────┬────────┤                                
 size    │ diff     │ size     │ diff   │ path                           
─────────┼──────────┼──────────┼────────┼────────────────────────────────
 3.1 MiB │ +1.1 KiB │  7.8 MiB │ +3 KiB │ ∆ classes.dex                  
   8 KiB │    -17 B │  7.9 KiB │  -17 B │ ∆ assets/dexopt/baseline.prof  
 2.1 MiB │     +3 B │  5.7 MiB │    0 B │ ∆ classes2.dex                 
   767 B │     +1 B │    635 B │   +1 B │ ∆ assets/dexopt/baseline.profm 
─────────┼──────────┼──────────┼────────┼────────────────────────────────
 5.2 MiB │ +1.1 KiB │ 13.5 MiB │ +3 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   69878 │ 69893 │ +15 (+17 -2) 
  + , shippingAddressConfig=
  + LLLLLZLLZZIL
  + LLLLZLLZZ
  + Lcom/stripe/android/googlepaylauncher/GooglePayLauncher_ShippingAddressConfig_Creator;
  + Lcom/stripe/android/googlepaylauncher/GooglePayLauncher_ShippingAddressConfig;
  + ShippingAddressConfig
  + ShippingAddressConfig(isRequired=
  + VLLLZLLZ
  + VLLLZLLZZ
  + VLLLZLLZZIL
  + [Lcom/stripe/android/googlepaylauncher/GooglePayLauncher_ShippingAddressConfig;
  + getAllowedCountryCodes_payments_core_release
  + getNormalizedAllowedCountryCodes
  + getShippingAddressConfig
  + setShippingAddressConfig
  + shippingAddressConfig
  + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:3a150e6,r8-mode:compatibility,version:3.3.70}
  
  - Lcom/stripe/android/googlepaylauncher/GooglePayLauncherViewModel_WhenMappings;
  - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:4833bf4,r8-mode:compatibility,version:3.3.70}
  

TYPES:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   19447 │ 19449 │ +2 (+3 -1) 
  + Lcom/stripe/android/googlepaylauncher/GooglePayLauncher_ShippingAddressConfig_Creator;
  + Lcom/stripe/android/googlepaylauncher/GooglePayLauncher_ShippingAddressConfig;
  + [Lcom/stripe/android/googlepaylauncher/GooglePayLauncher_ShippingAddressConfig;
  
  - Lcom/stripe/android/googlepaylauncher/GooglePayLauncherViewModel_WhenMappings;
  

METHODS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   89501 │ 89530 │ +29 (+36 -7) 
  + com.stripe.android.googlepaylauncher.ConvertKt convert(GooglePayLauncher_ShippingAddressConfig) → GooglePayJsonFactory_ShippingAddressParameters
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config <init>(GooglePayEnvironment, String, String, boolean, GooglePayLauncher_BillingAddressConfig, GooglePayLauncher_ShippingAddressConfig)
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config <init>(GooglePayEnvironment, String, String, boolean, GooglePayLauncher_BillingAddressConfig, GooglePayLauncher_ShippingAddressConfig, boolean)
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config <init>(GooglePayEnvironment, String, String, boolean, GooglePayLauncher_BillingAddressConfig, GooglePayLauncher_ShippingAddressConfig, boolean, boolean)
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config <init>(GooglePayEnvironment, String, String, boolean, GooglePayLauncher_BillingAddressConfig, GooglePayLauncher_ShippingAddressConfig, boolean, boolean, int, f)
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config component6() → GooglePayLauncher_ShippingAddressConfig
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config component8() → boolean
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config copy(GooglePayEnvironment, String, String, boolean, GooglePayLauncher_BillingAddressConfig, GooglePayLauncher_ShippingAddressConfig, boolean, boolean) → GooglePayLauncher_Config
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config copy_default(GooglePayLauncher_Config, GooglePayEnvironment, String, String, boolean, GooglePayLauncher_BillingAddressConfig, GooglePayLauncher_ShippingAddressConfig, boolean, boolean, int, Object) → GooglePayLauncher_Config
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config getShippingAddressConfig() → GooglePayLauncher_ShippingAddressConfig
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_Config setShippingAddressConfig(GooglePayLauncher_ShippingAddressConfig)
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_ShippingAddressConfig_Creator <init>()
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_ShippingAddressConfig_Creator createFromParcel(Parcel) → GooglePayLauncher_ShippingAddressConfig
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_ShippingAddressConfig_Creator createFromParcel(Parcel) → Object
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_ShippingAddressConfig_Creator newArray(int) → GooglePayLauncher_ShippingAddressConfig[]
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_ShippingAddressConfig_Creator newArray(int) → Object[]
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_ShippingAddressConfig <clinit>()
  + com.stripe.android.googlepaylauncher.GooglePayLauncher_ShippingAddressConfig <init
...✂

github-actions[bot] avatar Sep 23 '22 22:09 github-actions[bot]

What is the status on this PR? This is currently blocking our switch to this SDK for payment processing on our app.

renchap avatar Oct 10 '22 16:10 renchap

What is the status on this PR? This is currently blocking our switch to this SDK for payment processing on our app.

Hey @renchap, This PR exposes the Google Pay settings, but we still have no way of returning the values collected. That will require changing the public interface of GooglePayLauncher, so it needs more careful design consideration and discussion. I'm proposing an API change, and will post updates to the original issue as we move forward with it.

brnunes-stripe avatar Oct 12 '22 19:10 brnunes-stripe

@brnunes-stripe Thank you for your work :), Do you have any idea when this feature could be finished ? At least in 2022 or do you think we have to wait for 2023 ?

tgensol avatar Oct 21 '22 19:10 tgensol