From 5021252622ca321979c6ef39d0b70e75b49b55df Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 22 Feb 2019 14:23:28 +0100 Subject: [PATCH] Fix stripe payment list of transaction --- htdocs/stripe/transaction.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 467d242a0c8..9620e3399c9 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018-2019 Thibault FOUCART * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -60,19 +60,20 @@ $stripe = new Stripe($db); llxHeader('', $langs->trans("StripeTransactionList")); -if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) +if (! empty($conf->stripe->enabled)) { $service = 'StripeTest'; - $servicestatus = '0'; - dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); -} -else -{ - $service = 'StripeLive'; - $servicestatus = '1'; + $servicestatus = 0; + if (! empty($conf->global->STRIPE_LIVE) && ! GETPOST('forcesandbox', 'alpha')) + { + $service = 'StripeLive'; + $servicestatus = 1; + } + + $stripe=new Stripe($db); + $stripeacc = $stripe->getStripeAccount($service); // Stripe OAuth connect account of dolibarr user (no network access here) } -$stripeacc = $stripe->getStripeAccount($service); /*if (empty($stripeaccount)) { print $langs->trans('ErrorStripeAccountNotDefined');