ident
This commit is contained in:
parent
eaa49e773d
commit
f146572b81
@ -134,7 +134,7 @@ class InterfaceStripe
|
|||||||
$servicestatus = 1;
|
$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') {
|
if ($action == 'COMPANY_MODIFY') {
|
||||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||||
|
|
||||||
@ -170,17 +170,17 @@ class InterfaceStripe
|
|||||||
$stripeacc = $stripe->getStripeAccount($service); // No need of network access for this
|
$stripeacc = $stripe->getStripeAccount($service); // No need of network access for this
|
||||||
|
|
||||||
$customer = $stripe->customerStripe($object, $stripeacc, $servicestatus);
|
$customer = $stripe->customerStripe($object, $stripeacc, $servicestatus);
|
||||||
if ($customer) {
|
if ($customer)
|
||||||
|
{
|
||||||
$customer->delete();
|
$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;
|
$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') {
|
if ($action == 'COMPANYPAYMENTMODE_MODIFY' && $object->type == 'card') {
|
||||||
|
|
||||||
// For creation of credit card, we do not create in Stripe automatically
|
// For creation of credit card, we do not create in Stripe automatically
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user