Clean parameters

This commit is contained in:
Laurent Destailleur 2019-01-08 11:54:08 +01:00
parent 5d0ff28556
commit 1e79781cba

View File

@ -439,7 +439,7 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled))
$service = 'StripeTest';
$servicestatus = 0;
if (! empty($conf->global->STRIPE_LIVE) && ! GETPOST('forcesandbox','alpha'))
if (! empty($conf->global->STRIPE_LIVE) && ! GETPOST('forcesandbox','int'))
{
$service = 'StripeLive';
$servicestatus = 1;
@ -649,11 +649,11 @@ if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_r
// Show sandbox warning
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && ! empty($conf->paypal->enabled) && (! empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox','alpha'))) // We can force sand box with param 'forcesandbox'
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && ! empty($conf->paypal->enabled) && (! empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox','int'))) // We can force sand box with param 'forcesandbox'
{
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode','Paypal'),'','warning');
}
if ((empty($paymentmethod) || $paymentmethod == 'stripe') && ! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')))
if ((empty($paymentmethod) || $paymentmethod == 'stripe') && ! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','int')))
{
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode','Stripe'),'','warning');
}
@ -665,10 +665,10 @@ print '<form id="dolpaymentform" class="center" name="paymentform" action="'.$_S
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
print '<input type="hidden" name="action" value="dopayment">'."\n";
print '<input type="hidden" name="tag" value="'.GETPOST("tag",'alpha').'">'."\n";
print '<input type="hidden" name="suffix" value="'.GETPOST("suffix",'alpha').'">'."\n";
print '<input type="hidden" name="securekey" value="'.$SECUREKEY.'">'."\n";
print '<input type="hidden" name="suffix" value="'.dol_escape_htmltag($suffix).'">'."\n";
print '<input type="hidden" name="securekey" value="'.dol_escape_htmltag($SECUREKEY).'">'."\n";
print '<input type="hidden" name="e" value="'.$entity.'" />';
print '<input type="hidden" name="forcesandbox" value="'.GETPOST('forcesandbox','alpha').'" />';
print '<input type="hidden" name="forcesandbox" value="'.GETPOST('forcesandbox','int').'" />';
print "\n";
print '<!-- Form to send a payment -->'."\n";
print '<!-- creditor = '.$creditor.' -->'."\n";
@ -1712,7 +1712,7 @@ if (preg_match('/^dopayment/',$action))
print '<input type="hidden" name="e" value="'.$entity.'" />';
print '<input type="hidden" name="amount" value="'.$amount.'">'."\n";
print '<input type="hidden" name="currency" value="'.$currency.'">'."\n";
print '<input type="hidden" name="forcesandbox" value="'.GETPOST('forcesandbox','alpha').'" />';
print '<input type="hidden" name="forcesandbox" value="'.GETPOST('forcesandbox','int').'" />';
print '<input type="hidden" name="email" value="'.GETPOST('email','alpha').'" />';
print '<input type="hidden" name="thirdparty_id" value="'.GETPOST('thirdparty_id','int').'" />';