Skip to content

Commit c6eeeea

Browse files
committed
disable polling for offline checkout methods
1 parent 58eecc0 commit c6eeeea

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ allprojects {
2424
}
2525

2626
project.ext {
27-
sdkVersion='0.9.0-beta8'
27+
sdkVersion='0.9.0-beta9'
2828
versionCode=1
2929

3030
compileSdkVersion=28

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,11 @@ public void onResponse(Call call, Response response) throws IOException {
409409
checkoutProcess = gson.fromJson(json, CheckoutProcessResponse.class);
410410
if (!handleProcessResponse(checkoutProcess)) {
411411
notifyStateChanged(State.WAIT_FOR_APPROVAL);
412-
scheduleNextPoll();
413-
Logger.d("Waiting for approval...");
412+
413+
if (!checkoutProcess.paymentMethod.isOfflineMethod()) {
414+
scheduleNextPoll();
415+
Logger.d("Waiting for approval...");
416+
}
414417
}
415418

416419
inputStream.close();

0 commit comments

Comments
 (0)