commit
4ab6155b07
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?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>
|
* 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
|
||||||
@ -65,11 +65,13 @@ llxHeader('', $langs->trans("StripeTransactionList"));
|
|||||||
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')))
|
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')))
|
||||||
{
|
{
|
||||||
$service = 'StripeTest';
|
$service = 'StripeTest';
|
||||||
|
$servicestatus = '0';
|
||||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$service = 'StripeLive';
|
$service = 'StripeLive';
|
||||||
|
$servicestatus = '1';
|
||||||
}
|
}
|
||||||
|
|
||||||
$stripeaccount = $stripe->getStripeAccount($service);
|
$stripeaccount = $stripe->getStripeAccount($service);
|
||||||
@ -162,7 +164,26 @@ if (! $rowid) {
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// 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
|
// Stripe customer
|
||||||
//print "<td>".$charge->customer."</td>\n";
|
//print "<td>".$charge->customer."</td>\n";
|
||||||
// Link
|
// Link
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user