diff --git a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php index 37906501d401f..0e8147ce45895 100644 --- a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php +++ b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php @@ -134,7 +134,7 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf $servicestatus = 1; } - // If customer is linked to Strip, we update/delete Stripe too + // If customer is linked to Stripe, we update/delete Stripe too if ($action == 'COMPANY_MODIFY') { dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id); @@ -170,17 +170,17 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf $stripeacc = $stripe->getStripeAccount($service); // No need of network access for this $customer = $stripe->customerStripe($object, $stripeacc, $servicestatus); - if ($customer) { + if ($customer) + { $customer->delete(); } - - $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account"; + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account"; $sql.= " WHERE site='stripe' AND fk_soc = " . $object->id; - $this->db->query($sql); - + $this->db->query($sql); } - // If payment mode is linked to Strip, we update/delete Stripe too + // If payment mode is linked to Stripee, we update/delete Stripe too if ($action == 'COMPANYPAYMENTMODE_MODIFY' && $object->type == 'card') { // For creation of credit card, we do not create in Stripe automatically