From 9deb05e87c4c580915c94afde1f3d268189d0efa Mon Sep 17 00:00:00 2001 From: samiuelson Date: Wed, 8 Jan 2025 18:11:12 +0100 Subject: [PATCH] Cancel payment intent when "Mark ... as complete" tapped --- .../android/ui/woopos/home/totals/WooPosTotalsViewModel.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsViewModel.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsViewModel.kt index 5b607f56b42..38371285624 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsViewModel.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/totals/WooPosTotalsViewModel.kt @@ -280,9 +280,10 @@ class WooPosTotalsViewModel @Inject constructor( uiState.value = InitialState } - is ParentToChildrenEvent.OrderSuccessfullyPaid -> showSuccessfulPaymentState( - event.paymentMethod - ) + is ParentToChildrenEvent.OrderSuccessfullyPaid -> { + cancelPaymentAction() + showSuccessfulPaymentState(event.paymentMethod) + } is ParentToChildrenEvent.ItemClickedInProductSelector -> Unit }