stripe-android
stripe-android copied to clipboard
Add UPI in payment options carousel
Summary
This pull request adds the UPI payment method in the payment sheet carousel. No form will show up yet — that’s coming in a future pull request.
I’m also adding filtering for the specs loaded from disk, so that we only show payment methods whose code is included in exposedPaymentMethods. We do this already for the specs coming from the backend. If there are any concerns about this, let me know.
Motivation
UPI integration.
Testing
- [x] Added tests
- [ ] Modified tests
- [x] Manually verified
Screenshots
| Before | After |
|---|---|
| before screenshot | after screenshot |
Changelog
Nothing to add.
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.8 MiB │ 15.8 MiB │ +343 B │ 53.4 MiB │ 53.4 MiB │ +1.3 KiB
arsc │ 1.8 MiB │ 1.8 MiB │ +880 B │ 1.8 MiB │ 1.8 MiB │ +880 B
manifest │ 4.1 KiB │ 4.1 KiB │ 0 B │ 18.9 KiB │ 18.9 KiB │ 0 B
res │ 1 MiB │ 1 MiB │ +456 B │ 1.8 MiB │ 1.8 MiB │ +720 B
native │ 2.5 MiB │ 2.5 MiB │ 0 B │ 5.9 MiB │ 5.9 MiB │ 0 B
asset │ 3 MiB │ 3 MiB │ +3 B │ 3 MiB │ 3 MiB │ +63 B
other │ 81.8 KiB │ 81.8 KiB │ 0 B │ 155.7 KiB │ 155.7 KiB │ 0 B
──────────┼──────────┼──────────┼──────────┼───────────┼───────────┼──────────
total │ 24.2 MiB │ 24.2 MiB │ +1.6 KiB │ 66 MiB │ 66 MiB │ +2.9 KiB
│ raw │ unique
├────────┬────────┬──────┼────────┬────────┬───────────────
DEX │ old │ new │ diff │ old │ new │ diff
─────────┼────────┼────────┼──────┼────────┼────────┼───────────────
files │ 4 │ 4 │ 0 │ │ │
strings │ 256266 │ 256282 │ +16 │ 219132 │ 219141 │ +9 (+22 -13)
types │ 45095 │ 45095 │ 0 │ 41464 │ 41464 │ 0 (+1 -1)
classes │ 38641 │ 38641 │ 0 │ 38641 │ 38641 │ 0 (+1 -1)
methods │ 225116 │ 225120 │ +4 │ 217328 │ 217331 │ +3 (+13 -10)
fields │ 164405 │ 164416 │ +11 │ 163437 │ 163447 │ +10 (+12 -2)
ARSC │ old │ new │ diff
─────────┼──────┼──────┼────────────
configs │ 334 │ 334 │ 0
entries │ 6243 │ 6245 │ +2 (+2 -0)
APK
compressed │ uncompressed │
──────────┬──────────┼──────────┬──────────┤
size │ diff │ size │ diff │ path
──────────┼──────────┼──────────┼──────────┼────────────────────────────────
1.8 MiB │ +880 B │ 1.8 MiB │ +880 B │ ∆ resources.arsc
459 B │ +459 B │ 720 B │ +720 B │ + res/8M.xml
3.2 MiB │ +294 B │ 9.2 MiB │ +956 B │ ∆ classes4.dex
2.4 MiB │ +51 B │ 7.4 MiB │ +388 B │ ∆ classes3.dex
1.9 KiB │ +5 B │ 11.9 KiB │ +65 B │ ∆ assets/lpms.json
9.7 KiB │ -1 B │ 9.6 KiB │ -1 B │ ∆ assets/dexopt/baseline.prof
672 B │ -1 B │ 540 B │ -1 B │ ∆ assets/dexopt/baseline.profm
6.9 MiB │ -1 B │ 28.4 MiB │ 0 B │ ∆ classes.dex
3.2 MiB │ -1 B │ 8.5 MiB │ 0 B │ ∆ classes2.dex
997 B │ -1 B │ 2.8 KiB │ 0 B │ ∆ res/AE.xml
706 B │ -1 B │ 1.3 KiB │ 0 B │ ∆ res/CF.xml
1 KiB │ -1 B │ 3.1 KiB │ 0 B │ ∆ res/Fs.xml
601 B │ +1 B │ 1.1 KiB │ 0 B │ ∆ res/IZ.xml
1.3 KiB │ -1 B │ 3.9 KiB │ 0 B │ ∆ res/_n.xml
──────────┼──────────┼──────────┼──────────┼────────────────────────────────
17.7 MiB │ +1.6 KiB │ 55.3 MiB │ +2.9 KiB │ (total)
DEX
STRINGS:
old │ new │ diff
────────┼────────┼──────────────
219132 │ 219141 │ +9 (+22 -13)
+
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
0X¢
¨
+
ç20J 0H¦¨
+ INR
+ SMAP
PaymentSheetPlaygroundActivity.kt
Kotlin
*S Kotlin
*F
+ 1 PaymentSheetPlaygroundActivity.kt
com/stripe/android/paymentsheet/example/playground/activity/PaymentSheetPlaygroundActivity
+ 2 _Collections.kt
kotlin/collections/CollectionsKt___CollectionsKt
+ 3 fake.kt
kotlin/jvm/internal/FakeKt
+ 4 View.kt
androidx/core/view/ViewKt
*L
1#1,533:1
1549#2:534
1620#2,3:535
1549#2:538
1620#2,3:539
766#2:545
857#2,2:546
1549#2:548
1620#2,3:549
1#3:542
283#4,2:543
*S KotlinDebug
*F
+ 1 PaymentSheetPlaygroundActivity.kt
com/stripe/android/paymentsheet/example/playground/activity/PaymentSheetPlaygroundActivity
*L
146#1:534
146#1:535,3
309#1:538
309#1:539,3
482#1:545
482#1:546,2
487#1:548
487#1:549,3
217#1:543,2
*E
+ UpiRequirement
+ getUpiRequirement
+ stripe_ic_paymentsheet_pm_upi
+ stripe_paymentsheet_payment_method_upi
+
20B¢J 02
0R08X¢
R0X¢
¨
+ *
20B#000¢J
0HÆJ 0HÆJ 0HÆJ)02
02020HÆJ020HÖJ 0HÖJ 0HÖR0¢
R0¢
R0¢
¨
+ r
620:6789:B!000¢J020HJ 02 002!0HJ02#
0j_J%02&0'HJ*(02 002!02)0*HJ+0*J,
002&0'HJ-
00HJ.0*2/0HJ0021
00HJ 002 002!0HJ20HJ3004J50R0X¢
R0X¢
R0X¢
R 0
X¢
R0X¢
R
0X¢
R!008FX¢
¨;
+ (Landroid/content/res/Resources;Lcom/stripe/android/payments/financialconnections/IsFinancialConnectionsAvailable;Z)V
+ , isUpiEnabled=
+ Lcom/stripe/android/ui/core/forms/resources/LpmRepository_supportedPaymentMethods_2;
+ SMAP
LpmRepository.kt
Kotlin
*S Kotlin
*F
+ 1 LpmRepository.kt
com/stripe/android/ui/core/forms/resources/LpmRepository
+ 2 _Collections.kt
kotlin/collections/CollectionsKt___CollectionsKt
+ 3 Maps.kt
kotlin/collections/MapsKt__MapsKt
+ 4 fake.kt
kotlin/jvm/internal/FakeKt
*L
1#1,478:1
288#2,2:479
766#2:481
857#2,2:482
766#2:484
857#2,2:485
1194#2,2:487
1222#2,4:489
1603#2,9:500
1851#2:509
1852#2:511
1612#2:512
1603#2,9:513
1851#2:522
1852#2:524
1612#2:525
1194#2,2:526
1222#2,4:528
1238#2,4:534
766#2:538
857#2,2:539
819#2:541
847#2,2:542
1603#2,9:544
1851#2:553
1852#2:555
1612#2:556
1194#2,2:557
1222#2,4:559
1179#2,2:563
1253#2,4:565
463#3,7:493
438#3:532
388#3:533
1#4:510
1#4:523
1#4:554
1#4:569
*S KotlinDebug
*F
+ 1 LpmRepository.kt
com/stripe/android/ui/core/forms/resources/LpmRepository
*L
131#1:479,2
147#1:481
147#1:482,2
148#1:484
148#1:485,2
153#1:487,2
153#1:489,4
157#1:500,9
157#1:509
157#1:511
157#1:512
158#1:513,9
158#1:522
158#1:524
158#1:525
159#1:526,2
159#1:528,4
162#1:534,4
184#1:538
184#1:539,2
185#1:541
185#1:542,2
192#1:544,9
192#1:553
192#1:555
192#1:556
196#1:557,2
196#1:559,4
202#1:563,2
202#1:565,4
154#1:493,7
162#1:532
162#1:533
157#1:510
158#1:523
192#1:554
*E
+ SMAP
LpmRepository.kt
Kotlin
*S Kotlin
*F
+ 1 LpmRepository.kt
com/stripe/android/ui/core/forms/resources/LpmRepository_Companion
+ 2 fake.kt
kotlin/jvm/internal/FakeKt
*L
1#1,478:1
...✂
ARSC
ENTRIES:
old │ new │ diff
──────┼──────┼────────────
6243 │ 6245 │ +2 (+2 -0)
+ drawable/stripe_ic_paymentsheet_pm_upi
+ string/stripe_paymentsheet_payment_method_upi