diff --git a/htdocs/public/paybox/paymentok.php b/htdocs/public/paybox/paymentok.php
index 3d35bab2a28..34fbf265642 100644
--- a/htdocs/public/paybox/paymentok.php
+++ b/htdocs/public/paybox/paymentok.php
@@ -26,7 +26,7 @@
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
-// For MultiCompany module.
+// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
// TODO This should be useless. Because entity must be retreive from object ref and not from url.
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
@@ -111,15 +111,27 @@ if (! empty($conf->global->PAYBOX_PAYONLINE_SENDEMAIL))
$urlback=$_SERVER["REQUEST_URI"];
$topic='['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("NewPayboxPaymentReceived");
+ $tmptag=dolExplodeIntoArray($fulltag,'.','=');
$content="";
- $content.=$langs->transnoentitiesnoconv("NewPayboxPaymentReceived")."\n";
- $content.="\n";
- $content.=$langs->transnoentitiesnoconv("TechnicalInformation").":\n";
- $content.=$langs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."\n";
- $content.="tag=".$fulltag."\n";
-
+ if (! empty($tmptag['MEM']))
+ {
+ $langs->load("members");
+ $url=$urlwithroot."/adherents/card_subscriptions.php?rowid=".$tmptag['MEM'];
+ $content.=$langs->trans("PaymentSubscription")."
\n";
+ $content.=$langs->trans("MemberId").': '.$tmptag['MEM']."
\n";
+ $content.=$langs->trans("Link").': '.$url.''."
\n";
+ }
+ else
+ {
+ $content.=$langs->transnoentitiesnoconv("NewPayboxPaymentReceived")."
\n";
+ }
+ $content.="
\n";
+ $content.=$langs->transnoentitiesnoconv("TechnicalInformation").":
\n";
+ $content.=$langs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."
\n";
+ $content.="tag=".$fulltag."
\n";
+
$ishtml=dol_textishtml($content); // May contain urls
-
+
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile($topic, $sendto, $from, $content, array(), array(), array(), '', '', 0, $ishtml);
diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php
index 903a850ff36..4cc44eca4ce 100644
--- a/htdocs/public/paypal/paymentok.php
+++ b/htdocs/public/paypal/paymentok.php
@@ -29,7 +29,7 @@
define("NOLOGIN",1); // This means this output page does not require to be logged.
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
-// For MultiCompany module.
+// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
// TODO This should be useless. Because entity must be retreive from object ref and not from url.
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
@@ -167,7 +167,7 @@ if ($PAYPALTOKEN)
$result=$interface->run_triggers('PAYPAL_PAYMENT_OK',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $errors=$interface->errors; }
// Fin appel triggers
-
+
// Send an email
if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL))
{
@@ -177,7 +177,7 @@ if ($PAYPALTOKEN)
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
-
+
$urlback=$_SERVER["REQUEST_URI"];
$topic='['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("NewPaypalPaymentReceived");
$tmptag=dolExplodeIntoArray($fulltag,'.','=');
@@ -186,24 +186,24 @@ if ($PAYPALTOKEN)
{
$langs->load("members");
$url=$urlwithroot."/adherents/card_subscriptions.php?rowid=".$tmptag['MEM'];
- $content.=$langs->trans("PaymentSubscription")."\n";
- $content.=$langs->trans("MemberId").': '.$tmptag['MEM']."\n";
- $content.=$langs->trans("Link").': '.$url.''."\n";
+ $content.=$langs->trans("PaymentSubscription")."
\n";
+ $content.=$langs->trans("MemberId").': '.$tmptag['MEM']."
\n";
+ $content.=$langs->trans("Link").': '.$url.''."
\n";
}
- else
+ else
{
- $content.=$langs->transnoentitiesnoconv("NewPaypalPaymentReceived")."\n";
+ $content.=$langs->transnoentitiesnoconv("NewPaypalPaymentReceived")."
\n";
}
- $content.="\n";
- $content.=$langs->transnoentitiesnoconv("TechnicalInformation").":\n";
- $content.=$langs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."\n";
+ $content.="
\n";
+ $content.=$langs->transnoentitiesnoconv("TechnicalInformation").":
\n";
+ $content.=$langs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."
\n";
$content.="tag=".$fulltag." token=".$token." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt;
-
+
$ishtml=dol_textishtml($content); // May contain urls
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile($topic, $sendto, $from, $content, array(), array(), array(), '', '', 0, $ishtml);
-
+
$result=$mailfile->sendfile();
if ($result)
{
@@ -230,7 +230,7 @@ if ($PAYPALTOKEN)
echo "Error Severity Code: " . $ErrorSeverityCode."
\n";
if ($mysoc->email) echo "\nPlease, send a screenshot of this page to ".$mysoc->email."
\n";
-
+
// Send an email
if (! empty($conf->global->PAYPAL_PAYONLINE_SENDEMAIL))
{
@@ -240,7 +240,7 @@ if ($PAYPALTOKEN)
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
-
+
$urlback=$_SERVER["REQUEST_URI"];
$topic='['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("ValidationOfPaypalPaymentFailed");
$content="";
@@ -249,12 +249,12 @@ if ($PAYPALTOKEN)
$content.=$langs->transnoentitiesnoconv("TechnicalInformation").":\n";
$content.=$langs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."\n";
$content.="tag=".$fulltag."\ntoken=".$token." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt;
-
+
$ishtml=dol_textishtml($content); // May contain urls
-
+
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile($topic, $sendto, $from, $content, array(), array(), array(), '', '', 0, $ishtml);
-
+
$result=$mailfile->sendfile();
if ($result)
{