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

Support saved bank accounts in Link

Open brnunes-stripe opened this issue 3 years ago • 1 comments

Summary

  • Display user's saved bank accounts.
  • Allows user to selected only supported payment methods, show message on the ones unavailable.
  • Fix labels when user email is long.

Motivation

Support bank debits in Link.

Testing

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

Screenshots

Bank only Card only
Screenshot_20220810-175933 Screenshot_20220810-173515

brnunes-stripe avatar Aug 13 '22 02:08 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 │  15.4 MiB │  15.4 MiB │ +6.4 KiB │  51.9 MiB │  51.9 MiB │ +21.6 KiB 
     arsc │   1.8 MiB │   1.8 MiB │ +2.5 KiB │   1.8 MiB │   1.8 MiB │  +2.5 KiB 
 manifest │     4 KiB │     4 KiB │      0 B │  18.5 KiB │  18.5 KiB │       0 B 
      res │ 872.2 KiB │ 873.3 KiB │ +1.1 KiB │   1.4 MiB │   1.4 MiB │  +2.5 KiB 
   native │   2.5 MiB │   2.5 MiB │      0 B │   5.9 MiB │   5.9 MiB │       0 B 
    asset │     3 MiB │     3 MiB │    -65 B │     3 MiB │     3 MiB │     -65 B 
    other │  81.7 KiB │  81.7 KiB │      0 B │ 155.6 KiB │ 155.6 KiB │       0 B 
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼───────────
    total │  23.6 MiB │  23.6 MiB │ +9.9 KiB │    64 MiB │  64.1 MiB │ +26.6 KiB 

         │          raw           │              unique               
         ├────────┬────────┬──────┼────────┬────────┬─────────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff            
─────────┼────────┼────────┼──────┼────────┼────────┼─────────────────
   files │      4 │      4 │    0 │        │        │                 
 strings │ 250763 │ 250845 │  +82 │ 213807 │ 213880 │ +73 (+166 -93)  
   types │  44242 │  44260 │  +18 │  40609 │  40626 │ +17 (+40 -23)   
 classes │  37811 │  37827 │  +16 │  37811 │  37827 │ +16 (+39 -23)   
 methods │ 221295 │ 221354 │  +59 │ 213307 │ 213365 │ +58 (+195 -137) 
  fields │ 162742 │ 162799 │  +57 │ 161702 │ 161759 │ +57 (+148 -91)  

 ARSC    │ old  │ new  │ diff       
─────────┼──────┼──────┼────────────
 configs │  292 │  292 │  0         
 entries │ 6226 │ 6231 │ +5 (+6 -1)
APK
     compressed      │     uncompressed     │                               
──────────┬──────────┼──────────┬───────────┤                               
 size     │ diff     │ size     │ diff      │ path                          
──────────┼──────────┼──────────┼───────────┼───────────────────────────────
  2.2 MiB │ +6.4 KiB │  6.9 MiB │ +21.6 KiB │ ∆ classes3.dex                
  1.8 MiB │ +2.5 KiB │  1.8 MiB │  +2.5 KiB │ ∆ resources.arsc              
  1.1 KiB │ +1.1 KiB │  2.5 KiB │  +2.5 KiB │ + res/OJ.xml                  
  8.3 KiB │    -65 B │  8.2 KiB │     -65 B │ ∆ assets/dexopt/baseline.prof 
    1 KiB │     -2 B │  2.6 KiB │       0 B │ ∆ res/j9.xml                  
  6.8 MiB │     -1 B │ 27.7 MiB │       0 B │ ∆ classes.dex                 
  3.1 MiB │     -1 B │  8.3 MiB │       0 B │ ∆ classes2.dex                
  3.2 MiB │     +1 B │    9 MiB │       0 B │ ∆ classes4.dex                
    350 B │     +1 B │    532 B │       0 B │ ∆ res/3m.xml                  
    650 B │     +1 B │  1.3 KiB │       0 B │ ∆ res/5d1.xml                 
    494 B │     +1 B │    836 B │       0 B │ ∆ res/7A.xml                  
    626 B │     +1 B │  1.1 KiB │       0 B │ ∆ res/8_.xml                  
    323 B │     +1 B │    464 B │       0 B │ ∆ res/9o.xml                  
    1 KiB │     +1 B │  3.1 KiB │       0 B │ ∆ res/Fs.xml                  
    726 B │     -1 B │  1.6 KiB │       0 B │ ∆ res/TP.xml                  
  1.5 KiB │     +1 B │  5.2 KiB │       0 B │ ∆ res/WO.xml                  
  1.3 KiB │     +1 B │  3.9 KiB │       0 B │ ∆ res/_n.xml                  
  1.1 KiB │     -1 B │  3.2 KiB │       0 B │ ∆ res/pU.xml                  
  1.1 KiB │     +1 B │  3.4 KiB │       0 B │ ∆ res/x01.xml                 
