diff --git a/htdocs/langs/en_US/paypal.lang b/htdocs/langs/en_US/paypal.lang
index beaf9a5ea3f..a935cd38434 100644
--- a/htdocs/langs/en_US/paypal.lang
+++ b/htdocs/langs/en_US/paypal.lang
@@ -34,3 +34,4 @@ ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions.
ValidationOfPaymentFailed=Validation of payment has failed
CardOwner=Card holder
PayPalBalance=Paypal credit
+OnlineSubscriptionPaymentLine=Online subscription recorded on %s
Paid via %s
Originating IP address: %s
Transaction ID: %s
diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php
index c0b88736ce3..992e7ab403d 100644
--- a/htdocs/public/payment/paymentok.php
+++ b/htdocs/public/payment/paymentok.php
@@ -504,9 +504,13 @@ if ($ispaymentok) {
$datesubend = dol_time_plus_duree($datesubend, -1, 'd');
}
+ // Set output language
+ $outputlangs = new Translate('', $conf);
+ $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
$paymentdate = $now;
$amount = $FinalPaymentAmt;
- $label = 'Online subscription '.dol_print_date($now, 'standard').' using '.$paymentmethod.' from '.$ipaddress.' - Transaction ID = '.$TRANSACTIONID;
+ $formatteddate = dol_print_date($paymentdate, 'dayhour', 'auto', $outputlangs);
+ $label = $langs->trans("OnlineSubscriptionPaymentLine", $formatteddate, $paymentmethod, $ipaddress, $TRANSACTIONID);
// Payment informations
$accountid = 0;
@@ -693,9 +697,6 @@ if ($ispaymentok) {
// Send subscription email
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
- // Set output language
- $outputlangs = new Translate('', $conf);
- $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
// Load traductions files required by page
$outputlangs->loadLangs(array("main", "members"));
// Get email content from template