Payment Form Models
The payment form model is a special model used to validate payment parameters and pass them on to a payment gateway in a way it expects.
When returning after a validation error, a
paymentForm variable will be available to the template and set to an instance of BasePaymentForm (opens new window).
Each gateway can use its own payment form, however it must extend BasePaymentForm (opens new window). There are generic models available for use, specifically for gateways passing around credit card information, but you should refer to the documentation of the plugin providing the gateway to see whether it uses its own model.
Generally, you shouldn’t be concerned with the specific type of payment form model being used, as it’s provided by the gateway and doesn’t need to be configured.
# Model Attributes
The following payment form model attributes exist for gateways handling credit card information:
|If a token is found on the payment form, no validation of other fields is performed and the data is ignored.
|The first name on the customer’s credit card.
|The last name of the customer’s credit card.
|Integer representing the month of credit card expiry.
|required, min: current year, max: current year + 12
|Integer representing the year of credit card expiry.
|minLength: 3, maxLength: 4
|Integer found on the back of the card for security.
|Luhn algorithm (opens new window)
|The credit card number itself.
|A flag indicating whether 3D Secure authentication is being performed for the transaction.