──────────┼──────────┼──────────┼───────────┼───────────────────────────────
 17.2 MiB │ +9.9 KiB │ 53.7 MiB │ +26.6 KiB │ (total)
DEX
STRINGS:

   old    │ new    │ diff           
  ────────┼────────┼────────────────
   213807 │ 213880 │ +73 (+166 -93) 
  + 
  
  
  
  
  
  0*08@X€¢0*08@X€¢	0*08@X€¢
  ¨
  + 
  
  
  
  
  
  
  00*020H¨
  + 
  
  
  
  
  
  €20B¢R00¢
  ¨
  + 
  
  
  
  
  
  
  
  
  )0202020H¢
  	0H¢
  ¨
  + 
  
  
  
  
  
  
  
  +02000¢¢H¢*6000¢¢2000¢¢¨	
  + _
  
  
  
  
  
  
  
  
  À20B¢R0X–¢
  R0X–¢
  	
  R0X–¢
  R
  0X–¢
  ¨
  + .
  
  
  
  
  
  
  
  
  
  
  
  
  02020H¢020	20H¢
  020
  20H¢I020
  202020200200H¢¨
  + .
  
  
  
  
  
  
  
  
  
  
  
  020:B¢R0X¦¢R0X¦¢	
  R0X¦¢R
  0X¦¢‚¨
  + 2
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  C020200	2
  00	2
  00	H¢1
  020202000H¢
  0H¢?020200	200	2
  00	H¢0X‚¢
  0X‚¢
  0X‚¢
  ¨
  + 2
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  Ç20B¢J02020HJ		0
  HÖJ02
  020
  HÖ¨
  + @
  
  
  
  
  
   
  
  
  
  
  
  
  _
  
  
  
  
  0 20:B000¢J0
  2020H&J00020HR00¢
  	R0¢
  
  ‚¨
  + d
  
  
  
  
  
  
  
  
  
   
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  +02020200H¢	02
  00200
  202020002000200200H¢O0202020, 000j¢¢00H¢ å02
  00200
  202!020#2_0%20002002&0002'0002(002)0020, 000j¢¢00H¢*
  +0H¢,¨-
  + v
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
   
  
  
  
  
  
  	
  
  
  
  
  
  
  
  
  
  
  
  	20:?B/0000	
  0¢J)0*2+0,J-0*HJ.0*2/0J00*2/0J10200HJ20*230,HJ40*J50*260HJ50*2607HJ80*2907HJ:0*2;0J<0*J=0*2>0HR
  
  00X‚¢
  R
  000X‚¢
  R00X‚¢
  R
  00X‚¢
  R0¢
  R0	X‚¢
  R
  00¢
  R0X‚¢
  R
  0X‚¢
  R0X‚¢
  R
  000¢
  R00¢
  R 
  00¢
  !R0#X‚¢
  R_0&0%¢
  '(¨@
  + _bankAccount
  + _isSupported
  + _itemBeingRemoved_delegate
  + _onItemSelected
  + _paymentDetailsList
  + _removeLabel
  + _selectedItem
  + _selectedItemIsValid
  + _supportedTypes
  + (ILkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;I)V
  + (Lcom/stripe/android/model/ConsumerPaymentDetails_BankAccount;)I
  + (Lcom/stripe/android/model/ConsumerPaymentDetails_BankAccount;ZLandroidx/compose/runtime/Composer;I)V
  + (Lcom/stripe/android/model/ConsumerPaymentDetails_Card;ZLandroidx/compose/runtime/Composer;I)V
  + (Lcom/stripe/android/model/ConsumerPaymentDetails_PaymentDetails;)I
  + (Lcom/stripe/android/model/ConsumerPaymentDetails_PaymentDetails;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Landroidx/compose/r
...✂
ARSC
ENTRIES:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   6226 │ 6231 │ +5 (+6 -1) 
  + drawable/ic_link_bank
  + string/wallet_bank_account_terms
  + string/wallet_remove_account_confirmation
  + string/wallet_remove_card_confirmation
  + string/wallet_remove_linked_account
  + string/wallet_unavailable
  
  - string/wallet_remove_confirmation

github-actions[bot] avatar Aug 13 '22 02:08 github-actions[bot]

Are we going to use the bank icons, or always use the generic bank icon?

jameswoo-stripe avatar Aug 15 '22 17:08 jameswoo-stripe

Are we going to use the bank icons, or always use the generic bank icon?

The goal is to show the bank icons, I'll try to reuse the logic we already have

brnunes-stripe avatar Aug 15 '22 18:08 brnunes-stripe