Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
e6a5c99b71
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 PtibogXIV <support@ptibogxiv.net>
|
||||
/* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -65,11 +65,13 @@ llxHeader('', $langs->trans("StripeTransactionList"));
|
||||
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';
|
||||
$servicestatus = '1';
|
||||
}
|
||||
|
||||
$stripeaccount = $stripe->getStripeAccount($service);
|
||||
@ -162,7 +164,26 @@ if (! $rowid) {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
print "<td><a href='" . DOL_URL_ROOT . "/stripe/transaction.php?rowid=" . $txn->source . "'>" . $txn->source . "</A></td>\n";
|
||||
if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/';
|
||||
|
||||
if (preg_match('/po_/i', $txn->source)){
|
||||
$origin="payouts";
|
||||
} elseif (preg_match('/fee_/i', $txn->source)) {
|
||||
$origin="connect/application_fees";
|
||||
} else {
|
||||
$origin="payments";
|
||||
}
|
||||
|
||||
$url='https://dashboard.stripe.com/'.$connect.'test/'.$origin.'/'.$txn->source;
|
||||
|
||||
if ($servicestatus)
|
||||
{
|
||||
$url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source;
|
||||
}
|
||||
|
||||
if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') {
|
||||
print "<td>".$txn->type."</td>";
|
||||
} else print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "</a></td>\n";
|
||||
// Stripe customer
|
||||
//print "<td>".$charge->customer."</td>\n";
|
||||
// Link
|
||||
|
||||
Loading…
Reference in New Issue
Block a user