Skip to content

Commit

Permalink
Merge pull request #9238 from ptibogxiv/patch-35
Browse files Browse the repository at this point in the history
Fix dolibarr_set_const
  • Loading branch information
eldy authored Aug 13, 2018
2 parents a866f94 + d0666a9 commit 577d2d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions htdocs/public/stripe/ipn.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2018
/* Copyright (C) 2018 Thibault FOUCART <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -26,6 +26,7 @@
if (! $res) die("Include of main fails");

if (empty($conf->stripe->enabled)) accessforbidden('',0,0,1);
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT.'/includes/stripe/init.php';
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
Expand Down Expand Up @@ -123,7 +124,7 @@
if ($event->type == 'payout.created') {
$error=0;

$result=dolibarr_set_const($db, $service."_NEXTPAYOUT", date('Y-m-d H:i:s',$event->data->object->arrival_date), 'chaine', 0, '', $conf->entity);
$result=dolibarr_set_const($db, $servicestatus."_NEXTPAYOUT", date('Y-m-d H:i:s',$event->data->object->arrival_date), 'chaine', 0, '', $conf->entity);

if ($result > 0)
{
Expand All @@ -143,7 +144,7 @@
elseif ($event->type == 'payout.paid') {
global $conf;
$error=0;
$result=dolibarr_set_const($db, $service."_NEXTPAYOUT",null,'chaine',0,'',$conf->entity);
$result=dolibarr_set_const($db, $servicestatus."_NEXTPAYOUT",null,'chaine',0,'',$conf->entity);
if ($result)
{
$langs->load("errors");
Expand Down

0 comments on commit 577d2d7

Please sign in to comment.