Skip to content

Conversation

@tillh-stripe
Copy link
Collaborator

Summary

Motivation

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

Co-authored-by: stripe-android-translations[bot] <150425582+stripe-android-translations[bot]@users.noreply.github.com>
* Use merchant publishable key for Link requests

* Update tests

* Inject API request options directly

* Add clarifying comment for custom API keys

* Use a provider

* Recompute request options every time
* Add PromptPay support to Android payment element

Implements PromptPay payment method following the same patterns as PayNow:

**Payment Method Support (PR #11396 pattern):**
- Add PromptPay to PaymentMethod.Type enum with code "promptpay"
- Create PromptPayDefinition with feature flag support behind enablePromptPay
- Add PromptPay drawable resources (day/night variants)
- Update PaymentMethodRegistry to include PromptPay
- Add PromptPay string resources and playground settings

**Next Action Support (PR #11405 pattern):**
- Add DisplayPromptPayDetails next action type with code "promptpay_display_qr_code"
- Create DisplayPromptPayDetails data class with qrCodeUrl property
- Update PaymentIntent, SetupIntent, and StripeIntentResult to handle PromptPay next actions
- Add DisplayPromptPayDetailsJsonParser for parsing next action data
- Update PaymentSheetNextActionHandlers to use PollingNextActionHandler for PromptPay
- Add PromptPay polling configuration (1-hour time limit, 5-second initial delay)

**Testing Support (PR #11511 pattern):**
- Add TestPromptPay instrumentation test with Thailand (TH) country and Thai Baht (THB) currency
- Add Thailand and Thai Baht to Country and Currency enums
- Create EnablePromptPaySettingsDefinition for playground settings
- Use ShowQrCodeThenPoll authorization action

All changes maintain consistency with existing PayNow implementation patterns.
Tests will pass once backend PromptPay support is implemented.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Committed-By-Agent: claude

* Lint fixes

* Update icons

---------

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Sep 30, 2025

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 │   4.8 MiB │   4.8 MiB │ -1.6 KiB │  10.7 MiB │  10.7 MiB │ -4.6 KiB 
     arsc │   2.6 MiB │   2.6 MiB │      0 B │   2.6 MiB │   2.6 MiB │      0 B 
 manifest │   5.8 KiB │   5.8 KiB │      0 B │  30.4 KiB │  30.4 KiB │      0 B 
      res │ 929.9 KiB │ 929.9 KiB │      0 B │   1.5 MiB │   1.5 MiB │      0 B 
   native │   3.5 MiB │   3.5 MiB │      0 B │   8.5 MiB │   8.5 MiB │      0 B 
    asset │   1.6 MiB │   1.6 MiB │ -1.4 KiB │   1.6 MiB │   1.6 MiB │ -1.4 KiB 
    other │ 198.8 KiB │ 198.8 KiB │    +10 B │ 375.5 KiB │ 375.5 KiB │      0 B 
──────────┼───────────┼───────────┼──────────┼───────────┼───────────┼──────────
    total │  13.7 MiB │  13.7 MiB │   -3 KiB │  25.3 MiB │  25.3 MiB │   -6 KiB 

         │         raw          │              unique               
         ├───────┬───────┬──────┼───────┬───────┬───────────────────
 DEX     │ old   │ new   │ diff │ old   │ new   │ diff              
─────────┼───────┼───────┼──────┼───────┼───────┼───────────────────
   files │     2 │     2 │    0 │       │       │                   
 strings │ 54737 │ 54728 │   -9 │ 50157 │ 50148 │  -9 (+57 -66)     
   types │ 19736 │ 19730 │   -6 │ 17491 │ 17485 │  -6 (+56 -62)     
 classes │ 14770 │ 14766 │   -4 │ 14770 │ 14766 │  -4 (+2 -6)       
 methods │ 75701 │ 75668 │  -33 │ 72174 │ 72141 │ -33 (+1754 -1787) 
  fields │ 49445 │ 49431 │  -14 │ 48098 │ 48084 │ -14 (+1634 -1648) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  242 │  242 │  0   
 entries │ 6365 │ 6365 │  0
APK
      compressed      │     uncompressed     │                                
───────────┬──────────┼───────────┬──────────┤                                
 size      │ diff     │ size      │ diff     │ path                           
───────────┼──────────┼───────────┼──────────┼────────────────────────────────
   4.3 MiB │ -1.6 KiB │   9.4 MiB │ -4.6 KiB │ ∆ classes.dex                  
     8 KiB │ -1.4 KiB │   7.9 KiB │ -1.4 KiB │ ∆ assets/dexopt/baseline.prof  
  51.7 KiB │     +9 B │ 122.5 KiB │      0 B │ ∆ META-INF/MANIFEST.MF         
 550.2 KiB │     +4 B │   1.2 MiB │      0 B │ ∆ classes2.dex                 
   1.2 KiB │     -3 B │     1 KiB │     -3 B │ ∆ assets/dexopt/baseline.profm 
   1.2 KiB │     +1 B │   1.2 KiB │      0 B │ ∆ META-INF/CERT.RSA            
───────────┼──────────┼───────────┼──────────┼────────────────────────────────
   4.9 MiB │   -3 KiB │  10.8 MiB │   -6 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   50157 │ 50148 │ -9 (+57 -66) 
  
  + LZ9/d;
  + Ll9/c0;
  + [LO7/A3;
  + [LO7/A4;
  + [LO7/B2;
  + [LO7/B4;
  + [LO7/C1;
  + [LO7/E0;
  + [LO7/H0;
  + [LO7/H2;
  + [LO7/K1;
  + [LO7/L1;
  + [LO7/M0;
  + [LO7/P;
  + [LO7/Q0;
  + [LO7/S1;
  + [LO7/T0;
  + [LO7/U;
  + [LO7/W3;
  + [LO7/Y1;
  + [LO7/Z2;
  + [LO7/a0;
  + [LO7/e1;
  + [LO7/e2;
  + [LO7/g0;
  + [LO7/i2;
  + [LO7/j0;
  + [LO7/j3;
  + [LO7/l1;
  + [LO7/m0;
  + [LO7/m1;
  + [LO7/n3;
  + [LO7/o4;
  + [LO7/t1;
  + [LO7/t3;
  + [LO7/t4;
  + [LO7/u0;
  + [LO7/u1;
  + [LO7/v2;
  + [LO7/z0;
  + [LQ7/e;
  + [LR6/J;
  + [LR6/p2;
  + [LU7/Y;
  + [LZ7/a;
  + [LZ9/b;
  + [Lb9/A;
  + [Lj7/d;
  + [Lj7/r1;
  + [Lk8/x;
  + [Ll9/G;
  + [Ll9/K;
  + [Ll9/V;
  + [Ll9/b;
  + [Lp8/a;
  + [Lt9/r;
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"6405cf7","r8-mode":"full","version":"8.8.34"}
  
  - LO7/H4;
  - LO7/I4;
  - LZ7/b;
  - LinkPaymentDetails(linkPaymentDetails=
  - Lj7/L1;
  - Lj7/M1;
  - Lk8/D;
  - Passthrough(id=
  - [LO7/A1;
  - [LO7/D0;
  - [LO7/F0;
  - [LO7/G2;
  - [LO7/H1;
  - [LO7/H4;
  - [LO7/I1;
  - [LO7/I4;
  - [LO7/L0;
  - [LO7/O;
  - [LO7/P0;
  - [LO7/Q1;
  - [LO7/S0;
  - [LO7/T;
  - [LO7/U3;
  - [LO7/W1;
  - [LO7/W;
  - [LO7/X2;
  - [LO7/c2;
  - [LO7/e0;
  - [LO7/g2;
  - [LO7/h0;
  - [LO7/h1;
  - [LO7/h3;
  - [LO7/k0;
  - [LO7/k1;
  - [LO7/l3;
  - [LO7/m4;
  - [LO7/p1;
  - [LO7/q0;
  - [LO7/r3;
  - [LO7/r4;
  - [LO7/s1;
  - [LO7/t2;
  - [LO7/w4;
  - [LO7/x4;
  - [LO7/y0;
  - [LO7/y3;
  - [LO7/z2;
  - [LQ7/f;
  - [LR6/K;
  - [LR6/q2;
  - [LU7/Z;
  - [LZ7/b;
  - [LZ9/a;
  - [Lb9/B;
  - [Lj7/e;
  - [Lj7/i1;
  - [Lj7/t1;
  - [Lk8/y;
  - [Ll9/B;
  - [Ll9/J;
  - [Ll9/T;
  - [Ll9/a;
  - [Lp8/c;
  - [Lt9/t;
  - linkPaymentDetails
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"182a688","r8-mode":"full","version":"8.8.34"}
  

TYPES:

   old   │ new   │ diff         
  ───────┼───────┼──────────────
   17491 │ 17485 │ -6 (+56 -62) 
  
  + LZ9/d;
  + Ll9/c0;
  + [LO7/A3;
  + [LO7/A4;
  + [LO7/B2;
  + [LO7/B4;
  + [LO7/C1;
  + [LO7/E0;
  + [LO7/H0;
  + [LO7/H2;
  + [LO7/K1;
  + [LO7/L1;
  + [LO7/M0;
  + [LO7/P;
  + [LO7/Q0;
  + [LO7/S1;
  + [LO7/T0;
  + [LO7/U;
  + [LO7/W3;
  + [LO7/Y1;
  + [LO7/Z2;
  + [LO7/a0;
  + [LO7/e1;
  + [LO7/e2;
  + [LO7/g0;
  + [LO7/i2;
  + [LO7/j0;
  + [LO7/j3;
  + [LO7/l1;
  + [LO7/m0;
  + [LO7/m1;
  + [LO7/n3;
  + [LO7/o4;
  + [LO7/t1;
  + [LO7/t3;
  + [LO7/t4;
  + [LO7/u0;
  + [LO7/u1;
  + [LO7/v2;
  + [LO7/z0;
  + [LQ7/e;
  + [LR6/J;
  + [LR6/p2;
  + [LU7/Y;
  + [LZ7/a;
  + [LZ9/b;
  + [Lb9/A;
  + [Lj7/d;
  + [Lj7/r1;
  + [Lk8/x;
  + [Ll9/G;
  + [Ll9/K;
  + [Ll9/V;
  + [Ll9/b;
  + [Lp8/a;
  + [Lt9/r;
  
  - LO7/H4;
  - LO7/I4;
  - LZ7/b;
  - Lj7/L1;
  - Lj7/M1;
  - Lk8/D;
  - [LO7/A1;
  - [LO7/D0;
  - [LO7/F0;
  - [LO7/G2;
  - [LO7/H1;
  - [LO7/H4;
  - [LO7/I1;
  - [LO7/I4;
  - [LO7/L0;
  - [LO7/O;
  - [LO7/P0;
  - [LO7/Q1;
  - [LO7/S0;
  - [LO7/T;
  - [LO7/U3;
  - [LO7/W1;
  - [LO7/W;
  - [LO7/X2;
  - [LO7/c2;
  - [LO7/e0;
  - [LO7/g2;
  - [LO7/h0;
  - [LO7/h1;
  - [LO7/h3;
  - [LO7/k0;
  - [LO7/k1;
  - [LO7/l3;
  - [LO7/m4;
  - [LO7/p1;
  - [LO7/q0;
  - [LO7/r3;
  - [LO7/r4;
  - [LO7/s1;
  - [LO7/t2;
  - [LO7/w4;
  - [LO7/x4;
  - [LO7/y0;
  - [LO7/y3;
  - [LO7/z2;
  - [LQ7/f;
  - [LR6/K;
  - [LR6/q2;
  - [LU7/Z;
  - [LZ7/b;
  - [LZ9/a;
  - [Lb9/B;
  - [Lj7/e;
  - [Lj7/i1;
  - [Lj7/t1;
  - [Lk8/y;
  - [Ll9/B;
  - [Ll9/J;
  - [Ll9/T;
  - [Ll9/a;
  - [Lp8/c;
  - [Lt9/t;
  

METHODS:

   old   │ new   │ diff              
  ───────┼───────┼───────────────────
   72174 │ 72141 │ -33 (+1754 -1787) 
  
  + A.m a(String, x4, o, boolean, Function1) → d
  + A.m b(String, x4, A2) → d
  + A0.a0 <init>(String, B0, boolean, Function0)
  + A0.a0 s(JSONObject) → X1
  + A0.a0 t(JSONObject) → u3
  + A3.b D(String, l1, Function1, r, int)
  + A3.b W(H) → String
  + A3.b m(p, L, l, Function3, Function1, Function1, Function1, Function2, Function1, Function0, Function0, Function1, Function0, Function0, p1, r, int)
  + A3.b y(L, Function0, Function0, Function1, Function1, Function1, Function1, Function1, Function0, p1, Function0, r, int)
  + A6.C <init>(c, m, E, a, f1, Continuation)
  + A7.b <init>(e, J, Function1, Function0, int)
  + A7.f <init>(O, c, Function1, Function1, Function1, Function1)
  + A7.g <init>(a, List, Q, c, boolean, R2, c)
  + A7.g a(g, Q, boolean, R2, c, int) 
...✂

@tillh-stripe tillh-stripe force-pushed the tillh/remove-passthrough-consumerpaymentdetails-2 branch from eea98dd to 6c09b91 Compare September 30, 2025 20:36
When using the payment sheet playground with a returning customer, attempting
to checkout with a saved payment method resulted in an error: "The PaymentMethod
<pm_id> does not belong to the Customer you supplied <cus_id>."

The root cause was that the Android playground was always sending the string
"returning" to the backend, even after a customer ID was created and stored.

This fix adds a `backendParamValue` property to `CustomerType` that returns
the actual customer ID for `Existing` type, or the type string for other types,
matching the iOS behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Committed-By-Agent: claude

Co-authored-by: Claude <noreply@anthropic.com>
@tillh-stripe tillh-stripe force-pushed the tillh/remove-passthrough-consumerpaymentdetails-2 branch 3 times, most recently from 91d18ee to 5dd3c56 Compare October 1, 2025 16:59
amk-stripe and others added 9 commits October 2, 2025 08:54
* Fix returning customer checkout with saved payment methods

When using the payment sheet playground with a returning customer, attempting
to checkout with a saved payment method resulted in an error: "The PaymentMethod
<pm_id> does not belong to the Customer you supplied <cus_id>."

The root cause was that the Android playground was always sending the string
"returning" to the backend, even after a customer ID was created and stored.

This fix adds a `backendParamValue` property to `CustomerType` that returns
the actual customer ID for `Existing` type, or the type string for other types,
matching the iOS behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Committed-By-Agent: claude

* Add duration tracking to PaymentLauncher analytics events

Track duration from when confirm/next action starts until the finish
analytics event is sent. Duration is included in the analytics params
with key "duration" and value in milliseconds.

Changes:
- Add PaymentLauncher key to DurationProvider.Key enum
- Inject DurationProvider in PaymentLauncherViewModel
- Start tracking in confirmStripeIntent and handleNextActionForStripeIntent
- Add duration param to PaymentLauncherConfirmFinished and
  PaymentLauncherNextActionFinished events
- Add tests verifying duration is included in analytics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Committed-By-Agent: claude

* revert unnecessary changes, fix lint

---------

Co-authored-by: Claude <noreply@anthropic.com>
Remove Google Pixel 3-9.0 from the nightly test device list as it is being deprecated by BrowserStack.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Committed-By-Agent: claude

Co-authored-by: Claude <noreply@anthropic.com>
* Refactor NextStep

* Refactor NextStep

* Extract SharedPaymentTokenConfirmationInterceptor.kt

* Extract DeferredIntentConfirmationInterceptor.kt

* Extract IntentFirstConfirmationInterceptor.kt

* Refactor with IntentConfirmationInterceptor.Factory

* Fix tests

* Add DefaultIntentConfirmationInterceptorFactoryTest

* Minor fix

* Update "waitFor" function call with elvis operator

* Refactor methods

* Inject confirmation interceptor factory

* Inject requestOptions

* Helper function for confirmation option and action

* Fix tests

* Refactor DefaultIntentConfirmationInterceptorTest

* Address PR comments

* Refactor DeferredIntentConfirmationInterceptorTest to not be a large class

* Refactor SharedPaymentTokenConfirmationInterceptorTest to not have a long method

* Shouldn't inherent DeferredIntentConfirmationInterceptorTest

* Minor refactoring
* Migrate to Dokka 2.0

* Remove changes in `hcaptcha` module
* Update Link recollection UI

* Show error on disabled primary button press
@tillh-stripe tillh-stripe force-pushed the tillh/remove-passthrough-consumerpaymentdetails-2 branch from 3b9a041 to c5a0caf Compare October 6, 2025 14:06
Co-authored-by: stripe-android-translations[bot] <150425582+stripe-android-translations[bot]@users.noreply.github.com>
@tillh-stripe tillh-stripe force-pushed the tillh/remove-passthrough-consumerpaymentdetails-2 branch from c5a0caf to 60c469d Compare October 6, 2025 14:28
@tillh-stripe tillh-stripe force-pushed the tillh/remove-passthrough-consumerpaymentdetails-2 branch from 60c469d to aa19643 Compare October 6, 2025 15:53
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.

6 participants