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

Add crypto payment method #9753

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Conversation

ericzhang-stripe
Copy link
Contributor

@ericzhang-stripe ericzhang-stripe commented Dec 5, 2024

Summary

Add crypto payment method bindings + tests

Motivation

Add crypto payment method support

Testing

Added tests + tested with PaymentSheet Example

Screenshots

Screenshot_20241205_141852
Screenshot_20241205_143139

Changelog

See diff

@ericzhang-stripe ericzhang-stripe requested review from a team as code owners December 5, 2024 19:30
@ericzhang-stripe ericzhang-stripe force-pushed the ericzhang-crypto-payment-method branch from da45940 to 071bb9e Compare December 5, 2024 19:31
Copy link
Contributor

github-actions bot commented Dec 5, 2024

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │            compressed            │          uncompressed          
          ├───────────┬───────────┬──────────┼──────────┬──────────┬──────────
 APK      │ old       │ new       │ diff     │ old      │ new      │ diff     
──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼──────────
      dex │   3.9 MiB │   3.9 MiB │   +464 B │  8.6 MiB │  8.6 MiB │   +624 B 
     arsc │   2.3 MiB │   2.3 MiB │   +892 B │  2.3 MiB │  2.3 MiB │   +892 B 
 manifest │     5 KiB │     5 KiB │      0 B │ 24.9 KiB │ 24.9 KiB │      0 B 
      res │ 906.3 KiB │ 908.2 KiB │ +1.9 KiB │  1.4 MiB │  1.4 MiB │ +3.3 KiB 
   native │   2.6 MiB │   2.6 MiB │      0 B │    6 MiB │    6 MiB │      0 B 
    asset │   1.6 MiB │   1.6 MiB │    -39 B │  1.6 MiB │  1.6 MiB │    -39 B 
    other │   1.4 MiB │   1.4 MiB │   +283 B │  1.6 MiB │  1.6 MiB │ +1.3 KiB 
──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼──────────
    total │  12.7 MiB │  12.7 MiB │ +3.4 KiB │ 21.6 MiB │ 21.6 MiB │   +6 KiB 

 DEX     │ old   │ new   │ diff         
─────────┼───────┼───────┼──────────────
   files │     1 │     1 │  0           
 strings │ 40572 │ 40575 │ +3 (+4 -1)   
   types │ 14003 │ 14004 │ +1 (+1 -0)   
 classes │ 11681 │ 11682 │ +1 (+1 -0)   
 methods │ 59607 │ 59613 │ +6 (+21 -15) 
  fields │ 39800 │ 39804 │ +4 (+11 -7)  

 ARSC    │ old  │ new  │ diff       
─────────┼──────┼──────┼────────────
 configs │  243 │  243 │  0         
 entries │ 6207 │ 6209 │ +2 (+2 -0)
APK
     compressed      │     uncompressed     │                                           
──────────┬──────────┼───────────┬──────────┤                                           
 size     │ diff     │ size      │ diff     │ path                                      
──────────┼──────────┼───────────┼──────────┼───────────────────────────────────────────
    968 B │   +968 B │   1.6 KiB │ +1.6 KiB │ + res/NR.xml                              
    963 B │   +963 B │   1.6 KiB │ +1.6 KiB │ + res/XF.xml                              
  2.3 MiB │   +892 B │   2.3 MiB │   +892 B │ ∆ resources.arsc                          
  3.9 MiB │   +464 B │   8.6 MiB │   +624 B │ ∆ classes.dex                             
  3.7 KiB │   +132 B │  29.6 KiB │ +1,018 B │ ∆ lpms.json                               
 50.2 KiB │    +82 B │ 118.4 KiB │   +164 B │ ∆ META-INF/MANIFEST.MF                    
 53.4 KiB │    +73 B │ 118.5 KiB │   +164 B │ ∆ META-INF/CERT.SF                        
  7.9 KiB │    -38 B │   7.8 KiB │    -38 B │ ∆ assets/dexopt/baseline.prof             
    270 B │     -2 B │     120 B │      0 B │ ∆ META-INF/version-control-info.textproto 
  1.2 KiB │     -2 B │   1.2 KiB │      0 B │ ∆ META-INF/CERT.RSA                       
  1,002 B │     -1 B │     870 B │     -1 B │ ∆ assets/dexopt/baseline.profm            
    880 B │     +1 B │   2.3 KiB │      0 B │ ∆ res/YB.xml                              
