Skip to content
Snippets Groups Projects
Commit 3126cc31 authored by Joshua Walker's avatar Joshua Walker Committed by GitHub
Browse files

Merge pull request #178 from h-c-c/4.7-dev

add case: plan.deleted
parents ab4a3836 a34c1a96
No related branches found
No related tags found
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.
Finish editing this message first!
Please register or to comment