@@ -136,68 +136,6 @@ open class PaymentOptionsView @JvmOverloads constructor(
136136 )
137137 }
138138
139- // if (paymentMethods.contains(PaymentMethod.TWINT)) {
140- // val count = credentials.count {
141- // it.appId == Snabble.getInstance().config.appId &&
142- // it.type == PaymentCredentials.Type.DATATRANS &&
143- // it.brand == PaymentCredentials.Brand.TWINT
144- // }
145- //
146- // if (globalList.size > 0) {
147- // globalList.add(
148- // Entry(isDivider = true)
149- // )
150- // }
151- //
152- // globalList.add(
153- // Entry(
154- // text = "TWINT",
155- // icon = R.drawable.snabble_ic_payment_select_twint,
156- // count = count,
157- // click = {
158- // if (count > 0) {
159- // val args = Bundle()
160- // args.putSerializable(PaymentCredentialsListView.ARG_PAYMENT_TYPE, PaymentCredentials.Type.DATATRANS)
161- // executeUiAction(SnabbleUI.Action.SHOW_PAYMENT_CREDENTIALS_LIST, args)
162- // } else {
163- // PaymentInputViewHelper.openPaymentInputView(context, PaymentMethod.TWINT, null)
164- // }
165- // }
166- // )
167- // )
168- // }
169- //
170- // if (paymentMethods.contains(PaymentMethod.POST_FINANCE_CARD)) {
171- // val count = credentials.count {
172- // it.appId == Snabble.getInstance().config.appId &&
173- // it.type == PaymentCredentials.Type.DATATRANS &&
174- // it.brand == PaymentCredentials.Brand.POST_FINANCE_CARD
175- // }
176- //
177- // if (globalList.size > 0) {
178- // globalList.add(
179- // Entry(isDivider = true)
180- // )
181- // }
182- //
183- // globalList.add(
184- // Entry(
185- // text = "PostFinance Card",
186- // icon = R.drawable.snabble_ic_payment_select_postfinance,
187- // count = count,
188- // click = {
189- // if (count > 0) {
190- // val args = Bundle()
191- // args.putSerializable(PaymentCredentialsListView.ARG_PAYMENT_TYPE, PaymentCredentials.Type.DATATRANS)
192- // executeUiAction(SnabbleUI.Action.SHOW_PAYMENT_CREDENTIALS_LIST, args)
193- // } else {
194- // PaymentInputViewHelper.openPaymentInputView(context, PaymentMethod.POST_FINANCE_CARD, null)
195- // }
196- // }
197- // )
198- // )
199- // }
200-
201139 projectList.add(
202140 Entry (
203141 isSectionHeader = true ,
@@ -323,7 +261,10 @@ open class PaymentOptionsView @JvmOverloads constructor(
323261 project.availablePaymentMethods.any {
324262 it == PaymentMethod .VISA
325263 || it == PaymentMethod .MASTERCARD
326- || it == PaymentMethod .AMEX }
264+ || it == PaymentMethod .AMEX
265+ || it == PaymentMethod .TWINT
266+ || it == PaymentMethod .POST_FINANCE_CARD
267+ }
327268 }
328269 }
329270
0 commit comments