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

BANKCON-4898 CollectBankAccountLauncher not using stripeAccountId #5399

Conversation

carlosmuvi-stripe
Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe commented Aug 11, 2022

Summary

CollectBankAccountLauncher was not accepting stripeAccountId, required when making API calls on merchants using Connect.

This PR updates the method signature to accept an optional stripeAccountId String.

Motivation

https://jira.corp.stripe.com/browse/BANKCON-4898

Testing

  • Added tests
  • Modified tests
  • Manually verified

Changelog

- [Fixed] CollectBankAccountLauncher now accepts stripeAccountId for Connect merchants.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 11, 2022

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 │ +450 B │  51.9 MiB │  51.9 MiB │ +1.7 KiB 
     arsc │   1.8 MiB │   1.8 MiB │    0 B │   1.8 MiB │   1.8 MiB │      0 B 
 manifest │     4 KiB │     4 KiB │    0 B │  18.5 KiB │  18.5 KiB │      0 B 
      res │ 872.2 KiB │ 872.2 KiB │    0 B │   1.4 MiB │   1.4 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 │  -61 B │     3 MiB │     3 MiB │    -61 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 │ +389 B │    64 MiB │    64 MiB │ +1.7 KiB 

         │          raw           │             unique             
         ├────────┬────────┬──────┼────────┬────────┬──────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff         
─────────┼────────┼────────┼──────┼────────┼────────┼──────────────
   files │      4 │      4 │    0 │        │        │              
 strings │ 250765 │ 250770 │   +5 │ 213823 │ 213827 │ +4 (+19 -15) 
   types │  44219 │  44220 │   +1 │  40591 │  40592 │ +1 (+1 -0)   
 classes │  37789 │  37790 │   +1 │  37789 │  37790 │ +1 (+1 -0)   
 methods │ 221192 │ 221199 │   +7 │ 213216 │ 213223 │ +7 (+29 -22) 
  fields │ 162817 │ 162820 │   +3 │ 161777 │ 161780 │ +3 (+3 -0)   

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  292 │  292 │  0   
 entries │ 6226 │ 6226 │  0
APK
    compressed    │    uncompressed    │                               
─────────┬────────┼─────────┬──────────┤                               
 size    │ diff   │ size    │ diff     │ path                          
─────────┼────────┼─────────┼──────────┼───────────────────────────────
 2.2 MiB │ +450 B │ 6.9 MiB │ +1.7 KiB │ ∆ classes3.dex                
 8.3 KiB │  -61 B │ 8.1 KiB │    -61 B │ ∆ assets/dexopt/baseline.prof 
─────────┼────────┼─────────┼──────────┼───────────────────────────────
 2.2 MiB │ +389 B │ 6.9 MiB │ +1.7 KiB │ (total)
