PaymentMethodAlreadyDestroyedError

Exception thrown when a Payment Method instance is already destroyed.

Properties

JS
JavaScript

try {

    await card.destroy();

    await card.attach('#card');

}

catch (e) {

   if (e instanceof PaymentMethodAlreadyDestroyedError){

      alert("The Card payment method has been destroyed");

   }

}