Fix message content and language
This commit is contained in:
parent
07fe7e58d8
commit
966a0b7ec7
@ -141,8 +141,13 @@ if (! empty($_SESSION['ipaddress'])) // To avoid to make action twice
|
|||||||
$sendemail = $conf->global->ONLINE_PAYMENT_SENDEMAIL;
|
$sendemail = $conf->global->ONLINE_PAYMENT_SENDEMAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send warning of error to administrator
|
||||||
if ($sendemail)
|
if ($sendemail)
|
||||||
{
|
{
|
||||||
|
$companylangs = new Translate('', $conf);
|
||||||
|
$companylangs->setDefaultLang($mysoc->default_lang);
|
||||||
|
$companylangs->loadLangs(array('main','members','bills','paypal','paybox'));
|
||||||
|
|
||||||
$from=$conf->global->MAILING_EMAIL_FROM;
|
$from=$conf->global->MAILING_EMAIL_FROM;
|
||||||
$sendto=$sendemail;
|
$sendto=$sendemail;
|
||||||
|
|
||||||
@ -160,16 +165,21 @@ if (! empty($_SESSION['ipaddress'])) // To avoid to make action twice
|
|||||||
else $appli.=" ".DOL_VERSION;
|
else $appli.=" ".DOL_VERSION;
|
||||||
|
|
||||||
$urlback=$_SERVER["REQUEST_URI"];
|
$urlback=$_SERVER["REQUEST_URI"];
|
||||||
$topic='['.$appli.'] '.$langs->transnoentitiesnoconv("NewOnlinePaymentFailed");
|
$topic='['.$appli.'] '.$companylangs->transnoentitiesnoconv("NewOnlinePaymentFailed");
|
||||||
$content="";
|
$content="";
|
||||||
$content.=$langs->transnoentitiesnoconv("ValidationOfOnlinePaymentFailed")."\n";
|
$content.='<font color="orange">'.$companylangs->transnoentitiesnoconv("ValidationOfOnlinePaymentFailed")."</font>\n";
|
||||||
$content.="\n";
|
|
||||||
$content.=$langs->transnoentitiesnoconv("TechnicalInformation").":\n";
|
$content.="<br><br>\n";
|
||||||
$content.=$langs->transnoentitiesnoconv("OnlinePaymentSystem").': '.$paymentmethod."<br>\n";
|
$content.='<u>'.$companylangs->transnoentitiesnoconv("TechnicalInformation").":</u><br>\n";
|
||||||
$content.=$langs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."\n";
|
$content.=$companylangs->transnoentitiesnoconv("OnlinePaymentSystem").': <strong>'.$paymentmethod."</strong><br>\n";
|
||||||
|
$content.=$companylangs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."<br>\n";
|
||||||
|
$content.="<br>\n";
|
||||||
$content.="tag=".$fulltag."\ntoken=".$onlinetoken." paymentType=".$paymentType." currencycodeType=".$currencyCodeType." payerId=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt;
|
$content.="tag=".$fulltag."\ntoken=".$onlinetoken." 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';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||||
$mailfile = new CMailFile($topic, $sendto, $from, $content);
|
$mailfile = new CMailFile($topic, $sendto, $from, $content, array(), array(), array(), '', '', 0, $ishtml);
|
||||||
|
|
||||||
$result=$mailfile->sendfile();
|
$result=$mailfile->sendfile();
|
||||||
if ($result)
|
if ($result)
|
||||||
|
|||||||
@ -876,7 +876,7 @@ else
|
|||||||
elseif ($paymentmethod == 'paybox' && ! empty($conf->global->PAYBOX_PAYONLINE_SENDEMAIL)) $sendemail=$conf->global->PAYBOX_PAYONLINE_SENDEMAIL;
|
elseif ($paymentmethod == 'paybox' && ! empty($conf->global->PAYBOX_PAYONLINE_SENDEMAIL)) $sendemail=$conf->global->PAYBOX_PAYONLINE_SENDEMAIL;
|
||||||
elseif ($paymentmethod == 'stripe' && ! empty($conf->global->STRIPE_PAYONLINE_SENDEMAIL)) $sendemail=$conf->global->STRIPE_PAYONLINE_SENDEMAIL;
|
elseif ($paymentmethod == 'stripe' && ! empty($conf->global->STRIPE_PAYONLINE_SENDEMAIL)) $sendemail=$conf->global->STRIPE_PAYONLINE_SENDEMAIL;
|
||||||
|
|
||||||
// Send an email
|
// Send warning of error to administrator
|
||||||
if ($sendemail)
|
if ($sendemail)
|
||||||
{
|
{
|
||||||
$companylangs = new Translate('', $conf);
|
$companylangs = new Translate('', $conf);
|
||||||
@ -908,7 +908,7 @@ else
|
|||||||
$content="";
|
$content="";
|
||||||
$content.='<font color="orange">'.$companylangs->transnoentitiesnoconv("PaymentSystemConfirmPaymentPageWasCalledButFailed")."</font>\n";
|
$content.='<font color="orange">'.$companylangs->transnoentitiesnoconv("PaymentSystemConfirmPaymentPageWasCalledButFailed")."</font>\n";
|
||||||
|
|
||||||
$content.="<br>\n";
|
$content.="<br><br>\n";
|
||||||
$content.='<u>'.$companylangs->transnoentitiesnoconv("TechnicalInformation").":</u><br>\n";
|
$content.='<u>'.$companylangs->transnoentitiesnoconv("TechnicalInformation").":</u><br>\n";
|
||||||
$content.=$companylangs->transnoentitiesnoconv("OnlinePaymentSystem").': <strong>'.$paymentmethod."</strong><br>\n";
|
$content.=$companylangs->transnoentitiesnoconv("OnlinePaymentSystem").': <strong>'.$paymentmethod."</strong><br>\n";
|
||||||
$content.=$companylangs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."<br>\n";
|
$content.=$companylangs->transnoentitiesnoconv("ReturnURLAfterPayment").': '.$urlback."<br>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user