-
Notifications
You must be signed in to change notification settings - Fork 137
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
[POS][Custom payment UI] – Switch to Payment Controller in POS Totals | Base PR #12977
Merged
samiuelson
merged 150 commits into
trunk
from
custom-payment-ui-6-use-payment-controller-in-pos
Dec 13, 2024
Merged
[POS][Custom payment UI] – Switch to Payment Controller in POS Totals | Base PR #12977
samiuelson
merged 150 commits into
trunk
from
custom-payment-ui-6-use-payment-controller-in-pos
Dec 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows observing all the states in POS, without the dialog-based UI. Previously custom `if` statement was used to avoid showing (duplicate) success dialog.
POS-specific payment failure handling is not applicable, because we're now observing payments states using `CardReaderPaymentController.paymentState`. In the dialog-based Payment flow, the result payment result is passed here — to the SelectPaymentMethod screen (start of the payment flow nav graph).
The new result is designed both for reader "connection" and "prepare for payment" actions.
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
* There is no need to open `SelectPaymentMethod` we can start directly in `CardReaderStatusChecker` both for reader connection and preparation for payment.
The only requirement for reader is to be connected. There's no need to pass any other intent to the IPP flow. Once reader connects we can engage Payment Controller to collect payment.
The only requirement for reader is to be connected. There's no need to pass any other intent to the IPP flow. Once reader connects we can engage Payment Controller to collect payment.
samiuelson
commented
Nov 22, 2024
...woocommerce/android/ui/payments/cardreader/payment/controller/CardReaderPaymentController.kt
Show resolved
Hide resolved
samiuelson
commented
Nov 22, 2024
.../main/kotlin/com/woocommerce/android/ui/payments/methodselection/SelectPaymentMethodEvent.kt
Show resolved
Hide resolved
samiuelson
commented
Nov 22, 2024
...rce/src/main/kotlin/com/woocommerce/android/ui/woopos/cardreader/WooPosCardReaderActivity.kt
Show resolved
Hide resolved
samiuelson
commented
Nov 22, 2024
...merce/src/main/kotlin/com/woocommerce/android/ui/woopos/cardreader/WooPosCardReaderFacade.kt
Show resolved
Hide resolved
samiuelson
commented
Nov 22, 2024
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsScreen.kt
Outdated
Show resolved
Hide resolved
…-not-connected [POS][Custom payment UI] – Reader not connected error handling
…t-failed-states [POS][Custom payment UI] – Failed payment error handling
…animation [POS][Custom payment UI] – UI animation for `Loading` data and `CollectingPayment` states
samiuelson
changed the title
[POS][Custom payment UI] Part 6 — Switch to Payment Controller in POS Totals
[POS][Custom payment UI] – Switch to Payment Controller in POS Totals | Base PR
Dec 12, 2024
… custom-payment-ui-payment-processing-animation
…processing-animation [POS][Custom payment UI] – Payment processing animation with Lottie
Project dependencies changesThe following changes in project dependencies were detected (configuration list
tree+\--- com.airbnb.android:lottie-compose:5.2.0
+ +--- com.airbnb.android:lottie:5.2.0
+ | +--- androidx.appcompat:appcompat:1.3.1 -> 1.6.1 (*)
+ | \--- com.squareup.okio:okio:1.17.4 -> 3.7.0 (*)
+ +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
+ +--- androidx.compose.foundation:foundation:1.1.1 -> 1.7.1 (*)
+ \--- androidx.compose.ui:ui:1.1.1 -> 1.7.1 (*) |
samiuelson
removed
the
status: do not merge
Dependent on another PR, ready for review but not ready for merge.
label
Dec 12, 2024
samiuelson
added
the
feature: mobile payments
Related to mobile payments / card present payments / Woo Payments.
label
Dec 12, 2024
samiuelson
deleted the
custom-payment-ui-6-use-payment-controller-in-pos
branch
December 13, 2024 09:35
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.
feature: point of sale
POS project
unit-tests-exemption
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Switch to Payment Controller in WooPosTotalsViewModel for payment collection
💡 This is a base PR that includes the following partial PRs:
Loading
data andCollectingPayment
states #13090Closes: #12822
Description
This PR is first step toward integrating
CardReaderPaymentController
intoWooPosTotals
screen.In addition to using
CardReaderPaymentController
intoWooPosTotalsViewModel
, an old code specific to old IPP flow reuse in POS was removed.In the next PRs:
💡 The PR targets a feature branch
feature/custom-payment-ui
. "Do not merge" label added to prevent merging at the moment so that we are able to release the full feature.Steps to reproduce
Test that it's possible to collect payment (happy path) and that "Payment success" screen is shown after payment is completed.
Testing information
The tests that have been performed
Images/gif
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: