From 7f4378870c08bf661b685863265888588a286251 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 16 Sep 2018 22:39:38 +0200 Subject: [PATCH 1/7] Fix link display --- htdocs/stripe/transaction.php | 65 ++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index cbc6013644d..9d4a5ea90fa 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 Thibault FOUCART * Copyright (C) 2018 Frédéric France * * 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'; + $service = 'StripeLive'; + $servicestatus = '1'; } $stripeaccount = $stripe->getStripeAccount($service); @@ -80,26 +82,25 @@ $stripeaccount = $stripe->getStripeAccount($service); if (! $rowid) { - print '
'; - if ($optioncss != '') { - print ''; - } - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + if ($optioncss != '') + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; $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 '
'; - print '' . "\n"; + print '
'; + print '
' . "\n"; - print ''; + print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); //print_liste_field_titre("StripeCustomerId",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder); //print_liste_field_titre("CustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); @@ -109,9 +110,9 @@ if (! $rowid) { print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Fee", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", 'align="right"'); - print "\n"; + print "\n"; - print "\n"; + print "\n"; if ($stripeaccount) { @@ -122,14 +123,14 @@ if (! $rowid) { $txn = \Stripe\BalanceTransaction::all(array("limit" => $limit)); } - foreach ($txn->data as $txn) + foreach ($txn->data as $txn) { //$charge = $txn; //var_dump($txn); - + // The metadata FULLTAG is defined by the online payment page /*$FULLTAG=$charge->metadata->FULLTAG; - + // Save into $tmparray all metadata $tmparray = dolExplodeIntoArray($FULLTAG,'.','='); // Load origin object according to metadata @@ -149,7 +150,7 @@ if (! $rowid) { { $memberstatic->id = 0; }*/ - + $societestatic->fetch($charge->metadata->idcustomer); $societestatic->id = $charge->metadata->idcustomer; $societestatic->lastname = $obj->lastname; @@ -159,10 +160,26 @@ if (! $rowid) { $societestatic->email = $obj->email; $societestatic->societe_id = $obj->fk_soc; - print ''; - + print ''; + // Ref - print "\n"; + if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; + + // Ref + 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; + } + print "\n"; // Stripe customer //print "\n"; // Link From 35f2f5f48c5685b24f31d724e34a786674008556 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 16 Sep 2018 22:41:17 +0200 Subject: [PATCH 2/7] Update transaction.php --- htdocs/stripe/transaction.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 9d4a5ea90fa..6ff4eab44a0 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -65,13 +65,13 @@ llxHeader('', $langs->trans("StripeTransactionList")); if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha'))) { $service = 'StripeTest'; - $servicestatus = '0'; + $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } else { - $service = 'StripeLive'; - $servicestatus = '1'; + $service = 'StripeLive'; + $servicestatus = '1'; } $stripeaccount = $stripe->getStripeAccount($service); @@ -127,7 +127,7 @@ if (! $rowid) { { //$charge = $txn; //var_dump($txn); - + // The metadata FULLTAG is defined by the online payment page /*$FULLTAG=$charge->metadata->FULLTAG; @@ -150,7 +150,7 @@ if (! $rowid) { { $memberstatic->id = 0; }*/ - + $societestatic->fetch($charge->metadata->idcustomer); $societestatic->id = $charge->metadata->idcustomer; $societestatic->lastname = $obj->lastname; From 3c5a9326e17595d874e9a87c958e2e20747076d2 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 16 Sep 2018 23:13:24 +0200 Subject: [PATCH 3/7] Update transaction.php --- htdocs/stripe/transaction.php | 67 +++++++++++++++++------------------ 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 6ff4eab44a0..b20f66090e4 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -26,9 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (! empty($conf->accounting->enabled)) { - require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; -} +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; // Load translation files required by the page $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); @@ -65,13 +63,13 @@ llxHeader('', $langs->trans("StripeTransactionList")); if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha'))) { $service = 'StripeTest'; - $servicestatus = '0'; + $servicestatus = '0'; dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); } else { - $service = 'StripeLive'; - $servicestatus = '1'; + $service = 'StripeLive'; + $servicestatus = '1'; } $stripeaccount = $stripe->getStripeAccount($service); @@ -82,25 +80,25 @@ $stripeaccount = $stripe->getStripeAccount($service); if (! $rowid) { - print ''; + print ''; if ($optioncss != '') - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; $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 '
'; - print '
" . $txn->source . "".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "".$charge->customer."
' . "\n"; + print '
'; + print '
' . "\n"; - print ''; + print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); //print_liste_field_titre("StripeCustomerId",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder); //print_liste_field_titre("CustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); @@ -110,9 +108,9 @@ if (! $rowid) { print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Fee", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", 'align="right"'); - print "\n"; + print "\n"; - print "\n"; + print "\n"; if ($stripeaccount) { @@ -123,11 +121,11 @@ if (! $rowid) { $txn = \Stripe\BalanceTransaction::all(array("limit" => $limit)); } - foreach ($txn->data as $txn) + foreach ($txn->data as $txn) { //$charge = $txn; //var_dump($txn); - + // The metadata FULLTAG is defined by the online payment page /*$FULLTAG=$charge->metadata->FULLTAG; @@ -150,7 +148,7 @@ if (! $rowid) { { $memberstatic->id = 0; }*/ - + $societestatic->fetch($charge->metadata->idcustomer); $societestatic->id = $charge->metadata->idcustomer; $societestatic->lastname = $obj->lastname; @@ -160,7 +158,7 @@ if (! $rowid) { $societestatic->email = $obj->email; $societestatic->societe_id = $obj->fk_soc; - print ''; + print ''; // Ref if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; @@ -179,7 +177,10 @@ if (! $rowid) { { $url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source; } - print "\n"; + if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') { + print ""; + } else print "\n"; + // Stripe customer //print "\n"; // Link @@ -194,16 +195,15 @@ if (! $rowid) { } print "\n";*/ // Origine - //print "\n"; // Date payment @@ -215,13 +215,12 @@ if (! $rowid) { print ""; // Status print "'; print "\n"; } From 0770d8e56ed3d5cbf6a610210876f9053cd69a72 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 16 Sep 2018 23:14:22 +0200 Subject: [PATCH 4/7] Update transaction.php --- htdocs/stripe/transaction.php | 57 ++--------------------------------- 1 file changed, 3 insertions(+), 54 deletions(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index b20f66090e4..219846d151d 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -123,32 +123,6 @@ if (! $rowid) { foreach ($txn->data as $txn) { - //$charge = $txn; - //var_dump($txn); - - // The metadata FULLTAG is defined by the online payment page - /*$FULLTAG=$charge->metadata->FULLTAG; - - // Save into $tmparray all metadata - $tmparray = dolExplodeIntoArray($FULLTAG,'.','='); - // Load origin object according to metadata - if (! empty($tmparray['CUS'])) - { - $societestatic->fetch($tmparray['CUS']); - } - else - { - $societestatic->id = 0; - } - if (! empty($tmparray['MEM'])) - { - $memberstatic->fetch($tmparray['MEM']); - } - else - { - $memberstatic->id = 0; - }*/ - $societestatic->fetch($charge->metadata->idcustomer); $societestatic->id = $charge->metadata->idcustomer; $societestatic->lastname = $obj->lastname; @@ -159,7 +133,7 @@ if (! $rowid) { $societestatic->societe_id = $obj->fk_soc; print ''; - + // Ref if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; @@ -171,41 +145,16 @@ if (! $rowid) { } else { $origin="payments"; } - + $url='https://dashboard.stripe.com/'.$connect.'test/'.$origin.'/'.$txn->source; if ($servicestatus) { - $url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source; + $url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source; } if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') { print ""; } else print "\n"; - // Stripe customer - //print "\n"; - // Link - /*print "\n";*/ - // Origine - //print "\n"; // Date payment print '\n"; // Type From 7e0bad97ebbcc5a74c2b71e7b9dfceee97b8adea Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Wed, 19 Sep 2018 18:59:32 +0200 Subject: [PATCH 5/7] Update transaction.php --- htdocs/stripe/transaction.php | 112 +++++++++++++++++++++++++--------- 1 file changed, 84 insertions(+), 28 deletions(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 219846d151d..964d0463f55 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -26,7 +26,9 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; +if (! empty($conf->accounting->enabled)) { + require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; +} // Load translation files required by the page $langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); @@ -68,7 +70,7 @@ if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GET } else { - $service = 'StripeLive'; + $service = 'StripeLive'; $servicestatus = '1'; } @@ -81,8 +83,9 @@ $stripeaccount = $stripe->getStripeAccount($service); if (! $rowid) { print ''; - if ($optioncss != '') - print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -123,6 +126,32 @@ if (! $rowid) { foreach ($txn->data as $txn) { + //$charge = $txn; + //var_dump($txn); + + // The metadata FULLTAG is defined by the online payment page + /*$FULLTAG=$charge->metadata->FULLTAG; + + // Save into $tmparray all metadata + $tmparray = dolExplodeIntoArray($FULLTAG,'.','='); + // Load origin object according to metadata + if (! empty($tmparray['CUS'])) + { + $societestatic->fetch($tmparray['CUS']); + } + else + { + $societestatic->id = 0; + } + if (! empty($tmparray['MEM'])) + { + $memberstatic->fetch($tmparray['MEM']); + } + else + { + $memberstatic->id = 0; + }*/ + $societestatic->fetch($charge->metadata->idcustomer); $societestatic->id = $charge->metadata->idcustomer; $societestatic->lastname = $obj->lastname; @@ -135,26 +164,52 @@ if (! $rowid) { print ''; // Ref - if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; - - // Ref - if (preg_match('/po_/i', $txn->source)){ - $origin="payouts"; - } elseif (preg_match('/fee_/i', $txn->source)) { - $origin="connect/application_fees"; - } else { - $origin="payments"; - } + if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; - $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 ""; - } else print "\n"; + 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 ""; + } else print "\n"; + // Stripe customer + //print "\n"; + // Link + /*print "\n";*/ + // Origine + + //print "\n"; // Date payment print '\n"; // Type @@ -164,12 +219,13 @@ if (! $rowid) { print ""; // Status print "'; print "\n"; } From 203a2291bae40ffec9a1016bb395b1b355a32f39 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Wed, 19 Sep 2018 19:05:46 +0200 Subject: [PATCH 6/7] Update transaction.php --- htdocs/stripe/transaction.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 964d0463f55..996a80cb132 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -164,25 +164,25 @@ if (! $rowid) { print ''; // Ref - if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; + if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; - if (preg_match('/po_/i', $txn->source)){ + if (preg_match('/po_/i', $txn->source)){ $origin="payouts"; - } elseif (preg_match('/fee_/i', $txn->source)) { - $origin="connect/application_fees"; - } else { - $origin="payments"; - } + } elseif (preg_match('/fee_/i', $txn->source)) { + $origin="connect/application_fees"; + } else { + $origin="payments"; + } - $url='https://dashboard.stripe.com/'.$connect.'test/'.$origin.'/'.$txn->source; + $url='https://dashboard.stripe.com/'.$connect.'test/'.$origin.'/'.$txn->source; - if ($servicestatus) + if ($servicestatus) { - $url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source; + $url='https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source; } - if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') { - print ""; + if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') { + print ""; } else print "\n"; // Stripe customer //print "\n"; From 1a841b48ae96f48a4fd2fcf154f510def908e2f5 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Wed, 19 Sep 2018 20:15:12 +0200 Subject: [PATCH 7/7] Update transaction.php --- htdocs/stripe/transaction.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php index 996a80cb132..9d9a1c84597 100644 --- a/htdocs/stripe/transaction.php +++ b/htdocs/stripe/transaction.php @@ -167,9 +167,9 @@ if (! $rowid) { if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/'; if (preg_match('/po_/i', $txn->source)){ - $origin="payouts"; + $origin="payouts"; } elseif (preg_match('/fee_/i', $txn->source)) { - $origin="connect/application_fees"; + $origin="connect/application_fees"; } else { $origin="payments"; } @@ -177,13 +177,13 @@ if (! $rowid) { $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 ""; - } else print "\n"; + } else print "\n"; // Stripe customer //print "\n"; // Link
".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "".$txn->type."".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "".$charge->customer.""; ////if ($charge->metadata->dol_type=="order"){ // $object = new Commande($db); // $object->fetch($charge->metadata->dol_id); - // print "".img_picto('', 'object_order')." ".$object->ref.""; + // print "".img_picto('', 'object_order')." ".$object->ref.""; //} elseif ($charge->metadata->dol_type=="invoice"){ // $object = new Facture($db); // $object->fetch($charge->metadata->dol_id); - // print "".img_picto('', 'object_invoice')." ".$object->ref.""; + // print "".img_picto('', 'object_invoice')." ".$object->ref.""; //} //print "" . price(($txn->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency)) . ""; - if ($txn->status=='available') { - print img_picto($langs->trans("".$txn->status.""),'statut4'); - } elseif ($txn->status=='pending') { - print img_picto($langs->trans("".$txn->status.""),'statut7'); - } elseif ($txn->status=='failed') { - print img_picto($langs->trans("".$txn->status.""),'statut8'); - } +if ($txn->status=='available') + {print img_picto($langs->trans("".$txn->status.""),'statut4');} +elseif ($txn->status=='pending') + {print img_picto($langs->trans("".$txn->status.""),'statut7');} +elseif ($txn->status=='failed') + {print img_picto($langs->trans("".$txn->status.""),'statut8');} print '
".$txn->type."".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "".$charge->customer.""; - if ($societestatic->id > 0) - { - print $societestatic->getNomUrl(1); - } - if ($memberstatic->id > 0) - { - print $memberstatic->getNomUrl(1); - } - print ""; - ////if ($charge->metadata->dol_type=="order"){ - // $object = new Commande($db); - // $object->fetch($charge->metadata->dol_id); - // print "".img_picto('', 'object_order')." ".$object->ref.""; - //} elseif ($charge->metadata->dol_type=="invoice"){ - // $object = new Facture($db); - // $object->fetch($charge->metadata->dol_id); - // print "".img_picto('', 'object_invoice')." ".$object->ref.""; - //} - //print "' . dol_print_date($txn->created, '%d/%m/%Y %H:%M') . "
".$txn->type."".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "".$txn->type."".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "".$charge->customer.""; + if ($societestatic->id > 0) + { + print $societestatic->getNomUrl(1); + } + if ($memberstatic->id > 0) + { + print $memberstatic->getNomUrl(1); + } + print ""; + ////if ($charge->metadata->dol_type=="order"){ + // $object = new Commande($db); + // $object->fetch($charge->metadata->dol_id); + // print "".img_picto('', 'object_order')." ".$object->ref.""; + //} elseif ($charge->metadata->dol_type=="invoice"){ + // $object = new Facture($db); + // $object->fetch($charge->metadata->dol_id); + // print "".img_picto('', 'object_invoice')." ".$object->ref.""; + //} + //print "' . dol_print_date($txn->created, '%d/%m/%Y %H:%M') . "" . price(($txn->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency)) . ""; -if ($txn->status=='available') - {print img_picto($langs->trans("".$txn->status.""),'statut4');} -elseif ($txn->status=='pending') - {print img_picto($langs->trans("".$txn->status.""),'statut7');} -elseif ($txn->status=='failed') - {print img_picto($langs->trans("".$txn->status.""),'statut8');} + if ($txn->status=='available') { + print img_picto($langs->trans("".$txn->status.""),'statut4'); + } elseif ($txn->status=='pending') { + print img_picto($langs->trans("".$txn->status.""),'statut7'); + } elseif ($txn->status=='failed') { + print img_picto($langs->trans("".$txn->status.""),'statut8'); + } print '
".$txn->type."".$txn->type."".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "".$charge->customer."".$txn->type."".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $txn->source . "".$charge->customer."