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