java.lang.Object
com.maxmind.minfraud.request.CreditCard.Builder
- Enclosing class:
- CreditCard
Builder
creates instances of the parent CreditCard
from values set by the
builder's methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbankPhoneCountryCode
(String code) bankPhoneNumber
(String number) build()
issuerIdNumber
(String number) lastDigits
(String digits) was3dSecureSuccessful
(Boolean wasSuccessful)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
issuerIdNumber
- Parameters:
number
- The issuer ID number for the credit card. This is the first 6 or 8 digits of the credit card number. It identifies the issuing bank.- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when number is not a six digit string.
-
lastDigits
- Parameters:
digits
- The last two or four digits of the credit card number.- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when number is not a two or four digit string.
-
bankName
- Parameters:
name
- The name of the issuing bank as provided by the end user.- Returns:
- The builder object.
-
bankPhoneCountryCode
- Parameters:
code
- The phone country code for the issuing bank as provided by the end user.- Returns:
- The builder object.
-
bankPhoneNumber
- Parameters:
number
- The phone number, without the country code, for the issuing bank as provided by the end user.- Returns:
- The builder object.
-
country
- Parameters:
code
- The two character ISO 3166-1 alpha-2 country code where the issuer of the card is located. This may be passed instead of issuerIdNumber if you do not wish to pass partial account numbers, or if your payment processor does not provide them.- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when code is not a two-letter country code.
-
avsResult
- Parameters:
code
- The address verification system (AVS) check result, as returned to you by the credit card processor. The minFraud service supports the standard AVS codes.- Returns:
- The builder object.
-
cvvResult
- Parameters:
code
- The card verification value (CVV) code as provided by the payment processor.- Returns:
- The builder object.
-
token
- Parameters:
token
- A token uniquely identifying the card. The token should consist of non-space printable ASCII characters. If the token is all digits, it must be more than 19 characters long. The token must not be a primary account number (PAN) or a simple transformation of it. If you have a valid token that looks like a PAN but is not one, you may prefix that token with a fixed string, e.g., "token-".- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when the token is invalid.
-
was3dSecureSuccessful
- Parameters:
wasSuccessful
- An indication of whether or not the outcome of 3D-Secure verification (e.g. Safekey, SecureCode, Verified by Visa) was successful, as provided by the end user.true
if customer verification was successful, orfalse
if the customer failed verification. If 3-D Secure verification was not used, was unavailable, or resulted in another outcome other than success or failure, do not use this method.- Returns:
- The builder object.
-
build
- Returns:
- An instance of
CreditCard
created from the fields set on this builder.
-