Skip to content

[WOOMOB-302][Mobile Payments] Update Stripe's SDK to 3.10.2 #13918

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

Closed

Conversation

kidinov
Copy link
Contributor

@kidinov kidinov commented Apr 14, 2025

Closes: WOOMOB-302

Description

The PR updates Stripe's SDK to the latest version without breaking changes

@malinajirka @samiuelson

The update presents a few issues with TTP, which I'd like you to confirm on your devices to assess how severe the problems are:

  • It seems that with this update, the card should be super close to the device now, and I believe if that's the same for all the devices, many merchants will have a lot of trouble with that
  • The default setting of the indicator's position is completely off on my device, and on top of that, it's not even in the center of the screen
  • Dark mode seems to be not taken into account
image

Steps to reproduce

Try both IPP and TTP flows

Important: TTP with a card can be tested only on the real device in the release builds!

The tests that have been performed

Above

Images/gif

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@kidinov kidinov added status: do not merge Dependent on another PR, ready for review but not ready for merge. feature: mobile payments Related to mobile payments / card present payments / Woo Payments. labels Apr 14, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Apr 14, 2025

1 Error
🚫 This PR is tagged with status: do not merge label(s).
1 Warning
⚠️ This PR is assigned to the milestone 22.2. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@kidinov kidinov added this to the 22.2 milestone Apr 14, 2025
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 14, 2025

Project manifest changes for WooCommerce

The following changes in the WooCommerce's merged AndroidManifest.xml file were detected (build variant: vanillaRelease):

--- ./build/reports/diff_manifest/WooCommerce/vanillaRelease/base_manifest.txt	2025-04-15 07:50:26.149219130 +0000
+++ ./build/reports/diff_manifest/WooCommerce/vanillaRelease/head_manifest.txt	2025-04-15 07:50:36.569262925 +0000
@@ -736,14 +736,6 @@
             android:authorities="com.woocommerce.android.com.squareup.picasso"
             android:exported="false" />
 
-        <service
-            android:name="com.google.android.datatransport.runtime.backends.TransportBackendDiscovery"
-            android:exported="false" >
-            <meta-data
-                android:name="backend:com.google.android.datatransport.cct.CctBackendFactory"
-                android:value="cct" />
-        </service>
-
         <receiver
             android:name="androidx.profileinstaller.ProfileInstallReceiver"
             android:directBootAware="false"
@@ -765,6 +757,13 @@
         </receiver>
 
         <service
+            android:name="com.google.android.datatransport.runtime.backends.TransportBackendDiscovery"
+            android:exported="false" >
+            <meta-data
+                android:name="backend:com.google.android.datatransport.cct.CctBackendFactory"
+                android:value="cct" />
+        </service>
+        <service
             android:name="com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService"
             android:exported="false"
             android:permission="android.permission.BIND_JOB_SERVICE" >

Go to https://buildkite.com/automattic/woocommerce-android/builds/28478/canvas?sid=01963869-7511-4bce-846b-ea5d45122f53, click on the Artifacts tab and audit the files.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 14, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit6f8c349
Direct Downloadwoocommerce-wear-prototype-build-pr13918-6f8c349.apk

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 14, 2025

Project dependencies changes

list
- Removed Dependencies
com.jaredrummler:android-device-names:1.1.9
com.neovisionaries:nv-i18n:1.29

! Upgraded Dependencies
androidx.annotation:annotation:1.8.2, (changed from 1.8.1)
androidx.annotation:annotation-jvm:1.8.2, (changed from 1.8.1)
com.stripe:stripeterminal-core:3.10.2, (changed from 3.7.1)
com.stripe:stripeterminal-external:3.10.2, (changed from 3.7.1)
com.stripe:stripeterminal-internal-common:3.10.2, (changed from 3.7.1)
com.stripe:stripeterminal-internal-models:3.10.2, (changed from 3.7.1)
com.stripe:stripeterminal-localmobile:3.10.2, (changed from 3.7.1)
io.reactivex.rxjava3:rxjava:3.1.9, (changed from 3.1.8)
org.jetbrains.kotlin:kotlin-reflect:1.9.25, (changed from 1.9.24)

⚠️ Project dependencies tree is too large. View it in Buildkite artifacts

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 14, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit6f8c349
Direct Downloadwoocommerce-prototype-build-pr13918-6f8c349.apk

@malinajirka
Copy link
Contributor

@kidinov Thanks for looking into this!

Pixel 8, Android 15:

  • The screen looks fine - it's centered and has a new look (Tap behind device button is not placed on top of the NFC),
  • darkmode is ignored (ignored even in production),
  • proximity hasn't changed or at least not significantly.

