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 Adds stripeAccountId to FinancialConnectionsLauncher.Configuration. #5408

Conversation

carlosmuvi-stripe
Copy link
Collaborator

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

Summary

Same that happened with CollectBankAccountLauncher: Financial Connections was not accepting an optional stripeAccountId on its configuration object, required for Connected accounts. This PR adds it to the Configuration object and includes it as a header on internal API calls.

The best way to test this flow is to use a merchant with a connected account and pass the accountId as a header when creating the PI / SI on the backend. Ensure the client app also passes the stripeAccountId param matching the one used on the backend (you can define STRIPE_ACCOUNT_ID=acct_... in your gradle.properties).

Then, on the example app go to Connect US bank account, Before this PR, an ACHv2 payment would fail (Not a valid financialConnectionsSession). Now it should work.

Testing

  • Added tests
  • Modified tests
  • Manually verified:

Changelog

Financial Connections

  • [FIXED]5408 FinancialConnectionsSheet#Configuration
    now accepts stripeAccountId for Connect merchants.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 13, 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 │ +461 B │  51.9 MiB │  51.9 MiB │ +1.5 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 │  -67 B │     3 MiB │     3 MiB │    -67 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 │ +394 B │    64 MiB │    64 MiB │ +1.4 KiB 

         │          raw           │             unique              
         ├────────┬────────┬──────┼────────┬────────┬───────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff          
─────────┼────────┼────────┼──────┼────────┼────────┼───────────────
   files │      4 │      4 │    0 │        │        │               
 strings │ 250763 │ 250767 │   +4 │ 213807 │ 213811 │  +4 (+15 -11) 
   types │  44242 │  44243 │   +1 │  40609 │  40610 │  +1 (+1 -0)   
 classes │  37811 │  37812 │   +1 │  37811 │  37812 │  +1 (+1 -0)   
 methods │ 221295 │ 221306 │  +11 │ 213307 │ 213318 │ +11 (+24 -13) 
  fields │ 162742 │ 162747 │   +5 │ 161702 │ 161707 │  +5 (+5 -0)   

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  292 │  292 │  0   
 entries │ 6226 │ 6226 │  0
APK
    compressed    │    uncompressed    │                               
─────────┬────────┼─────────┬──────────┤                               
 size    │ diff   │ size    │ diff     │ path                          
─────────┼────────┼─────────┼──────────┼───────────────────────────────
 2.2 MiB │ +461 B │ 6.9 MiB │ +1.5 KiB │ ∆ classes3.dex                
 8.3 KiB │  -67 B │ 8.2 KiB │    -67 B │ ∆ assets/dexopt/baseline.prof 
─────────┼────────┼─────────┼──────────┼───────────────────────────────
 2.2 MiB │ +394 B │ 6.9 MiB │ +1.4 KiB │ (total)
