diff --git a/ChangeLog b/ChangeLog
index a834607cdb4..e7d2e862f15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,7 +17,7 @@ For users:
- New: Show process id in all command line scripts.
- New: Module mailman can subscribe/unsubscribe to ML according to categories or type of member.
- New: Add object_hour as substitution tag for opendocument generation.
-- New: Add option MEMBER_PAYONLINE_SENDEMAIL to send email when paypal or paybox payment is done.
+- New: Add option to send email when paypal or paybox payment is done.
- New: Implement same rule for return value of all command line scripts (0 when success, <>0 if error).
- New: Clone product/service composition.
- New: [ task #926 ] Add extrafield feature on order lines.
diff --git a/htdocs/langs/en_US/paybox.lang b/htdocs/langs/en_US/paybox.lang
index 7521d518072..f39fc01911f 100644
--- a/htdocs/langs/en_US/paybox.lang
+++ b/htdocs/langs/en_US/paybox.lang
@@ -33,3 +33,6 @@ VendorName=Name of vendor
CSSUrlForPaymentForm=CSS style sheet url for payment form
MessageOK=Message on validated payment return page
MessageKO=Message on canceled payment return page
+NewPayboxPaymentReceived=New Paybox payment received
+NewPayboxPaymentFailed=New Paybox payment tried but failed
+PAYBOX_PAYONLINE_SENDEMAIL=EMail to warn after a payment (success or failed)
diff --git a/htdocs/langs/en_US/paypal.lang b/htdocs/langs/en_US/paypal.lang
index b270ea68d38..fe383229d35 100644
--- a/htdocs/langs/en_US/paypal.lang
+++ b/htdocs/langs/en_US/paypal.lang
@@ -17,4 +17,7 @@ ThisIsTransactionId=This is id of transaction: %s
PAYPAL_ADD_PAYMENT_URL=Add the url of Paypal payment when you send a document by mail
PAYPAL_IPN_MAIL_ADDRESS=E-mail address for the instant notification of payment (IPN)
PredefinedMailContentLink=You can click on the secure link below to make your payment (PayPal) if it is not already done.\n\n%s\n\n
-YouAreCurrentlyInSandboxMode=You are currently in the "sandbox" mode
\ No newline at end of file
+YouAreCurrentlyInSandboxMode=You are currently in the "sandbox" mode
+NewPaypalPaymentReceived=New Paypal payment received
+NewPaypalPaymentFailed=New Paypal payment tried but failed
+PAYPAL_PAYONLINE_SENDEMAIL=EMail to warn after a payment (success or not)
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/paybox.lang b/htdocs/langs/fr_FR/paybox.lang
index ae1a97c435e..dcfd4ac1fd3 100644
--- a/htdocs/langs/fr_FR/paybox.lang
+++ b/htdocs/langs/fr_FR/paybox.lang
@@ -33,3 +33,6 @@ VendorName=Nom du vendeur
CSSUrlForPaymentForm=URL feuille style css pour le formulaire de paiement
MessageOK=Message sur page de retour de paiement validé
MessageKO=Message sur page de retour de paiement annulé
+NewPayboxPaymentReceived=Nouveau paiement Paybox reçu
+NewPayboxPaymentFailed=Nouveau paiement Paybox tenté mais en échec
+PAYBOX_PAYONLINE_SENDEMAIL=EMail à prévenir en cas de paiement (succès ou non)
diff --git a/htdocs/langs/fr_FR/paypal.lang b/htdocs/langs/fr_FR/paypal.lang
index 28eeff81a3d..3f6e2a55af5 100644
--- a/htdocs/langs/fr_FR/paypal.lang
+++ b/htdocs/langs/fr_FR/paypal.lang
@@ -18,3 +18,7 @@ PAYPAL_ADD_PAYMENT_URL=Ajouter l'URL de paiement Paypal lors de l'envoi d'un doc
PAYPAL_IPN_MAIL_ADDRESS=Adresse email pour les notifications instantanées de paiement (IPN)
PredefinedMailContentLink=Vous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement (Paypal) si ce dernier n'a pas encore été fait.\n\n%s\n\n
YouAreCurrentlyInSandboxMode=Vous êtes actuellement dans le mode "sandbox"
+NewPaypalPaymentReceived=Nouveau paiement Paypal reçu
+NewPaypalPaymentFailed=Nouveau paiement Paypal tenté mais en échec
+PAYPAL_PAYONLINE_SENDEMAIL=EMail à prévenir en cas de paiement (succès ou non)
+
diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php
index 75704d83c3a..c55574d363a 100644
--- a/htdocs/paybox/admin/paybox.php
+++ b/htdocs/paybox/admin/paybox.php
@@ -61,6 +61,8 @@ if ($action == 'setvalue' && $user->admin)
if (! $result > 0) $error++;
$result=dolibarr_set_const($db, "PAYBOX_MESSAGE_KO",GETPOST('PAYBOX_MESSAGE_KO','alpha'),'chaine',0,'',$conf->entity);
if (! $result > 0) $error++;
+ $result=dolibarr_set_const($db, "PAYBOX_PAYONLINE_SENDEMAIL",GETPOST('PAYBOX_PAYONLINE_SENDEMAIL'),'chaine',0,'',$conf->entity);
+ if (! $result > 0) $error++;
if (! $error)
{
@@ -91,6 +93,16 @@ llxHeader();
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($langs->trans("PayBoxSetup"),$linkback,'setup');
+$h = 0;
+$head = array();
+
+$head[$h][0] = DOL_URL_ROOT."/paybox/admin/paybox.php";
+$head[$h][1] = $langs->trans("Account");
+$head[$h][2] = 'payboxaccount';
+$h++;
+
+dol_fiche_head($head, 'payboxaccount', '');
+
print $langs->trans("PayBoxDesc")." \n";
print ' ';
@@ -186,9 +198,18 @@ $doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,''
$doleditor->Create();
print '';
+$var=!$var;
+print '