Payment Card Details Form
Convenience multi-field form for collecting card details from a user. Card fields are separated into multiple input fields, and the control has a "card" style background.
Important:
User-entered card details are intentionally restricted for PCI compliance
Styling/Branding
This class can be styled in the following ways:
Override color resource values
Set styles programmatically
Override color resource values
This class can be styled by overriding the following color resource values:
olopay_paymentcarddetailsform_edittext_textcolor
olopay_paymentcarddetailsform_edittext_disabledtextcolor
olopay_paymentcarddetailsform_background
olopay_paymentcarddetailsform_disabledbackground
olopay_paymentcarddetailsform_errorcolor
olopay_paymentcarddetailsform_bordercolor
In addition, since this form uses an instance of [PaymentCardDetailsMultiLineView] under the hood, many of the fields can be styled by following style documentation for [PaymentCardDetailsMultiLineView].
Note that values specifically called out here will take precedence over similar values for customizing the same attributes on PaymentCardDetailsMultiLineView. For example, olopay_paymentcarddetailsmultilineview_edittext_textcolor
won't have an effect on this form because of olopay_paymentcarddetailsform_edittext_textcolor
Set styles programmatically
A number of methods exist that allow you to style PaymentCardDetailsForm. Methods exist for changing the background style (color, border, radius, etc), the text colors, error text colors, hint text colors, font, and font size.
Constructors
Creates a new instance of PaymentCardDetailsForm
Properties
Callback to be notified when the card transitions to valid and invalid states
Get an IPaymentMethodParams instance that can be used to create an IPaymentMethod instance. If the form is not valid this will return null.
Functions
Clears all text fields in the control
Dismisses the keyboard, if visible, and removes focus from input fields in this control
Moves focus to the specified input field
Sets the border color for this view
Sets the border color for this view
Sets the card corner radius for this view
Sets the border width for this view.
Sets the elevation of the card background
Sets the padding for the area immediately surrounding the card input fields.
Sets the two letter country code for this form
Sets the color for the cursor, selection handles, and text selection highlight
Enables or disables the control
Sets the error font for error messages
Sets the padding for the error message displayed below the card input fields.
Sets the error text color for all input fields and error messages
Sets the text size for error messages
Sets the color for the field dividers
Sets the width of the field dividers
Sets the hint text color for when a field has focus. Note that setHintTextColor overrides this value, so this method must be called after calling setHintTextColor.
Sets the hint text for the specified field
Sets the hint text color for all input fields
Sets the text color for all input fields
Sets the text size for all input fields