Skip to content
Snippets Groups Projects
Commit a34c1a96 authored by Peter Hartmann's avatar Peter Hartmann
Browse files

add case: plan.deleted

parent 45b8f3dd
Branches
Tags
No related merge requests found
......@@ -439,9 +439,22 @@ class CRM_Stripe_Page_Webhook extends CRM_Core_Page {
));
}
return;
break;
// Keep plans table in sync with Stripe when a plan is deleted.
case 'plan.deleted':
$plan_id = $stripe_event_data->data->object->id;
// Prepare escaped query params.
$query_params = array(
1 => array($plan_id, 'String'),
2 => array($processorId, 'Integer'),
);
CRM_Core_DAO::executeQuery("DELETE FROM civicrm_stripe_plans WHERE
plan_id = %1 AND processor_id = %2", $query_params);
break;
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment