FIX Add paypal error message in alert email

This commit is contained in:
Laurent Destailleur 2018-09-12 16:11:10 +02:00
parent 9cbba2dc7d
commit 48ae4de47b
3 changed files with 8 additions and 9 deletions

View File

@ -31,4 +31,5 @@ OnlinePaymentSystem=Online payment system
PaypalLiveEnabled=Paypal live enabled (otherwise test/sandbox mode)
PaypalImportPayment=Import Paypal payments
PostActionAfterPayment=Post actions after payments
ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions. You must complete post actions manually if they are necessary.
ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions. You must complete post actions manually if they are necessary.
ValidationOfPaymentFailed=Validation of payment has failed

View File

@ -801,6 +801,11 @@ if ($ispaymentok)
$content.="<br>\n";
$content.="tag=".$fulltag."<br>\ntoken=".$onlinetoken."<br>\npaymentType=".$paymentType."<br>\ncurrencycodeType=".$currencyCodeType."<br>\npayerId=".$payerID."<br>\nipaddress=".$ipaddress."<br>\nFinalPaymentAmt=".$FinalPaymentAmt."<br>\n";
if (! empty($ErrorCode)) $content.="ErrorCode = ".$ErrorCode."<br>\n";
if (! empty($ErrorShortMsg)) $content.="ErrorShortMsg = ".$ErrorShortMsg."<br>\n";
if (! empty($ErrorLongMsg)) $content.="ErrorLongMsg = ".$ErrorLongMsg."<br>\n";
if (! empty($ErrorSeverityCode)) $content.="ErrorSeverityCode = ".$ErrorSeverityCode."<br>\n";
$ishtml=dol_textishtml($content); // May contain urls
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';

View File

@ -43,14 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
// Security check
if (empty($conf->paypal->enabled)) accessforbidden('',0,0,1);
$langs->load("main");
$langs->load("other");
$langs->load("dict");
$langs->load("bills");
$langs->load("companies");
$langs->load("paybox");
$langs->load("paypal");
$langs->load("stripe");
$langs->loadLangs(array("main","other","dict","bills","companies","paybox","paypal","stripe"));
// Clean parameters
$PAYPAL_API_USER="";