──────────┼──────────┼───────────┼──────────┼───────────────────────────────────────────
  6.4 MiB │ +3.4 KiB │  11.2 MiB │   +6 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   40572 │ 40575 │ +3 (+4 -1) 
  
  + Crypto
  + LG6/P;
  + crypto
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"7c33a2e","r8-mode":"full","version":"8.7.14"}
  
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"47d5c2c","r8-mode":"full","version":"8.7.14"}
  

TYPES:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   14003 │ 14004 │ +1 (+1 -0) 
  
  + LG6/P;
  

METHODS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   59607 │ 59613 │ +6 (+21 -15) 
  
  + F6.l H(String) → r
  + G6.P <clinit>()
  + G6.P a() → t1
  + G6.P b(boolean) → Set
  + G6.P c() → boolean
  + G6.P d() → v
  + G6.P e(l) → boolean
  + G6.q <clinit>()
  + G6.q a() → t1
  + G6.q b(boolean) → Set
  + G6.q c() → boolean
  + G6.q d() → v
  + G6.q e(l) → boolean
  + G6.r <init>(K0)
  + G6.r b(l, s) → List
  + G6.r c(j, List) → boolean
  + G6.r e(j, l, List, boolean) → a
  + G6.r f(boolean) → a
  + G6.r g(j, List) → h
  + G6.r h(j, l, List, s) → List
  + G6.r j() → h
  
  - F6.l H(String) → q
  - G6.q <init>(K0)
  - G6.q b(l, s) → List
  - G6.q c(j, List) → boolean
  - G6.q e(j, l, List, boolean) → a
  - G6.q f(boolean) → a
  - G6.q g(j, List) → h
  - G6.q h(j, l, List, s) → List
  - G6.q j() → h
  - G6.r <clinit>()
  - G6.r a() → t1
  - G6.r b(boolean) → Set
  - G6.r c() → boolean
  - G6.r d() → v
  - G6.r e(l) → boolean
  

FIELDS:

   old   │ new   │ diff        
  ───────┼───────┼─────────────
   39800 │ 39804 │ +4 (+11 -7) 
  
  + G6.H c: boolean
  + G6.N c: boolean
  + G6.P a: P
  + G6.P b: t1
  + G6.b E: b
  + G6.q a: q
  + G6.q b: t1
  + G6.r a: K0
  + K6.t1 U: t1
  + K6.t1 V: t1[]
  + K6.t1 W: b
  
  - G6.G c: boolean
  - G6.M c: boolean
  - G6.q a: K0
  - G6.r a: r
  - G6.r b: t1
  - K6.t1 U: t1[]
  - K6.t1 V: b
ARSC
ENTRIES:

   old  │ new  │ diff       
  ──────┼──────┼────────────
   6207 │ 6209 │ +2 (+2 -0) 
  + drawable/stripe_ic_paymentsheet_pm_crypto
  + string/stripe_paymentsheet_payment_method_crypto

@ericzhang-stripe ericzhang-stripe force-pushed the ericzhang-crypto-payment-method branch from 071bb9e to 3f37004 Compare December 5, 2024 21:31
CHANGELOG.md Outdated
@@ -2,6 +2,12 @@

## XX.XX.XX - 20XX-XX-XX

### PaymentSheet
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can remove this one, the Payments note is sufficient

@tjclawson-stripe
Copy link
Collaborator

Run ./gradlew ktlint to see the lint errors locally

