File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
core/src/main/java/io/snabble/sdk Expand file tree Collapse file tree 3 files changed +16
-1
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.39.3]
5+
6+ ### Fixed
7+ - Fixed checkouts not aborting when age verification check is not passing
8+
49## [ 0.39.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.39.2 '
34+ sdkVersion= ' 0.39.3 '
3535 versionCode= 1
3636
3737 compileSdkVersion= 30
Original file line number Diff line number Diff line change @@ -433,6 +433,10 @@ private boolean runChecks(CheckoutApi.CheckoutProcessResponse checkoutProcessRes
433433 continue ;
434434 }
435435
436+ if (check .state == CheckoutApi .State .FAILED ) {
437+ return false ;
438+ }
439+
436440 if (check .performedBy == CheckoutApi .Performer .APP ) {
437441 if (check .type == CheckoutApi .CheckType .MIN_AGE ) {
438442 Logger .d ("Verifying age..." );
@@ -604,6 +608,12 @@ private boolean handleProcessResponse() {
604608 return true ;
605609 }
606610
611+ if (!runChecks (checkoutProcess )) {
612+ Logger .d ("Payment denied by supervisor" );
613+ shoppingCart .generateNewUUID ();
614+ notifyStateChanged (Checkout .State .DENIED_BY_SUPERVISOR );
615+ }
616+
607617 if (checkoutProcess .supervisorApproval != null && !checkoutProcess .supervisorApproval ) {
608618 Logger .d ("Payment denied by supervisor" );
609619 shoppingCart .generateNewUUID ();
You can’t perform that action at this time.
0 commit comments