File tree Expand file tree Collapse file tree 5 files changed +24
-2
lines changed
core/src/main/java/io/snabble/sdk
ui/src/main/java/io/snabble/sdk/ui/receipts Expand file tree Collapse file tree 5 files changed +24
-2
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.14.3]
5+
6+ ### Changes
7+ - Now exposing orderId in Checkout
8+ - ReceiptListView is now checking for orderId while fetching
9+
410## [ 0.14.2]
511
612### Fixed
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ allprojects {
2323 }
2424
2525 project. ext {
26- sdkVersion= ' 0.14.2 '
26+ sdkVersion= ' 0.14.3 '
2727 versionCode= 1
2828
2929 compileSdkVersion= 28
Original file line number Diff line number Diff line change @@ -471,6 +471,10 @@ public void approveOfflineMethod() {
471471 }
472472 }
473473
474+ public String getOrderId () {
475+ return checkoutProcess != null ? checkoutProcess .orderId : null ;
476+ }
477+
474478 public void setClientAcceptedPaymentMethods (PaymentMethod [] acceptedPaymentMethods ) {
475479 clientAcceptedPaymentMethods = acceptedPaymentMethods ;
476480 }
Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ public static class CheckoutProcessResponse {
128128 public Map <String , Href > links ;
129129 public Boolean supervisorApproval ;
130130 public Boolean paymentApproval ;
131+ @ SerializedName ("orderID" )
132+ public String orderId ;
131133 public boolean aborted ;
132134 public JsonObject checkoutInfo ;
133135 public PaymentMethod paymentMethod ;
Original file line number Diff line number Diff line change @@ -105,7 +105,17 @@ public void success(ReceiptInfo[] newReceiptInfos) {
105105 receiptInfos = newReceiptInfos ;
106106
107107 if (checkout != null && checkout .getState () == Checkout .State .PAYMENT_APPROVED ) {
108- showProgressBar = true ;
108+ boolean containsOrder = false ;
109+ for (ReceiptInfo receiptInfo : newReceiptInfos ) {
110+ if (receiptInfo .getId ().equals (checkout .getOrderId ())) {
111+ containsOrder = true ;
112+ break ;
113+ }
114+ }
115+
116+ if (!containsOrder ) {
117+ showProgressBar = true ;
118+ }
109119 }
110120
111121 recyclerView .getAdapter ().notifyDataSetChanged ();
You can’t perform that action at this time.
0 commit comments