mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug stripe module
This commit is contained in:
parent
d3adbdfbbc
commit
8e778df0ff
|
|
@ -113,10 +113,10 @@ class modStripe extends DolibarrModules
|
|||
'titre'=>'StripeAccount',
|
||||
'mainmenu'=>'bank',
|
||||
'leftmenu'=>'stripe',
|
||||
'url' => '/stripe/charge.php',
|
||||
'url' => '',
|
||||
'langs' => 'stripe',
|
||||
'position' => 100,
|
||||
'enabled' => '$conf->global->MAIN_FEATURES_LEVEL >= 2',
|
||||
'enabled' => '$conf->global->MAIN_FEATURES_LEVEL >= 1',
|
||||
'perms' => '$user->rights->banque->configurer',
|
||||
'target' => '',
|
||||
'user' => 0
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ OAUTH_STRIPE_LIVE_ID=Stripe Connect Client ID (ca_...)
|
|||
BankAccountForBankTransfer=Bank account for fund payouts
|
||||
StripeAccount=Stripe account
|
||||
StripeChargeList=List of Stripe charges
|
||||
StripeTransactionList=List of Stripe transactions
|
||||
StripeCustomerId=Stripe customer id
|
||||
StripePaymentModes=Stripe payment modes
|
||||
LocalID=Local ID
|
||||
|
|
|
|||
|
|
@ -72,14 +72,14 @@ else
|
|||
}
|
||||
|
||||
$stripeaccount = $stripe->getStripeAccount($service);
|
||||
if (empty($stripeaccount))
|
||||
/*if (empty($stripeaccount))
|
||||
{
|
||||
print $langs->trans('ErrorStripeAccountNotDefined');
|
||||
}
|
||||
}*/
|
||||
|
||||
if (!$rowid && $stripeaccount)
|
||||
if (!$rowid)
|
||||
{
|
||||
print '<FORM method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<FORM method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<INPUT type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<INPUT type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<INPUT type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
|
|
@ -88,7 +88,10 @@ if (!$rowid && $stripeaccount)
|
|||
print '<INPUT type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<INPUT type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
print_barre_liste($langs->trans("StripeChargeList"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
||||
$title=$langs->trans("StripeChargeList");
|
||||
$title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeaccount.')':' (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);
|
||||
|
||||
print '<DIV class="div-table-responsive">';
|
||||
print '<TABLE class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
|
@ -106,7 +109,14 @@ if (!$rowid && $stripeaccount)
|
|||
|
||||
print "</TR>\n";
|
||||
|
||||
$list=\Stripe\Charge::all(array("limit" => $limit), array("stripe_account" => $stripeaccount));
|
||||
if ($stripeaccount)
|
||||
{
|
||||
$list=\Stripe\Charge::all(array("limit" => $limit), array("stripe_account" => $stripeaccount));
|
||||
}
|
||||
else
|
||||
{
|
||||
$list=\Stripe\Charge::all(array("limit" => $limit));
|
||||
}
|
||||
|
||||
//print $list;
|
||||
foreach ($list->data as $charge)
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ if (empty($stripeaccount))
|
|||
print $langs->trans('ErrorStripeAccountNotDefined');
|
||||
}
|
||||
|
||||
if (! $rowid && $stripeaccount) {
|
||||
if (! $rowid) {
|
||||
|
||||
print '<FORM method="GET" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
print '<FORM method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
if ($optioncss != '')
|
||||
print '<INPUT type="hidden" name="optioncss" value="' . $optioncss . '">';
|
||||
print '<INPUT type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
|
|
@ -83,7 +83,10 @@ if (! $rowid && $stripeaccount) {
|
|||
print '<INPUT type="hidden" name="sortorder" value="' . $sortorder . '">';
|
||||
print '<INPUT type="hidden" name="page" value="' . $page . '">';
|
||||
|
||||
print_barre_liste($langs->trans("StripeTransactionList"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
|
||||
$title=$langs->trans("StripeTransactionList");
|
||||
$title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeaccount.')':' (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);
|
||||
|
||||
print '<DIV class="div-table-responsive">';
|
||||
print '<TABLE class="tagtable liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n";
|
||||
|
|
@ -101,9 +104,14 @@ if (! $rowid && $stripeaccount) {
|
|||
|
||||
print "</TR>\n";
|
||||
|
||||
$stripeaccount = $stripe->getStripeAccount($service);
|
||||
|
||||
$txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeaccount));
|
||||
if ($stripeaccount)
|
||||
{
|
||||
$txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeaccount));
|
||||
}
|
||||
else
|
||||
{
|
||||
$txn = \Stripe\BalanceTransaction::all(array("limit" => $limit));
|
||||
}
|
||||
|
||||
foreach ($txn->data as $txn) {
|
||||
print '<TR class="oddeven">';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user