DEX
STRINGS:

   old    │ new    │ diff         
  ────────┼────────┼──────────────
   213823 │ 213827 │ +4 (+19 -15) 
  +  
  ���
  ��
  
  ���
  
  ���
  ���
  ���
  ����f� �2�0�:��J,����0�2�����0�2
  ��������0�2�����0�2�����0	H&J,�
  ��0�2�����0�2
  ��������0�2�����0�2�����0	H&¨�
  + _
  ���
  ��
  
  ���
  ���
  ���
  ���
  
  ���
  ��	��2�0�B���������0�¢����JN��������0�0�2�����0	2��
  ��0	2�����0	2������0	2��
  ����0	H�@ø�ø��ø��ø��¢������JN��������0�0�2�����0	2��
  ��0	2�����0	2������0	2��
  ����0	H�@ø�ø��ø��ø��¢������R�����0�X��¢��
  ���
  ��!
  ��¡�0�
  ���¨��
  + ,
  ���
  ��
  
  ���
  ���
  ���
  ���
  
  ���
  ���
  ���
  �����2�0�B���������0�¢����JD��������0�0�2�����0	2��
  ��0	2�����0	2������0	H�@ø�ø��ø��ø��¢���
  ��JD��������0�0�2�����0	2��
  ��0	2�����0	2������0	H�@ø�ø��ø��ø��¢������R�����0�X��¢��
  ���
  ��!
  ��¡�0�
  ���¨��
  + ,
  ���
  ���
  
  ���
  ���
  ���
  ���
  
  ���
  ���
  ���
  �����2�0�B����������0�0�¢����J*����0�2�����0	2��
  ����0	2�����0	2����0
  H�J*����0�2�����0	2��
  ����0	2�����0	2����0
  H�R���������0�0�X��¢��
  ¨��
  + ,
  ���
  ���
  
  ���
  ���
  ���
  ���
  
  ���
  ���
  ���
  ����� �2�0�:��B����������0�0�¢����J*����0�2�����0	2��
  ����0	2�����0	2����0
  H�J*����0�2�����0	2��
  ����0	2�����0	2����0
  H�R���������0�0�X��¢��
  ¨��
  + 2
  ���
  ���
  
  ���
  ���
  ���
  
  ���
  ��
  
  ���
  ���
  ���
  ���
  �7� �2�0�:����B1��������0���������0�������0�������0�������0	¢���
  J�����0�R�����0	X��¢��
  �����R�����0�X��¢��
  ���
  ��R�����0�X��¢��
  ������R�����0�X��¢��
  ������R�������0�X��¢��
  �����������¨��
  + >
  ���
  ���
  
  ���
  ���
  ���
  
  ���
  ���
  ���
  ���
  ��
  ���
  ���
  
  ���
  �������2�0�B/������0���������0�������0�������0�������0	¢���
  J	����0�H�J�������0�H�J	����0�H�J	����0�H�J	����0	H�J=����02�������0�2
  ��������0�2�������0�2�������0�2�������0	HÆ�J	����0�HÖ�J�����0	2�������0�HÖ�J	����0�HÖ�J	����0�HÖ�J�� ��0!2����0#2��_��0�HÖ�R�����0	X��¢��
  �����R�����0�X��¢��
  ���
  ��R�����0�X��¢��
  ������R�����0�X��¢��
  ������R�������0�X��¢��
  ������¨�%
  + (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/payments/bankaccount/CollectBankAccountConfiguration;Z)V
  + (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
  + Lcom/stripe/android/payments/bankaccount/CollectBankAccountLauncher_DefaultImpls;
  + SMAP
  AttachFinancialConnectionsSession.kt
  Kotlin
  *S Kotlin
  *F
  + 1 AttachFinancialConnectionsSession.kt
  com/stripe/android/payments/bankaccount/domain/AttachFinancialConnectionsSession
  + 2 fake.kt
  kotlin/jvm/internal/FakeKt
  *L
  1#1,59:1
  1#2:60
  *E
  
  + SMAP
  CollectBankAccountViewModel.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CollectBankAccountViewModel.kt
  com/stripe/android/payments/bankaccount/ui/CollectBankAccountViewModel
  + 2 fake.kt
  kotlin/jvm/internal/FakeKt
  *L
  1#1,196:1
  1#2:197
  *E
  
  + SMAP
  CollectBankAccountViewModel.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CollectBankAccountViewModel.kt
  com/stripe/android/payments/bankaccount/ui/CollectBankAccountViewModel_attachFinancialConnectionsSessionToIntent_1
  + 2 fake.kt
  kotlin/jvm/internal/FakeKt
  *L
  1#1,196:1
  1#2:197
  *E
  
  + SMAP
  CreateFinancialConnectionsSession.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CreateFinancialConnectionsSession.kt
  com/stripe/android/payments/bankaccount/domain/CreateFinancialConnectionsSession
  + 2 fake.kt
  kotlin/jvm/internal/FakeKt
  *L
  1#1,63:1
  1#2:64
  *E
  
  + SMAP
  USBankAccountFormViewModel.kt
  Kotlin
  *S Kotlin
  *F
  + 1 USBankAccountFormViewModel.kt
  com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormViewModel
  + 2 Transform.kt
  kotlinx/coroutines/flow/FlowKt__TransformKt
  + 3 Emitters.kt
  kotlinx/coroutines/flow/FlowKt__EmittersKt
  + 4 SafeCollector.common.kt
  kotlinx/coroutines/flow/internal/SafeCollector_commonKt
  + 5 StateFlow.kt
  kotlinx/coroutines/flow/StateFlowKt
  + 6 Strings.kt
  kotlin/text/StringsKt__StringsKt
  *L
  1#1,511:1
  47#2:512
  49#2:516
  47#2:517
  49#2:521
  47#2:522
  49#2:526
  47#2:527
  49#2:531
  50#3:513
  55#3:515
  50#3:518
  55#3:520
  50#3:523
  55#3:525
  50#3:528
  55#3:530
  106#4:514
  106#4:519
  106#4:524
  106#4:529
  230#5,5:532
  230#5,5:537
  230#5,5:542
  230#5,5:547
  230#5,5:558
  141#6:552
  130#6,5:553
  *S KotlinDebug
  *F
  + 1 USBankAccountFormV
...✂

clientSecret.value,
CollectBankAccountConfiguration.USBankAccount(
publishableKey = lazyPaymentConfig.get().publishableKey,
stripeAccountId = lazyPaymentConfig.get().stripeAccountId,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jameswoo-stripe Looks like PaymentSheet would be having this this issue as well, fixed that too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea, thanks for getting this fix in!

Copy link
Contributor

@jameswoo-stripe jameswoo-stripe left a comment

Choose a reason for hiding this comment

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

lgtm!

@carlosmuvi-stripe
Copy link
Collaborator Author

@charliecruzan-stripe @jameswoo-stripe Updated - there's another API call to attach the PI / SI to the FinancialConnectionsSession, added the stripeAccountId there as well:

1bb9168

@carlosmuvi-stripe carlosmuvi-stripe changed the title BANKCON-4898 CollectBankAccountForLauncher not using stripeAccountId BANKCON-4898 CollectBankAccountLauncher not using stripeAccountId Aug 12, 2022
Comment on lines 18 to 19
# delete
# PUBLISHABLE_KEY=pk_live_Uxk6GdfUJzeCePW1FdQmeOFM
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be deleted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ooops, done!

@carlosmuvi-stripe carlosmuvi-stripe merged commit a22a086 into master Aug 12, 2022
@carlosmuvi-stripe carlosmuvi-stripe deleted the b/BANKCON-4898_CollectBankAccountForLauncher_not_using_stripeAccountId branch August 12, 2022 19:35
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.

None yet

3 participants