File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
core/src/main/java/io/snabble/sdk Expand file tree Collapse file tree 2 files changed +10
-5
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.11]
5+
6+ ### Changed
7+ - Choose offline payment method based on available payment methods in metadata
8+
49## [ 0.14.10]
510
611### Changed
Original file line number Diff line number Diff line change @@ -182,11 +182,11 @@ public boolean isAvailable() {
182182 }
183183
184184 private PaymentMethod getFallbackPaymentMethod () {
185- // TODO remove project id hack when metadata contains explicit fallback method
186- if ( project . getEncodedCodesOptions () != null
187- && ! project . getId (). contains ( "ikea" )
188- && ! project . getId (). contains ( "globus" )) {
189- return PaymentMethod . ENCODED_CODES ;
185+ PaymentMethod [] paymentMethods = project . getAvailablePaymentMethods ();
186+ for ( PaymentMethod pm : paymentMethods ) {
187+ if ( pm . isOfflineMethod ()) {
188+ return pm ;
189+ }
190190 }
191191
192192 return null ;
You can’t perform that action at this time.
0 commit comments