@ericzhang-stripe ericzhang-stripe force-pushed the ericzhang-crypto-payment-method branch 2 times, most recently from 290929d to 8dbb018 Compare December 6, 2024 00:52
@ericzhang-stripe ericzhang-stripe force-pushed the ericzhang-crypto-payment-method branch from 8dbb018 to 3e48c36 Compare December 6, 2024 01:19
@tjclawson-stripe tjclawson-stripe self-requested a review December 6, 2024 03:32
@ericzhang-stripe ericzhang-stripe merged commit ab9e133 into master Dec 6, 2024
16 checks passed
@ericzhang-stripe ericzhang-stripe deleted the ericzhang-crypto-payment-method branch December 6, 2024 06:13
simond-stripe pushed a commit that referenced this pull request Dec 6, 2024
simond-stripe added a commit that referenced this pull request Dec 12, 2024
* Initial camera implementation

# Conflicts:
#	connect-example/src/main/java/com/stripe/android/connect/example/ui/features/payouts/PayoutsExampleActivity.kt
#	connect/src/main/java/com/stripe/android/connect/PayoutsView.kt

# Conflicts:
#	connect/src/main/java/com/stripe/android/connect/PayoutsView.kt
#	connect/src/main/java/com/stripe/android/connect/webview/StripeConnectWebViewClient.kt

# Conflicts:
#	connect-example/src/main/java/com/stripe/android/connect/example/ui/features/payouts/PayoutsExampleActivity.kt
#	connect/src/main/java/com/stripe/android/connect/EmbeddedComponentManager.kt
#	connect/src/main/java/com/stripe/android/connect/PayoutsView.kt

* Update request code

* Update example activity

* Refactor permission, handle within manager

* Fix leftover merge conflicts

# Conflicts:
#	connect/src/main/java/com/stripe/android/connect/webview/StripeConnectWebViewContainer.kt

* WIP

* Fix merge

* Fix build issues

* fix activity

* Fix suspend function

* refactor with activity oncreate

* Show promo badge in bank form (#9734)

* Show promo badge in bank form

* Address code review feedback

Fix layout issue with super-long bank name and validate with screenshot test.

* Add Embedded Appearance params to AppearanceBottomSheetDialogFragment (#9727)

* Add Embedded Appearance params to AppearanceBottomSheetDialogFragment

* [MOBILESDK-2480]update text style for bacs secondary button type (#9745)

* update text style for bacs secondary button type

* screenshots for screenshot tests

* Apply suggestions from code review

Capitalize comment and add period

Co-authored-by: Bella Koch <160939932+amk-stripe@users.noreply.github.com>

* crypto payment method (#9753)

* Better handle process death for all confirmation flow cases in `DefaultConfirmationHandler` (#9754)

* Fix lints, remove unneeded cancellation function

* Add tests

* Fix tests

* Add/fix logging

* Fix lint from log line

* Fix main thread

* Update connect/src/main/java/com/stripe/android/connect/webview/StripeConnectWebViewContainer.kt

Co-authored-by: lng-stripe <91862945+lng-stripe@users.noreply.github.com>

* Update connect/src/main/java/com/stripe/android/connect/EmbeddedComponentManager.kt

Co-authored-by: lng-stripe <91862945+lng-stripe@users.noreply.github.com>

* unsupported behavior to log warning

* Fix docstrings

* Update crashing behavior for camera permission request

* Move functions around for clarity

* Update tests

* Update and fix tests

* Fix detekt lints

* Fix main activity

* Remove unnecessary fragment, move logger out of constructor

* Clean up lib restriction

* Remove unnecessary unconfined test dispatcher

* Update api

* Lint fixes

---------

Co-authored-by: Till Hellmund <tillh@stripe.com>
Co-authored-by: tjclawson-stripe <163896025+tjclawson-stripe@users.noreply.github.com>
Co-authored-by: Tian Zhao <tianzhao@stripe.com>
Co-authored-by: Bella Koch <160939932+amk-stripe@users.noreply.github.com>
Co-authored-by: ericzhang-stripe <94195995+ericzhang-stripe@users.noreply.github.com>
Co-authored-by: Samer Alabi <141707240+samer-stripe@users.noreply.github.com>
Co-authored-by: lng-stripe <91862945+lng-stripe@users.noreply.github.com>
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.

2 participants