DEX
STRINGS:

   old    │ new    │ diff         
  ────────┼────────┼──────────────
   213807 │ 213811 │ +4 (+15 -11) 
  + �
  ���
  ��
  
  ���
  
  ���
  ����� �2�0�:��J����0�2�����0�2�����0�2�������0�H&¨�	
  + �
  ���
  ���
  ���
  ���
  
  ���
  �����2�0�B�¢����J����0�2�����0�2�����0�2�������0�H�¨�	
  +  
  ���
  ���
  
  ���
  ���
  ���
  
  ���
  �����2�0�B
  ������0�¢����J����0�2�����0�2��	��0�2��
  ����0�H�R�����0�X��¢��
  ¨��
  + &
  ���
  ���
  
  ���
  ��
  ���
  
  ��
  
  ���
  �������2�0�B�������0�������0���������0�¢����J	����0�HÆ�J	���0�HÆ�J��
  ����0�H�J)����02�������0�2�������0�2
  ��������0�HÆ�J�����0�2�������0�HÖ�J	����0�HÖ�J	����0�HÖ�R�����0�¢��
  ������R�����0�¢��
  ���	��R�������0�¢��
  ���
  ��¨��
  + ,
  ���
  ��
  ���
  ���
  
  ���
  
  ���
  
  ���
  
  ���
  ����Á��2�0�B���¢����J�����0�2�����0�H�J�����0�2��	��0
  H�J�����0H�J��
  ��0�2�����0�H�J�������0�2�����0�H�¨��
  + 4
  ���
  ���
  
  ���
  ��
  ���
  
  ���
  
  ��
  ���
  ���
  
  ���
  �������2�0�B!������0�������0��
  ��������0�¢����J	����0�HÆ�J	���0�HÆ�J��
  ����0�H�J)����02�������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�¢��
  ������R�����0�¢��
  ���	��R�������0�¢��
  ���
  ��¨��
  + n
  ���
  ���
  
  ���
  ���
  ���
  
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  
  ���
  ���
  ���
  ���
  ���
  
  ���
  ���
  ���
  ���
  ���
  ���
  
  ���
  ����� +2�0�:�+B-����������0��
  ��������0�������0�������0�¢���	J-����H�����2�����0�2��������H�0�H�@ø�¢����J!����0�2�����0�2�����0�H�@ø�¢����J�����0�2�� ��0!H�@ø�¢���J��#��0_2�����0�H�@ø�¢���%J��&��0'j�(2�)������0�0*H�R�����0�X��¢��
  R��
  ��0�8X��¢��
  ����
  ������R�����0�X��¢��
  R�����0�X��¢��
  ���
  ���¨�,
  + (Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/core/networking/StripeNetworkClient;Lcom/stripe/android/core/networking/ApiRequest_Factory;)V
  + FinancialConnectionsSheetConfigurationModule_ProvidesStripeAccountIdFactory.java
  + Lcom/stripe/android/financialconnections/di/FinancialConnectionsSheetConfigurationModule_ProvidesStripeAccountIdFactory;
  + SMAP
  CollectBankAccountActivity.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CollectBankAccountActivity.kt
  com/stripe/android/payments/bankaccount/ui/CollectBankAccountActivity
  + 2 ActivityViewModelLazy.kt
  androidx/activity/ActivityViewModelLazyKt
  *L
  1#1,74:1
  75#2,13:75
  *S KotlinDebug
  *F
  + 1 CollectBankAccountActivity.kt
  com/stripe/android/payments/bankaccount/ui/CollectBankAccountActivity
  *L
  34#1:75,13
  *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,197:1
  1#2:198
  *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,197:1
  1#2:198
  *E
  
  + providesStripeAccountId
  + providesStripeAccountIdProvider
  
  - �
  ���
  ��
  
  ���
  
  ���
  ����� �2�0�:��J�����0�2�����0�2�����0�H&¨��
  - �
  ���
  ���
  ���
  ���
  
  ���
  �����2�0�B�¢����J�����0�2�����0�2�����0�H�¨��
  -  
  ���
  ���
  
  ���
  ���
  ���
  
  ���
  �����2�0�B
  ������0�¢����J�����0�2�����0�2��	��0�H�R�����0�X��¢��
  ¨�
  
  - &
  ���
  ���
  
  ���
  ��	
  ���
  
  ��
  
  ���
  �������2�0�B�������0�������0�¢����J	�	��0�HÆ�J	�
  ��0�H�J�����02�������0�2�������0�H�J����0
  2�������0�HÖ�J	����0�HÖ�J	����0�HÖ�R�����0�¢��
  ������R�����0�¢��
  ������¨��
  - ,
  ���
  ��
  ���
  ���
  
  ���
  
  ���
  
  ���
  
  ���
  ����Á��2�0�B���¢����J�����0�2�����0�H�J�����0�2��	��0
  H�J�����0H�J��
  ��0�2�����0�H�¨��
  - 4
  ���
  ���
  
  ���
  ��	
  ���
  
  ���
  
  ��
  ���
  ���
  
  ���
  �������2�0�B�������0�������0�¢����J	�	��0�HÆ�J	�
  ��0�H�J�����02�������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�¢��
  ������R�����0�¢��
  ������¨��
  - l
  ���
  ���
  
  ���
  
  ���
  
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  
  ���
  ���
  ���
  ���
  ���
  
  ���
  ���
  ���
  ���
  ���
  ���
  
  ���
  ����� *2�0�:�*B!����������0�������0�������0�¢����J-����H�����
...✂

@carlosmuvi-stripe carlosmuvi-stripe merged commit 59fa70f into master Aug 15, 2022
@carlosmuvi-stripe carlosmuvi-stripe deleted the b/BANKCON-4898_FinancialConnectionsLauncher_not_using_stripeAccountId branch August 15, 2022 16:47
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

2 participants