diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php
index de26f5942f9..0f5d4c3b82c 100755
--- a/htdocs/paypal/lib/paypalfunctions.lib.php
+++ b/htdocs/paypal/lib/paypalfunctions.lib.php
@@ -50,6 +50,16 @@ else
$API_Url = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=";
}
+// Clean parameters
+$PAYPAL_API_USER="";
+if ($conf->global->PAYPAL_API_USER) $PAYPAL_API_USER=$conf->global->PAYPAL_API_USER;
+$PAYPAL_API_PASSWORD="";
+if ($conf->global->PAYPAL_API_PASSWORD) $PAYPAL_API_PASSWORD=$conf->global->PAYPAL_API_PASSWORD;
+$PAYPAL_API_SIGNATURE="";
+if ($conf->global->PAYPAL_API_SIGNATURE) $PAYPAL_API_SIGNATURE=$conf->global->PAYPAL_API_SIGNATURE;
+$PAYPAL_API_SANDBOX="";
+if ($conf->global->PAYPAL_API_SANDBOX) $PAYPAL_API_SANDBOX=$conf->global->PAYPAL_API_SANDBOX;
+
// Proxy
$PROXY_HOST = $conf->global->MAIN_PROXY_HOST;
$PROXY_PORT = $conf->global->MAIN_PROXY_PORT;
diff --git a/htdocs/paypal/transaction.php b/htdocs/paypal/transaction.php
new file mode 100644
index 00000000000..050159acaad
--- /dev/null
+++ b/htdocs/paypal/transaction.php
@@ -0,0 +1,213 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * \file htdocs/paypal/transaction.php
+ * \ingroup paypal
+ * \brief Page to list transactions in paypal account
+ * \version $Id$
+ */
+
+require("../main.inc.php");
+require_once(DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php');
+require_once(DOL_DOCUMENT_ROOT."/paypal/lib/paypalfunctions.lib.php");
+
+$langs->load("paypal");
+
+$action = GETPOST('action');
+
+// Security check
+//$result=restrictedArea($user,'paypal');
+
+
+/*
+ * Actions
+ */
+
+
+
+/*
+ * View
+ */
+
+$nvpStr='';
+
+$startDateStr=GETPOST('startDateStr');
+$endDateStr=GETPOST('endDateStr');
+$transactionID=urlencode(GETPOST('transactionID'));
+
+if(isset($endDateStr) && ! empty($startDateStr)) {
+ $start_time = dol_stringtotime($startDateStr);
+ $iso_start = dol_print_date($start_time,'dayhourrfc');
+ $nvpStr="&STARTDATE=$iso_start";
+}
+
+if(isset($endDateStr) && ! empty($endDateStr)) {
+ $end_time = dol_stringtotime($endDateStr);
+ $iso_end = dol_print_date($end_time,'dayhourrfc');
+ $nvpStr.="&ENDDATE=$iso_end";
+}
+
+if(isset($transactionID) && ! empty($transactionID)) {
+ $nvpStr=$nvpStr."&TRANSACTIONID=$transactionID";
+}
+
+if (isset($startDateStr) && ! empty($startDateStr)) {
+ $start_date_str = $startDateStr;
+} else {
+ $yesterdayDate = dol_now()-86400;
+ $start_date_str = dol_print_date($yesterdayDate,'day');
+}
+if (isset($endDateStr) && ! empty($startDateStr)) {
+ $end_date_str = $endDateStr;
+} else {
+ $currentDate = dol_now();
+ $end_date_str = dol_print_date($currentDate,'day');
+}
+
+llxHeader();
+
+?>
+
+
+
+';
+print '';
+
+print '