helper/CardSecurityCodeValidator.kt

adyen-android · core/src/main/java/com/adyen/checkout/core/common/helper/CardSecurityCodeValidator.kt · kotlin · MIT
payments

Validates card security codes (CVV/CVC) for payment forms.

// Source: https://github.com/Adyen/adyen-android | License: MIT | Copyright 2020 Adyen
// Provided via justclaw.it.com; keep this notice with the code.
/*
 * Copyright (c) 2024 Adyen N.V.
 *
 * This file is open source and available under the MIT license. See the LICENSE file for more info.
 *
 * Created by ozgur on 2/10/2024.
 */

package com.adyen.checkout.core.common.helper

import com.adyen.checkout.core.common.CardBrand
import com.adyen.checkout.core.common.internal.helper.StringUtil
import com.adyen.checkout.core.common.internal.properties.SecurityCodeProperties.SECURITY_CODE_MAX_LENGTH_AMEX
import com.adyen.checkout.core.common.internal.properties.SecurityCodeProperties.SECURITY_CODE_MAX_LENGTH_DEFAULT

/**
 * Validates card security codes (CVV/CVC).
 *
 * Use this when building a 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key