Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ internal class CardTokenizationViewModel private constructor(

fun onEvent(event: CardTokenizationEvent) = interactor.onEvent(event)

fun isTokenized() = interactor.state.value.tokenizedCard != null

private fun map(state: CardTokenizationInteractorState) = with(configuration) {
CardTokenizationViewModelState(
title = title ?: app.getString(R.string.po_card_tokenization_title),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ internal object CardTokenizationScreen {
} ?: colors.icon.disabled
)

private val defaultScanButton: POButton.Style
val defaultScanButton: POButton.Style
@Composable get() = POButton.secondary2.let {
it.copy(
normal = it.normal.copy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,8 @@ internal class DynamicCheckoutInteractor(
coroutineScope = interactorScope
) { request ->
interactorScope.launch {
eventDispatcher.send(request.toResponse(shouldContinue = false))
val shouldContinue = !cardTokenization.isTokenized()
eventDispatcher.send(request.toResponse(shouldContinue))
}
}
eventDispatcher.subscribeForRequest<PONativeAlternativePaymentMethodDefaultValuesRequest>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import com.google.android.gms.wallet.WalletConstants
import com.processout.sdk.api.model.request.POContact
import com.processout.sdk.api.model.request.POInvoiceRequest
import com.processout.sdk.ui.card.scanner.POCardScannerConfiguration
import com.processout.sdk.ui.card.tokenization.POCardTokenizationConfiguration.PreferredSchemeConfiguration
import com.processout.sdk.ui.checkout.PODynamicCheckoutConfiguration.GooglePayConfiguration.Environment
import com.processout.sdk.ui.core.annotation.ProcessOutInternalApi
import com.processout.sdk.ui.core.shared.image.PODrawableImage
import com.processout.sdk.ui.core.style.*
Expand Down Expand Up @@ -334,6 +332,7 @@ data class PODynamicCheckoutConfiguration(
* @param[label] Field label style.
* @param[field] Field style.
* @param[codeField] Code field style.
* @param[radioField] Radio field style.
* @param[radioButton] Radio button style.
* @param[checkbox] Checkbox style.
* @param[dropdownMenu] Dropdown menu style.
Expand All @@ -357,7 +356,8 @@ data class PODynamicCheckoutConfiguration(
val label: POTextStyle? = null,
val field: POFieldStyle? = null,
val codeField: POFieldStyle? = null,
val radioButton: PORadioButtonStyle? = null,
val radioField: PORadioFieldStyle? = null,
val radioButton: PORadioButtonStyle? = null, // TODO: remove
val checkbox: POCheckboxStyle? = null,
val dropdownMenu: PODropdownMenuStyle? = null,
val bodyText: POTextStyle? = null,
Expand Down
Loading