diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php index b5f0238e9a2..b9b654e6553 100644 --- a/htdocs/stripe/charge.php +++ b/htdocs/stripe/charge.php @@ -62,14 +62,16 @@ llxHeader('', $langs->trans("StripeChargeList")); if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha'))) { $service = 'StripeTest'; + $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } else { - $service = 'StripeLive'; + $service = 'StripeLive'; + $servicestatus = '1'; } -$stripeaccount = $stripe->getStripeAccount($service); +$stripeacc = $stripe->getStripeAccount($service); /*if (empty($stripeaccount)) { print $langs->trans('ErrorStripeAccountNotDefined'); @@ -87,7 +89,7 @@ if (!$rowid) print ''; $title=$langs->trans("StripeChargeList"); - $title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeaccount.')':' (Stripe connection with keys from Stripe module setup)'); + $title.=($stripeacc?' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)'); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); @@ -107,9 +109,9 @@ if (!$rowid) print "\n"; - if ($stripeaccount) + if ($stripeacc) { - $list=\Stripe\Charge::all(array("limit" => $limit), array("stripe_account" => $stripeaccount)); + $list=\Stripe\Charge::all(array("limit" => $limit), array("stripe_account" => $stripeacc)); } else { @@ -147,15 +149,28 @@ if (!$rowid) } print '