function stripe_payment_payment_method_delete in Stripe 7
Implements hook_ENTITY_TYPE_ACTION().
File
- stripe_payment/
stripe_payment.module, line 280 - Stripe Payment module.
Code
function stripe_payment_payment_method_delete(PaymentMethod $payment_method) {
if ($payment_method->controller->name === 'StripePaymentMethodController') {
// Delete stored keys (if any).
db_delete('stripe_payment_keys')
->condition('pmid', $payment_method->pmid)
->execute();
}
}