File tree Expand file tree Collapse file tree 4 files changed +10
-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 +10
-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.51.6]
5+
6+ ### Fixed
7+ - Only fallback to offline payment method if an offline capable payment method is selected
8+
49## [ 0.51.5]
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.51.5 '
34+ sdkVersion= ' 0.51.6 '
3535 versionCode= 1
3636
3737 compileSdkVersion= 31
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ private PaymentMethod getFallbackPaymentMethod() {
255255 }
256256
257257 public void checkout () {
258- checkout (-1 );
258+ checkout (-1 , false );
259259 }
260260
261261 /**
@@ -268,7 +268,7 @@ public void checkout() {
268268 * You then need to sometime after call @link Checkout#pay(PaymentMethod)}
269269 * to pay with that payment method.
270270 */
271- public void checkout (long timeout ) {
271+ public void checkout (long timeout , boolean allowFallbackAfterTimeout ) {
272272 checkoutProcess = null ;
273273 rawCheckoutProcess = null ;
274274 signedCheckoutInfo = null ;
@@ -349,7 +349,7 @@ public void unknownError() {
349349 @ Override
350350 public void connectionError () {
351351 PaymentMethod fallback = getFallbackPaymentMethod ();
352- if (fallback != null ) {
352+ if (fallback != null && allowFallbackAfterTimeout ) {
353353 paymentMethod = fallback ;
354354 priceToPay = shoppingCart .getTotalPrice ();
355355 checkoutRetryer .add (backendCart );
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ open class CheckoutBar @JvmOverloads constructor(
217217 object : OneShotClickListener () {
218218 override fun click () {
219219 if (entry.paymentMethod.isOfflineMethod) {
220- project.checkout.checkout(3000 )
220+ project.checkout.checkout(3000 , true )
221221 } else {
222222 project.checkout.checkout()
223223 }
You can’t perform that action at this time.
0 commit comments