Fix stripe payment list of transaction

This commit is contained in:
ptibogxiv 2019-02-22 14:23:28 +01:00 committed by GitHub
parent ec5461a4d1
commit 5021252622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net> /* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -60,19 +60,20 @@ $stripe = new Stripe($db);
llxHeader('', $langs->trans("StripeTransactionList")); llxHeader('', $langs->trans("StripeTransactionList"));
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))) if (! empty($conf->stripe->enabled))
{ {
$service = 'StripeTest'; $service = 'StripeTest';
$servicestatus = '0'; $servicestatus = 0;
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); if (! empty($conf->global->STRIPE_LIVE) && ! GETPOST('forcesandbox', 'alpha'))
} {
else $service = 'StripeLive';
{ $servicestatus = 1;
$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)) /*if (empty($stripeaccount))
{ {
print $langs->trans('ErrorStripeAccountNotDefined'); print $langs->trans('ErrorStripeAccountNotDefined');