Skip to content
Snippets Groups Projects
Commit 5d89d5d7 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: add warning message for sandbox mode

parent c614c7d8
Branches
Tags
No related merge requests found
...@@ -16,3 +16,4 @@ PAYPAL_ADD_PAYMENT_URL=Add the url of Paypal payment when you send a document by ...@@ -16,3 +16,4 @@ PAYPAL_ADD_PAYMENT_URL=Add the url of Paypal payment when you send a document by
PAYPAL_IPN_MAIL_ADDRESS=E-mail address for the instant notification of payment (IPN) PAYPAL_IPN_MAIL_ADDRESS=E-mail address for the instant notification of payment (IPN)
PredefinedMailContentSendOrderWithPaypalLink=You will find here the order __ORDERREF__\n\nYou can click on the secure link below to make your payment via PayPal\n\n%s\n\nSincerely\n\n PredefinedMailContentSendOrderWithPaypalLink=You will find here the order __ORDERREF__\n\nYou can click on the secure link below to make your payment via PayPal\n\n%s\n\nSincerely\n\n
PredefinedMailContentSendInvoiceWithPaypalLink=You will find here the invoice __FACREF__\n\nYou can click on the secure link below to make your payment via PayPal\n\n%s\n\nSincerely\n\n PredefinedMailContentSendInvoiceWithPaypalLink=You will find here the invoice __FACREF__\n\nYou can click on the secure link below to make your payment via PayPal\n\n%s\n\nSincerely\n\n
YouAreCurrentlyInSandboxMode=You are currently in the "sandbox" mode
\ No newline at end of file
...@@ -16,3 +16,4 @@ PAYPAL_ADD_PAYMENT_URL=Ajouter l'url de paiement Paypal lors de l'envoi d'un doc ...@@ -16,3 +16,4 @@ PAYPAL_ADD_PAYMENT_URL=Ajouter l'url de paiement Paypal lors de l'envoi d'un doc
PAYPAL_IPN_MAIL_ADDRESS=Adresse e-mail pour les notifications instantanées de paiement (IPN) PAYPAL_IPN_MAIL_ADDRESS=Adresse e-mail pour les notifications instantanées de paiement (IPN)
PredefinedMailContentSendOrderWithPaypalLink=Bonjour\nVeuillez trouver ci-joint la commande __ORDERREF__\n\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\n\n%s\n\nCordialement\n\n PredefinedMailContentSendOrderWithPaypalLink=Bonjour\nVeuillez trouver ci-joint la commande __ORDERREF__\n\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\n\n%s\n\nCordialement\n\n
PredefinedMailContentSendInvoiceWithPaypalLink=Bonjour\nVeuillez trouver ci-joint la facture __FACREF__\n\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\n\n%s\n\nCordialement\n\n PredefinedMailContentSendInvoiceWithPaypalLink=Bonjour\nVeuillez trouver ci-joint la facture __FACREF__\n\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\n\n%s\n\nCordialement\n\n
YouAreCurrentlyInSandboxMode=Vous êtes actuellement dans le mode "sandbox"
\ No newline at end of file
<?php <?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.org> * Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.org>
* Copyright (C) 2011 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2011-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
......
<?php <?php
/* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2011-2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -55,6 +55,28 @@ function llxHeaderPaypal($title, $head = "") ...@@ -55,6 +55,28 @@ function llxHeaderPaypal($title, $head = "")
print '.CTableRow2 { margin: 1px; padding: 3px; font: 12px verdana,arial; background: #FFFFFF; color: #000000; -moz-border-radius-topleft:6px; -moz-border-radius-topright:6px; -moz-border-radius-bottomleft:6px; -moz-border-radius-bottomright:6px;}'; print '.CTableRow2 { margin: 1px; padding: 3px; font: 12px verdana,arial; background: #FFFFFF; color: #000000; -moz-border-radius-topleft:6px; -moz-border-radius-topright:6px; -moz-border-radius-bottomleft:6px; -moz-border-radius-bottomright:6px;}';
print '</style>'; print '</style>';
} }
if ($conf->use_javascript_ajax)
{
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css" />'."\n"; // JNotify
// Output standard javascript links
$ext='.js';
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) {
$ext='.jgz';
} // mini='_mini', ext='.gz'
// JQuery. Must be before other includes
print '<!-- Includes JS for JQuery -->'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
// jQuery jnotify
if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY))
{
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify.min.js"></script>'."\n";
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/jnotify.js"></script>'."\n";
}
}
print "</head>\n"; print "</head>\n";
print '<body style="margin: 20px;">'."\n"; print '<body style="margin: 20px;">'."\n";
} }
...@@ -207,7 +229,11 @@ function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f ...@@ -207,7 +229,11 @@ function getPaypalPaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_f
if ($type == 'free') if ($type == 'free')
{ {
$out=DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?amount='.($mode?'<font color="#666666">':'').$amount.($mode?'</font>':'').'&tag='.($mode?'<font color="#666666">':'').$freetag.($mode?'</font>':''); $out=DOL_MAIN_URL_ROOT.'/public/paypal/newpayment.php?amount='.($mode?'<font color="#666666">':'').$amount.($mode?'</font>':'').'&tag='.($mode?'<font color="#666666">':'').$freetag.($mode?'</font>':'');
if (! empty($conf->global->PAYPAL_SECURITY_TOKEN)) $out.='&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; if (! empty($conf->global->PAYPAL_SECURITY_TOKEN))
{
if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN;
else $out.='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2);
}
} }
if ($type == 'order') if ($type == 'order')
{ {
......
<?php <?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2011 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2009-2012 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -236,6 +236,10 @@ if (GETPOST("action") == 'dopayment') ...@@ -236,6 +236,10 @@ if (GETPOST("action") == 'dopayment')
llxHeaderPaypal($langs->trans("PaymentForm")); llxHeaderPaypal($langs->trans("PaymentForm"));
if (! empty($PAYPAL_API_SANDBOX))
{
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode'),'','warning');
}
// Common variables // Common variables
$creditor=$mysoc->name; $creditor=$mysoc->name;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment