Update paymentmodes.php
This commit is contained in:
parent
55d70004b1
commit
0afc55ab51
@ -610,7 +610,7 @@ if (empty($reshook))
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
if (empty($newsup)) {
|
if (empty($newsup)) {
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."oauth_token WHERE fk_soc = ".$object->id." AND service = ".$servicestatus." AND entity = ".$conf->entity;
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."oauth_token WHERE fk_soc = ".$object->id." AND service = '".$service."' AND entity = ".$conf->entity;
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
$stripesup = \Stripe\Account::retrieve($db->escape(GETPOST('key_account_supplier', 'alpha')));
|
$stripesup = \Stripe\Account::retrieve($db->escape(GETPOST('key_account_supplier', 'alpha')));
|
||||||
@ -618,7 +618,7 @@ if (empty($reshook))
|
|||||||
$tokenstring['type'] = $stripesup->type;
|
$tokenstring['type'] = $stripesup->type;
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token";
|
||||||
$sql.= " SET tokenstring = '".dol_json_encode($tokenstring)."'";
|
$sql.= " SET tokenstring = '".dol_json_encode($tokenstring)."'";
|
||||||
$sql.= " WHERE fk_soc = ".$object->id." AND service = ".$servicestatus." AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified !
|
$sql.= " WHERE fk_soc = ".$object->id." AND service = '".$service."' AND entity = ".$conf->entity; // Keep = here for entity. Only 1 record must be modified !
|
||||||
}
|
}
|
||||||
catch(Exception $e)
|
catch(Exception $e)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user