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

Support adding bank account to Link #5458

Merged
merged 33 commits into from Aug 29, 2022
Merged

Support adding bank account to Link #5458

merged 33 commits into from Aug 29, 2022

Conversation

brnunes-stripe
Copy link
Contributor

@brnunes-stripe brnunes-stripe commented Aug 24, 2022

Summary

Support connecting a bank account into Link using the Financial Connections SDK.

  • Create FinancialConnectionsSession and launch FinancialConnectionsSheet to connect bank account.
  • Show payment method selector when multiple payment method types are supported.
  • Create LinkShapes to be used instead of MaterialTheme.shapes since we need more than 3 different shapes.

Motivation

Link instant debits.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

image image

@brnunes-stripe brnunes-stripe changed the base branch from master to f/BANKCON-4937_Support_AuthFlow_for_Link_sessions August 24, 2022 23:05
@brnunes-stripe brnunes-stripe changed the base branch from f/BANKCON-4937_Support_AuthFlow_for_Link_sessions to master August 24, 2022 23:06
@github-actions
Copy link
Contributor

github-actions bot commented Aug 24, 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 │ +5.5 KiB │    52 MiB │    52 MiB │ +16.8 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 │ 874.5 KiB │ 874.5 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 │     -4 B │     3 MiB │     3 MiB │      -4 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 │ +5.5 KiB │  64.2 MiB │  64.2 MiB │ +16.8 KiB 

         │          raw           │              unique               
         ├────────┬────────┬──────┼────────┬────────┬─────────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff            
─────────┼────────┼────────┼──────┼────────┼────────┼─────────────────
   files │      4 │      4 │    0 │        │        │                 
 strings │ 251235 │ 251290 │  +55 │ 214230 │ 214285 │ +55 (+142 -87)  
   types │  44357 │  44367 │  +10 │  40719 │  40731 │ +12 (+27 -15)   
 classes │  37916 │  37928 │  +12 │  37916 │  37928 │ +12 (+27 -15)   
 methods │ 221801 │ 221861 │  +60 │ 213797 │ 213861 │ +64 (+169 -105) 
  fields │ 163038 │ 163095 │  +57 │ 161995 │ 162052 │ +57 (+132 -75)  

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  292 │  292 │  0   
 entries │ 6235 │ 6235 │  0
APK
     compressed     │    uncompressed     │                               
─────────┬──────────┼─────────┬───────────┤                               
 size    │ diff     │ size    │ diff      │ path                          
─────────┼──────────┼─────────┼───────────┼───────────────────────────────
 2.3 MiB │ +5.5 KiB │ 6.9 MiB │ +16.8 KiB │ ∆ classes3.dex                
 3.2 MiB │    -10 B │ 9.1 MiB │       0 B │ ∆ classes4.dex                
 8.7 KiB │     -4 B │ 8.6 KiB │      -4 B │ ∆ assets/dexopt/baseline.prof 
─────────┼──────────┼─────────┼───────────┼───────────────────────────────
 5.5 MiB │ +5.5 KiB │  16 MiB │ +16.8 KiB │ (total)
