Skip to content

Commit 690f56e

Browse files
committed
handle null customer card id in encodedCodesIKEA
1 parent d4ea21b commit 690f56e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
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.13.7]
5+
6+
### Fixed
7+
- Handle missing customer card id in encodedCodesIKEA
8+
49
## [0.13.6]
510

611
### Added

ui/src/main/java/io/snabble/sdk/ui/checkout/CheckoutView.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,16 @@ private void displayPaymentView() {
137137
if (options != null) {
138138
maxCodes = options.maxCodes;
139139
}
140+
141+
String prefix = "9100003\u001d100{qrCodeCount}";
142+
if (project.getCustomerCardId() != null) {
143+
prefix += "\u001d92" + project.getCustomerCardId();
144+
}
145+
prefix += "\u001d240";
146+
140147
displayView(new CheckoutEncodedCodesView(getContext(),
141148
new EncodedCodesOptions.Builder(project)
142-
.prefix("9100003\u001d100{qrCodeCount}\u001d92" + project.getCustomerCardId() + "\u001d240")
149+
.prefix(prefix)
143150
.separator("\u001d240")
144151
.suffix("")
145152
.maxCodes(maxCodes)

0 commit comments

Comments
 (0)