diff --git a/htdocs/langs/en_US/paypal.lang b/htdocs/langs/en_US/paypal.lang
index 547b188b4a5..ad8b9612935 100644
--- a/htdocs/langs/en_US/paypal.lang
+++ b/htdocs/langs/en_US/paypal.lang
@@ -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.
\ No newline at end of file
+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
\ No newline at end of file
diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php
index a5b6b38ea35..34209877bf3 100644
--- a/htdocs/public/payment/paymentok.php
+++ b/htdocs/public/payment/paymentok.php
@@ -801,6 +801,11 @@ if ($ispaymentok)
$content.="
\n";
$content.="tag=".$fulltag."
\ntoken=".$onlinetoken."
\npaymentType=".$paymentType."
\ncurrencycodeType=".$currencyCodeType."
\npayerId=".$payerID."
\nipaddress=".$ipaddress."
\nFinalPaymentAmt=".$FinalPaymentAmt."
\n";
+ if (! empty($ErrorCode)) $content.="ErrorCode = ".$ErrorCode."
\n";
+ if (! empty($ErrorShortMsg)) $content.="ErrorShortMsg = ".$ErrorShortMsg."
\n";
+ if (! empty($ErrorLongMsg)) $content.="ErrorLongMsg = ".$ErrorLongMsg."
\n";
+ if (! empty($ErrorSeverityCode)) $content.="ErrorSeverityCode = ".$ErrorSeverityCode."
\n";
+
$ishtml=dol_textishtml($content); // May contain urls
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php
index 1e6adb7ca51..72a43dcbc7b 100644
--- a/htdocs/public/paypal/paymentok.php
+++ b/htdocs/public/paypal/paymentok.php
@@ -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="";