You are here

function stripe_payment_payment_delete in Stripe 7

Implements hook_ENTITY_TYPE_ACTION().

File

stripe_payment/stripe_payment.module, line 359
Stripe Payment module.

Code

function stripe_payment_payment_delete(Payment $payment) {
  if ($payment->method->controller->name == 'StripePaymentMethodController') {

    // Delete stored data (if any).
    db_delete('stripe_payment_data')
      ->condition('pid', $payment->pid)
      ->execute();
  }
}