Skip to content
Snippets Groups Projects
Commit dc70c265 authored by drastik's avatar drastik
Browse files

Remove old customer entry when handling mis-match

parent bcb93e1f
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
//Store the relationship between CiviCRM's email address for the Contact & Stripe's Customer ID
if(isset($stripe_customer)) {
$stripe_customer_id = $stripe_customer->id;
$new_customer_insert = "DELETE FROM civicrm_stripe_customers WHERE email = '$email'";
$new_customer_insert = "INSERT INTO civicrm_stripe_customers (email, id) VALUES ('$email', '$stripe_customer_id')";
CRM_Core_DAO::executeQuery($new_customer_insert);
} else {
......
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