DEX
STRINGS:

   old    │ new    │ diff           
  ────────┼────────┼────────────────
   214230 │ 214285 │ +55 (+142 -87) 
  + �
  ���
  ��
  ���
  ���
  ��	�À��2�0�B���¢����R�����0�¢��
  ������R�����0�¢��
  ������R��	��0�¢��
  ���
  ��R�����0�¢��
  �����¨�
  +  
  ���
  ��
  ���
  ���
  ���
  ��
  ���
  �������2�0�B���¢����R�����0�X�D¢��
  ������R���������0	0�¢��
  ���
  ��¨�
  + >
  
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  
  ���
  
  ���
  ���
  ����*����0�2�������0�2����
  ����0�0�¢����H�¢��������0�X��ø�¢�
  
  ��������������0�X��ø�¢�
  
  ������������������0	0�X��¢��
  ��
  ��0�X��ø�¢�
  
  �������������0�X��ø�¢�
  
  ������
  �������0	*�0�8AX��¢�������������0�*�0�8AX��¢�����������
  ���¨��
  + d
  
  ���
  
  ���
  
  ���
  
  ���
  ���
  �� 
  
  ��
  ���
  ���
  ���
  ���
  ���
  
  ���
  
  ���
  ���
  ���
  ���
  ���
  ���
  
  ���
  ��	�+���0�2�����0�2�����0�2��������0�0�H�¢�������	��0�2�
  ������0�0�2�������0�0
  2�������0�2�����0�2���������0�����0�0�2���������0�����0�0�2��������0�0�2��������0�0�H�¢�����O����0�2�����0�2�����0�20���,�� ����0�����0���0�j����¢����¢��������0�0�H�¢��� �������0�2�
  ������0�0�2�������0�0
  2�������0�2��!��0�2����0�2��#��0_2��%����0&2��'������0�����0�0�2���������0�����0�0�2��������0�0�2��(������0�����0�0�2��)������0�����0�0�2�*������0�0�2�+������0�0�20���,�� ����0�����0���0�j����¢����¢��������0�0�H�¢���,�
  �-��0�H�¢���.¨�/
  + j
  
  ���
  
  ���
  
  ���
  
  ���
  ���
  �� 
  ���
  ���
  ���
  
  ���
  ���
  ���
  
  ���
  
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ����%���0�2�����0�2�����0�2�����0�H�¢����������0�2�	������0�0
  2����0�2��
  ��0�2�����0�2�����0�2�������0�2���������0�����0�0�2��������0�0�2��������0�0�2���������0�����0�0�¢����¢����H�¢�����
  ����0�H�¢�����A� ��0�*�0!2����0�2��#��0�2��_��0�2�%������0�0�2����&��0'H�¢���(¨�)
  + v
  ���
  ���
  
  ���
  
  ���
  
  ���
  
  ���
  
  ���
  ���
  ���
  ���
  
  ���
  
  �� 
  ���
  
  ���
  ���
  ���
  ��
  
  ���
  
  ��
  ���
  ���
  ���
  ���
  ���
  �����2�0�:�CB/��������0�������0�������0�������0	���
  ��0�¢���J��,��0-2����.��0�J��/��0-H�J��0��0-2��1��0�J��2��0-2��1��0�J��3����0�2��������0�0�H�J��4��0-2����5��0�2
  ���#����0)H�J��6��0-J��7��0-2��8��0�H�J��7��0-2��8��09H�J��:��0-2��;��09H�J��<��0-2��=��0�J��>��0-J��?��0-2��@��0�J��A��0-2��B��0�H�R��
  �
  ������0�0�X��¢��
  R���������0�0�X��¢��
  R������
  ������0�0�0�X��¢��
  R���������0�0�X��¢��
  R����
  ������0�0�X��¢��
  R�����0�¢��
  ������R�����0	X��¢��
  R����
  ������0�0�¢��
  ������R���������0�0�¢��
  ������R�����0�X��¢��
  R��
  ��0�X��¢��
  R�����0�X��¢��
  R������
  ������0�0�0�¢��
  ��� ��R��!������0�0�¢��
  �����R��#�
  ������0�0�¢��
  ���_��R��%��0&X��¢��
  R��'������0)0(¢��
  ���*�+¨�D
  + �
  ���
  ���
  
  ���
  
  ���
  
  ���
  
  ���
  
  ���
  
  ���
  
  ���
  ���
  ���
  ���
  ���
  
  ���
  
  ���
  
  ���
  ���
  ���
  ���
  ���
  ���
  ��%
  
  ���
  ���
  ��
  ���
  ���
  ���
  
  �� 
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ���
  ��_
  ���
  ���
  �����2�0�:�]BE��������0�������0�������0�������0	���
  ��0������0
  ���������0�0�¢����J��A��0BH�J��C��0B2��D��0EH�J��F��0B2��G��0+J��H��0B2��I��0JH�J��K��0B2��L��0MH�J��N��0B2��O��0PJ��Q��0B2��0��0�J��R��0BJ��S��0BH�J��T��0B2��U��0�H�J��V��0B2��W������0Y����0Z0XJ �[��0B2����\������0Y������0�0XH�R����
  ������0�0�X��¢��
  R����
  ������0�0�X��¢��
  R���������0�0�X��¢��
  R���������0�0�X��¢��
  R�����0�¢��
  ������R��
  ��0�X��¢��
  R����
  ������0�0�¢��
  ����� R��!�
  ������0�0�¢��
  ���� R��#�
  ������0_0�¢��
  ���%�&R���������0�0�X��¢��
  R��'������0�����0_0(X��¢��
  R��)������0+0*¢��
  ���)�,R��-��0+X��¢��
  R�����0�¢��
  ���.�/R�����0�X��¢��
  R����0
  X��¢��
  R�����0	X��¢��
  R��0������0�0�¢��
  ���1� R��2������0�0�¢��
  ���3� R��4��0�¢��
  ���5�6R��7��08¢��
  ���9�:R��;��0<X��¢��
  R��=������0�0>¢��
  ���?�@¨�^
  + _activityResultLauncher
  + _isExpanded
  + _onPaymentMethodSelected
  + _secret
  + _setExpanded
  + _supportedPaymentMethods
  + _this_PaymentMethodTypeCell
  + (Landroidx/compose/foundation/layout/RowScope;Lcom/stripe/android/link/ui/paymentmethod/SupportedPaymentMethod;ZZLkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;II)V
  + (Landroidx/compose/material/MaterialTheme;Landroidx/compose/runtime/Composer;I)Lcom/stripe/and
