CVVElement
CVV payment element, used to collect the CVV (Card Verification Value) security code entered by the buyer. CVV is the 3-digit or 4-digit number on the back of a credit card/debit card, used to verify the cardholder's identity.
Note: CVVElement is only responsible for rendering and collecting the CVV input box. To actually initiate payment, you need to call antom.confirmPayment() and pass the CVVElement instance as the elements parameter; if elements is not passed, the SDK will initiate payment in UI-less mode and will not collect CVV.
Method signature
When calling this method, please use the following standard method signature format.
JavaScript
antom.createElement("CVV", options);TypeScript
antom.createElement(elementType: 'CVV', options?: CVVAppConfig): CVVElementParameters
Parameter | Data type | Required | Description |
|---|---|---|---|
elementType | String | Yes | Element type. In this scenario, pass in CVV to collect CVV. |
| Object | Yes | A configuration object used to set the appearance theme and multilingual environment of components. |
options
Parameter | Data type | Required | Description |
|---|---|---|---|
locale | String | No | Multilingual configuration. Note: If the locale parameter is set in the loadAntom() method, the locale value in the antom.createElement() method takes precedence. Valid values are:
|
appearance | Object | No | Used for custom appearance configuration. For more information, refer to Appearance customization. It contains the following parameters:
|
Return value
This method returns a CVVElement instance object, providing methods for mounting, unmounting, destroying, and registering event listeners:
Method name | Description |
|---|---|
| element.on() | Register event listeners for the Element instance. |
| element.mount() | Used to mount the Element to the DOM. |
| element.destroy() | Destroy the current Element (cannot be mounted again). |
| element.unmount() | Unmount the current Element (can be mounted again). |