Fix compatibility
This commit is contained in:
parent
a2efdee865
commit
f5f2ea57e3
@ -83,13 +83,15 @@ class Stripe extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param string $mode 'StripeTest' or 'StripeLive'
|
* @param string $mode 'StripeTest' or 'StripeLive'
|
||||||
* @param int $fk_soc Id of thirdparty
|
* @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
|
* @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;
|
global $conf;
|
||||||
|
|
||||||
|
if ($entity < 0) $entity = $conf->entity;
|
||||||
|
|
||||||
$sql = "SELECT tokenstring";
|
$sql = "SELECT tokenstring";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."oauth_token";
|
$sql .= " FROM ".MAIN_DB_PREFIX."oauth_token";
|
||||||
$sql .= " WHERE service = '".$this->db->escape($mode)."'";
|
$sql .= " WHERE service = '".$this->db->escape($mode)."'";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user