...✂

@brnunes-stripe brnunes-stripe changed the base branch from master to f/BANKCON-4937_Support_AuthFlow_for_Link_sessions August 24, 2022 23:41
@brnunes-stripe brnunes-stripe changed the base branch from f/BANKCON-4937_Support_AuthFlow_for_Link_sessions to master August 24, 2022 23:41
# Conflicts:
#	financial-connections/api/financial-connections.api
#	financial-connections/src/main/java/com/stripe/android/financialconnections/launcher/FinancialConnectionsSheetLinkResult.kt
@brnunes-stripe brnunes-stripe changed the base branch from master to brnunes/bank August 25, 2022 20:27
# Conflicts:
#	link/src/main/java/com/stripe/android/link/ui/paymentmethod/PaymentMethodBody.kt
#	link/src/main/java/com/stripe/android/link/ui/paymentmethod/PaymentMethodViewModel.kt
#	link/src/main/java/com/stripe/android/link/ui/wallet/WalletScreen.kt
#	link/src/main/java/com/stripe/android/link/ui/wallet/WalletViewModel.kt
# Conflicts:
#	link/src/test/java/com/stripe/android/link/ui/paymentmethod/PaymentMethodViewModelTest.kt
@brnunes-stripe
Copy link
Contributor Author

brnunes-stripe commented Aug 25, 2022

Moved all refactor into #5466

# Conflicts:
#	link/src/main/java/com/stripe/android/link/LinkActivity.kt
#	link/src/main/java/com/stripe/android/link/ui/paymentmethod/PaymentMethodViewModel.kt
#	link/src/test/java/com/stripe/android/link/ui/paymentmethod/PaymentMethodViewModelTest.kt
Base automatically changed from brnunes/bank to master August 26, 2022 20:53
# Conflicts:
#	link/src/main/java/com/stripe/android/link/ui/paymentmethod/PaymentMethodBody.kt
#	link/src/main/java/com/stripe/android/link/ui/paymentmethod/PaymentMethodViewModel.kt
#	link/src/main/java/com/stripe/android/link/ui/wallet/WalletScreen.kt
#	link/src/main/java/com/stripe/android/link/ui/wallet/WalletViewModel.kt
#	link/src/test/java/com/stripe/android/link/ui/paymentmethod/PaymentMethodViewModelTest.kt
@brnunes-stripe brnunes-stripe merged commit 6ae5f11 into master Aug 29, 2022
@brnunes-stripe brnunes-stripe deleted the brnunes/conn branch August 29, 2022 17:22
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

4 participants