CardPaymentMethodRequest Class
Sends data related to a card payment method to a gateway adapter during a service call.
This class contains details about the card used as a payment method for authorization, sale, or tokenization transaction requests. The gateway adapter reads the fields of this class object while constructing a transaction JSON request to send to the payment gateway. The object of this class is available as the cardPaymentMethod field in the SaleApiPaymentMethodRequest Class, AuthApiPaymentMethodRequest Class, and PaymentMethodTokenizationRequest Class.
This code sample retrieves the cardPaymentMethodRequest object from the paymentMethod class.
The following are constructors for CardPaymentMethodRequest.
-
CardPaymentMethodRequest(cardCategory)
Sets the
cardCategoryvalue for the card payment method request.
Sets the cardCategory value for the card payment method request.
global CardPaymentMethodRequest(commercepayments.CardCategory cardCategory)
- cardCategory: Type: CardCategory Defines whether the card payment method is a credit card or a debit card.
The following are properties for CardPaymentMethodRequest.
-
Customer account for this payment method.
-
Indicates whether a token is being requested so that the payment method can be used for recurring payments.
-
Indicates whether a card payment method is for a credit card or debit card.
-
The first name of the cardholder for the card payment method.
-
The last name of the cardholder for the card payment method.
-
Full name of the cardholder on the card payment method.
-
System-defined unique ID for the card payment method.
-
Defines the credit card bank. Possible values are
AmericanExpress,DinersClub,JCB,Maestro,MasterCard, andVisa. -
The card security code for the credit or debit card on a card payment method.
-
Email address of the cardholder for the credit or debit card on a card payment method.
-
Expiration month for the credit or debit card on a card payment method.
-
Expiration year of the credit or debit card for the card payment method.
-
Input field for the card type. This field doesn’t store the card type directly, but instead populates CardBin, LastFour, and DisplayCardNumber based on the value entered in
inputCardType. -
The credit or debit card becomes valid on the first day of the
startMonthin thestartYear -
Year during which the credit or debit card becomes valid.
Customer account for this payment method.
global String accountId {get; set;}
Type: String
Indicates whether a token is being requested so that the payment method can be used for recurring payments.
global Boolean autoPay {get; set;}
Type: Boolean
Indicates whether a card payment method is for a credit card or debit card.
global commercepayments.CardCategory cardCategory {get; set;}
Type: CardCategory
The first name of the cardholder for the card payment method.
global String cardHolderFirstName {get; set;}
Type: String
The last name of the cardholder for the card payment method.
global String cardHolderLastName {get; set;}
Type: String
Full name of the cardholder on the card payment method.
global String cardHolderName {get; set;}
Type: String
System-defined unique ID for the card payment method.
global String cardNumber {get; set;}
Type: String
Defines the credit card bank. Possible values are AmericanExpress, DinersClub, JCB, Maestro, MasterCard, andVisa.
global commercepayments.CardType cardType {get; set;}
Type: CardType
The card security code for the credit or debit card on a card payment method.
global String cvv {get; set;}
Type: String
Email address of the cardholder for the credit or debit card on a card payment method.
global String email {get; set;}
Type: String
Expiration month for the credit or debit card on a card payment method.
global Integer expiryMonth {get; set;}
Type: Integer
Expiration year of the credit or debit card for the card payment method.
global Integer expiryYear {get; set;}
Type: Integer
Input field for the card type. This field doesn’t store the card type directly, but instead populates CardBin, LastFour, and DisplayCardNumber based on the value entered in inputCardType.
global String inputCardType {get; set;}
Type: String
The credit or debit card becomes valid on the first day of the startMonth in the startYear
global Integer startMonth {get; set;}
Type: Integer
Year during which the credit or debit card becomes valid.
global Integer startYear {get; set;}
Type: Integer
The following are methods for CardPaymentMethodRequest.
-
Maintains the integrity of lists of type
CardPaymentMethodRequestby determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java. -
Maintains the integrity of lists of type
CardPaymentMethodRequest. -
Converts a date to a string.
Maintains the integrity of lists of type CardPaymentMethodRequest by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.
global Boolean equals(Object obj)
- obj: Type: Object External object whose key is to be validated.
Type: Boolean
Maintains the integrity of lists of type CardPaymentMethodRequest.
global Integer hashCode()
Type: Integer
Converts a date to a string.
global String toString()
Type: String