Skip to content

Commit f8386c2

Browse files
committed
not show cart restoration after successful online checkout
1 parent f0d7db4 commit f8386c2

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.37.4]
5+
6+
### Changed
7+
- Not showing cart restoration after successful online checkout
8+
49
## [0.37.3]
510

611
### Added

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ allprojects {
3131
}
3232

3333
project.ext {
34-
sdkVersion='0.37.3'
34+
sdkVersion='0.37.4'
3535
versionCode=1
3636

3737
compileSdkVersion=30

core/src/main/java/io/snabble/sdk/Checkout.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,11 @@ private boolean handleProcessResponse() {
566566
private void approve() {
567567
if (state != Checkout.State.PAYMENT_APPROVED) {
568568
Logger.d("Payment approved");
569-
shoppingCart.backup();
569+
570+
if (paymentMethod.isOfflineMethod()) {
571+
shoppingCart.backup();
572+
}
573+
570574
shoppingCart.invalidate();
571575
clearCodes();
572576
notifyStateChanged(Checkout.State.PAYMENT_APPROVED);

0 commit comments

Comments
 (0)