Merge pull request #33340 from atm-jonathan/FIX_ERROR_PARAMS_DB_TOO_LONG

Error "StripeCusNotFound" page payment
This commit is contained in:
Laurent Destailleur 2025-03-05 12:16:14 +01:00 committed by GitHub
commit 04d482e8fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -263,14 +263,14 @@ class Stripe extends CommonObject
$isineec = isInEEC($object);
if ($object->country_code && $isineec) {
//$taxids = $customer->allTaxIds($customer);
$customer->createTaxId($customer, array('type' => 'eu_vat', 'value' => $vatcleaned));
$customer->createTaxId($customer->id, array('type' => 'eu_vat', 'value' => $vatcleaned));
}
}
}
// Create customer in Dolibarr
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_account (fk_soc, login, key_account, site, site_account, status, entity, date_creation, fk_user_creat)";
$sql .= " VALUES (".((int) $object->id).", '', '".$this->db->escape($customer)."', 'stripe', '".$this->db->escape($stripearrayofkeysbyenv[$status]['publishable_key'])."', ".((int) $status).", ".((int) $conf->entity).", '".$this->db->idate(dol_now())."', ".((int) $user->id).")";
$sql .= " VALUES (".((int) $object->id).", '', '".$this->db->escape($customer->id)."', 'stripe', '".$this->db->escape($stripearrayofkeysbyenv[$status]['publishable_key'])."', ".((int) $status).", ".((int) $conf->entity).", '".$this->db->idate(dol_now())."', ".((int) $user->id).")";
$resql = $this->db->query($sql);
if (!$resql) {
$this->error = $this->db->lasterror();