Use this method to destroy the Card Field component and clean up any associated resources. After calling this method, the Card Field component will no longer be usable.
Returns void
Example
constnumberField = cardFieldsInstance.createCardFieldsComponent({ type:"number", placeholder:"Enter a number", }); document .querySelector("#paypal-card-fields-number-container") .appendChild(numberField); // Later, when you want to clean up: numberField.destroy();
Use this method to destroy the Card Field component and clean up any associated resources. After calling this method, the Card Field component will no longer be usable.