Fix compatibility

This commit is contained in:
Laurent Destailleur 2020-10-01 16:57:49 +02:00
parent a2efdee865
commit f5f2ea57e3

View File

@ -83,13 +83,15 @@ class Stripe extends CommonObject
*
* @param string $mode 'StripeTest' or 'StripeLive'
* @param int $fk_soc Id of thirdparty
* @param int $entity Id of entity
* @param int $entity Id of entity (-1 = current environment)
* @return string Stripe account 'acc_....' or '' if no OAuth token found
*/
public function getStripeAccount($mode = 'StripeTest', $fk_soc = 0, $entity = 1)
public function getStripeAccount($mode = 'StripeTest', $fk_soc = 0, $entity = -1)
{
global $conf;
if ($entity < 0) $entity = $conf->entity;
$sql = "SELECT tokenstring";
$sql .= " FROM ".MAIN_DB_PREFIX."oauth_token";
$sql .= " WHERE service = '".$this->db->escape($mode)."'";