https://github.com/manojbhadane/paymentcardview
Custom Credit/Debit card view
https://github.com/manojbhadane/paymentcardview
android android-app android-development android-library android-ui cardview credit-card customview debit-card jitpack mastercard payment payment-gateway visa
Last synced: 2 months ago
JSON representation
Custom Credit/Debit card view
- Host: GitHub
- URL: https://github.com/manojbhadane/paymentcardview
- Owner: manojbhadane
- License: mit
- Created: 2019-01-01T07:12:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-02T11:32:09.000Z (over 3 years ago)
- Last Synced: 2025-08-01T04:41:50.277Z (3 months ago)
- Topics: android, android-app, android-development, android-library, android-ui, cardview, credit-card, customview, debit-card, jitpack, mastercard, payment, payment-gateway, visa
- Language: Java
- Homepage:
- Size: 1.58 MB
- Stars: 72
- Watchers: 3
- Forks: 21
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Payment Card View [](https://twitter.com/intent/tweet?text=An%20easy%20to%20use,customizable,Payment%20card%20view%20for%20Android%20&url=https://github.com/manojbhadane/PaymentCardView)An easy-to-use, customizable, Payment card view for Android.
### Specs
[](https://android-arsenal.com/api?level=15)
[](https://android-arsenal.com/details/1/7417)
[](https://paypal.me/manojbhadane)# Download
This library is available in **jCenter** which is the default Maven repository used in Android Studio.
## Gradle
**Step 1.** Add it in your root build.gradle at the end of repositories
```Gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```**Step 2.** Add the dependency in your apps module build.gradle
```Gradle
dependencies {
implementation 'com.github.manojbhadane:PaymentCardView:v1.3'
}
```### Spread Some :heart:
[](https://github.com/manojbhadane) [](https://twitter.com/manojbhadane_in)# Usage
**XML**
```xml```
**Java**
```java
//Init
PaymentCardView paymentCard = (PaymentCardView) findViewById(R.id.creditCard);//Callbacks
paymentCard.setOnPaymentCardEventListener(new PaymentCardView.OnPaymentCardEventListener() {
@Override
public void onCardDetailsSubmit(String month, String year, String cardNumber, String cvv) {}
@Override
public void onError(String error) {
Toast.makeText(SampleActivity.this, error, Toast.LENGTH_SHORT).show();
}@Override
public void onCancelClick() {}
});
```# Customization
There are several customization options available which you can use to completely change the look-and-feel and functionality of this view to match your needs.
### XML (Quick and Easy)
You can add some attributes to the PaymentCardView from your XML layout.
```xml
app:cv_submitBtnText="Done" // Change the submit button text
app:cv_cardTitle="Pay Now" // Change the card title text
```### JAVA (Programatically)
You can also programatically change the properties of the view, thereby having more control over it.
```java
paymentCard.setCardTitle("Pay Now"); // Change the submit button text
paymentCard.setSubmitButtonText("Done"); // Change the card title text
```# Bugs or Requests
If you encounter any problems feel free to open an [issue](https://github.com/manojbhadane/PaymentCardView/issues/new?assignees=&labels=&template=bug_report.md). If you feel the library is missing a feature, please raise a [ticket](https://github.com/manojbhadane/PaymentCardView/issues/new?assignees=&labels=&template=feature_request.md) on GitHub and I'll look into it. Pull request are also welcome.
# About The Author
### Manoj Bhadane
Android & Backend Developer.
# License
```
MIT LicenseCopyright (c) 2019 Manoj Bhadane
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```