https://github.com/user-attachments/assets/283fbae5-8433-44ef-8a8d-47b4b89f43a1
https://github.com/user-attachments/assets/7fcd2ddd-b1e2-4f7d-8972-af210d9ce3c4

Samsung Flip, Android 13:

  • The screen looks fine, however, it's the old UI
  • darkmode is ignored (ignored even in production),
  • proximity hasn't changed or at least not significantly.
Screen_recording_20250415_084337.mp4

@kidinov
Copy link
Contributor Author

kidinov commented Apr 15, 2025

@malinajirka 👋

Thank you for testing this. I think I learned how to apply the colors - we need to do this earlier. Dark mode applied and colors too.

image

6f8c349

It's super weird that you see the old UI on Android 13 devices, though 🤨

I'll see what @samiuelson will find out and report this to Stripe and then we will have to decide if we can release this or not

@malinajirka
Copy link
Contributor

It's super weird that you see the old UI on Android 13 devices, though 🤨

I retested from a clean installation, just to be sure I was testing the correct version and I can still see the old UI.

@samiuelson samiuelson self-assigned this Apr 15, 2025
@samiuelson
Copy link
Contributor

samiuelson commented Apr 15, 2025

@kidinov, @malinajirka 👋 I was testing on Pixel 7 Pro, Android 14, jalapenoRelease, fresh installation.

I can't process the Tap To Pay payment – the app is crashing:

WooCommerce-CARD_READER com.woocommerce.android.prealpha     D  CardReader: onPaymentStatusChange: READY
StripeTerminal          com.woocommerce.android.prealpha     E  class=TerminalSession (Ask Gemini)
                                                                                                    com.stripe.stripeterminal.external.models.TerminalException: Contactless transaction was canceled
                                                                                                    	at com.stripe.stripeterminal.internal.common.adapter.CotsAdapter.collectPaymentMethodHandler(CotsAdapter.kt:378)
                                                                                                    	at com.stripe.stripeterminal.internal.common.adapter.CotsAdapter.collectPaymentMethod(CotsAdapter.kt:213)
                                                                                                    	at com.stripe.stripeterminal.internal.common.adapter.ProxyAdapter.collectPaymentMethod(ProxyAdapter.kt:165)
                                                                                                    	at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$CollectPaymentMethodOperation.executeIfNotCanceled(TerminalSession.kt:1651)
                                                                                                    	at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$CancelableOperation.execute(TerminalSession.kt:1319)
                                                                                                    	at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$ExternalOperation.run$terminalsession_release(TerminalSession.kt:1274)
                                                                                                    	at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession.enqueueOperation$lambda$6(TerminalSession.kt:1089)
                                                                                                    	at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession.$r8$lambda$9_FdDGpM1BaifeFRjKBBfCCLP6o(TerminalSession.kt:0)
                                                                                                    	at com.stripe.stripeterminal.internal.common.terminalsession.TerminalSession$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:0)
                                                                                                    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
                                                                                                    	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
2025-04-15 15:17:48.764  1187-1858  WooCommerce-CARD_READER com.woocommerce.android.prealpha     D  CardReader: Payment collection failed
2025-04-15 15:17:48.764  1187-1858  WooCommerce-CARD_READER com.woocommerce.android.prealpha     E  CardReader: Job was cancelled

I tried with both UK and US stores; I'm not sure what is the root cause of the problem 🤔

Recording:

Screen_recording_20250415_151741.mp4

EDIT: It's failing on trunk too, so it's probably some problem with my device.

@kidinov
Copy link
Contributor Author

kidinov commented Apr 16, 2025

@samiuelson

Check the error message; I handled this case! 😀 Disable don't keep activities 🙏

The app is not crashing, btw

@samiuelson
Copy link
Contributor

samiuelson commented Apr 16, 2025

Check the error message; I handled this case! 😀 Disable don't keep activities 🙏

Good catch, @kidinov. I disabled DKA and TTP is working fine 👍

  • I'm not seeing any visual change in dark mode. The TTP screen looks like this in both modes:
  • I don't have any issues with NFC accuracy. The payment went through even though I was keeping the card 1 cm away from the phone.

@kidinov kidinov marked this pull request as draft April 17, 2025 13:00
@malinajirka malinajirka modified the milestones: 22.2, 22.3 Apr 18, 2025
@samiuelson samiuelson removed their assignment Apr 18, 2025
@kidinov kidinov closed this Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: mobile payments Related to mobile payments / card present payments / Woo Payments. status: do not merge Dependent on another PR, ready for review but not ready for merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants