Skip to content

Generate a Creditcard Number for Dev tests

License

Notifications You must be signed in to change notification settings

fakecreditcard/fake-creditcard

 
 

Repository files navigation

Fake Credit Card Generator

Build Status License

This library have a objective for help a devellopers and testers during the application tests.

For many times is necesary the create a tests for payment validation using the credit card fake and this library is one facilitator for this scenaries.

Usage


In pom.xml, add the following xml stanza between <dependencies> ... </dependencies>

<dependency>
  <groupId>com.github.fakecreditcard</groupId>
  <artifactId>fake-creditcard</artifactId>
  <version>1.0.0</version>
</dependency>

For gradle users, add the following to your build.gradle file.

dependencies {
    implementation 'com.github.fakecreditcard:fake-creditcard:1.0.0'
}

In your Java code

Creditcard card = FakeCard.visa();

Creditcard card = FakeCard.master();

The return of card genetor is

public class Creditcard {

	private String number;

	private String holderName;

	private String cvv;

	private String expDate;
	
	private String expirationYear;
	
	private String expirationMonth;

}

LICENSE

Copyright (c) 2019 Fernando Godóy. See the LICENSE file for license rights and limitations.

About

Generate a Creditcard Number for Dev tests

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 94.9%
  • Shell 5.1%