From b77e068a72bb06721a8603222ecae2868625d403 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Apr 2014 15:01:45 +0200 Subject: [PATCH] New: More information into email confirm for paybox payment. --- htdocs/public/paybox/paymentok.php | 21 +++++++++++++++------ htdocs/public/paypal/paymentok.php | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/htdocs/public/paybox/paymentok.php b/htdocs/public/paybox/paymentok.php index 159d29bb78c..691d85838f3 100644 --- a/htdocs/public/paybox/paymentok.php +++ b/htdocs/public/paybox/paymentok.php @@ -104,13 +104,22 @@ if (! empty($conf->global->PAYBOX_PAYONLINE_SENDEMAIL)) { $sendto=$conf->global->PAYBOX_PAYONLINE_SENDEMAIL; $from=$conf->global->MAILING_EMAIL_FROM; + // Define $urlwithroot + $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("NewPayboxPaymentReceived"); + $content=""; + $content.=$langs->transnoentitiesnoconv("NewPayboxPaymentReceived")."\n"; + $content.="\n"; + $content.=$langs->transnoentitiesnoconv("TechnicalInformation").":\n"; + $content.=$langs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."\n"; + $content.="tag=".$fulltag."\n"; + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mailfile = new CMailFile( - '['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("NewPayboxPaymentReceived"), - $sendto, - $from, - $langs->transnoentitiesnoconv("NewPayboxPaymentReceived")."\n".$fulltag - ); + $mailfile = new CMailFile($topic, $sendto, $from, $content); $result=$mailfile->sendfile(); if ($result) diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php index 764db8d306d..74e626040cf 100644 --- a/htdocs/public/paypal/paymentok.php +++ b/htdocs/public/paypal/paymentok.php @@ -241,7 +241,7 @@ if ($PAYPALTOKEN) $urlback=$_SERVER["REQUEST_URI"]; $topic='['.$conf->global->MAIN_APPLICATION_TITLE.'] '.$langs->transnoentitiesnoconv("ValidationOfPaypalPaymentFailed"); $content=""; - $content.=$langs->transnoentitiesnoconv("PaypalConfirmPaymentPageWasCalledButFailed"); + $content.=$langs->transnoentitiesnoconv("PaypalConfirmPaymentPageWasCalledButFailed")."\n"; $content.="\n"; $content.=$langs->transnoentitiesnoconv("TechnicalInformation").":\n"; $content.=$langs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."\n";