File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed
core/src/main/java/io/snabble/sdk
ui/src/main/java/io/snabble/sdk/ui/cart Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 11# Changelog
22All notable changes to this project will be documented in this file.
33
4+ ## [ 0.49.3]
5+
6+ ### Fixed
7+ - Transaction can now not be aborted anymore when already processing and user is still in cart
8+
49## [ 0.49.2]
510
611### Fixed
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ allprojects {
3131 }
3232
3333 project. ext {
34- sdkVersion= ' 0.49.2 '
34+ sdkVersion= ' 0.49.3 '
3535 versionCode= 1
3636
3737 compileSdkVersion= 31
Original file line number Diff line number Diff line change @@ -169,8 +169,10 @@ public void success() {
169169 notifyStateChanged (Checkout .State .PAYMENT_ABORTED );
170170 }
171171
172+ stopPolling ();
172173 invalidProducts = null ;
173174 paymentMethod = null ;
175+
174176 shoppingCart .generateNewUUID ();
175177 shop = null ;
176178 }
@@ -181,7 +183,9 @@ public void error() {
181183 if (error ) {
182184 notifyStateChanged (Checkout .State .PAYMENT_PROCESSING_ERROR );
183185 } else {
184- notifyStateChanged (Checkout .State .PAYMENT_ABORT_FAILED );
186+ if (state != State .PAYMENT_PROCESSING && state != State .PAYMENT_APPROVED ) {
187+ notifyStateChanged (Checkout .State .PAYMENT_ABORT_FAILED );
188+ }
185189 }
186190 }
187191 });
@@ -209,7 +213,6 @@ public void abortSilently() {
209213
210214 public void cancelOutstandingCalls () {
211215 checkoutApi .cancel ();
212- stopPolling ();
213216 }
214217
215218 /**
@@ -219,6 +222,7 @@ public void cancelOutstandingCalls() {
219222 */
220223 public void reset () {
221224 cancelOutstandingCalls ();
225+ stopPolling ();
222226 notifyStateChanged (Checkout .State .NONE );
223227
224228 invalidProducts = null ;
Original file line number Diff line number Diff line change @@ -102,11 +102,10 @@ open class CheckoutBar @JvmOverloads constructor(
102102 progressDialog.setProgressStyle(ProgressDialog .STYLE_SPINNER )
103103 progressDialog.setMessage(context.getString(R .string.Snabble_pleaseWait ))
104104 progressDialog.setCanceledOnTouchOutside(false )
105- progressDialog.setCancelable(true )
105+ progressDialog.setCancelable(false )
106106 progressDialog.setOnKeyListener(DialogInterface .OnKeyListener { dialogInterface: DialogInterface , _, keyEvent: KeyEvent ->
107107 if (keyEvent.keyCode == KeyEvent .KEYCODE_BACK ) {
108108 project.checkout.abort()
109- dialogInterface.dismiss()
110109 return @OnKeyListener true
111110 }
112111 false
You can’t perform that action at this time.
0 commit comments