💳 ComposeCards is a beautifully designed payment view library for Credit and Debit Cards. Made using Jetpack Compose 🎉. It allows you to easily integrate Payment View with much smooth UI and animations.
-
🗂️ Automatic card type recognition that supports the following cards:
- Visa
- Mastercard
- RuPay
- American Express
- Maestro
- Diners Club
-
🤩 Simple VisualTransformation subclasses for the following use cases:
- Card number (with custom separators, digit masking)
Add the following to your root build.gradle
file:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
Lastly, add the following dependency to your app's build.gradle.kts
(Kotlin) or build.gradle
(Groovy) file:
Kotlin (KTS)
dependencies {
implementation("com.github.aritra-tech:ComposeCards:$currentVersion")
}
Groovy
dependencies {
implementation 'com.github.aritra-tech:ComposeCards:$currentVersion'
}
You can use the CardDetails
by simply passing this to the screen you want to use. For example:
CardDetails(
creditCardNumber = "378282246310005",
creditCardHolderName = "John Doe",
creditCardExpiryDate = "02/29",
creditCardCVV = "101",
onSave = {}
)
Parameter | Description |
---|---|
creditCardNumber |
The card number input by the user. |
creditCardHolderName |
The card holder's name is input by the user. |
creditCardExpiryDate |
The card's expiry date is input by the user. |
creditCardCVV |
The card's CVV input by the user. |
onSave |
Callback function to handle save action. |
If you encounter any issues or have feature requests, please create a new issue in this repository.
Support it by joining stargazers for this repository. ⭐
Also follow me for my next creations! 🤩
Copyright 2023 aritra-tech
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.