[FEATURE] added minimum payout
This commit is contained in:
parent
0e981d7faa
commit
faf414e669
6
public/include/config/global.inc.dist.php
Normal file → Executable file
6
public/include/config/global.inc.dist.php
Normal file → Executable file
@ -77,6 +77,12 @@ $config['price']['currency'] = 'USD';
|
|||||||
$config['ap_threshold']['min'] = 1;
|
$config['ap_threshold']['min'] = 1;
|
||||||
$config['ap_threshold']['max'] = 250;
|
$config['ap_threshold']['max'] = 250;
|
||||||
|
|
||||||
|
/* Minimum manual Payout Threshold
|
||||||
|
* Minimum manual payout amount
|
||||||
|
* https://github.com/MPOS/php-mpos/wiki/Config-Setup#wiki-manual-payout-threshold
|
||||||
|
**/
|
||||||
|
$config['mp_threshold'] = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Donation thresholds
|
* Donation thresholds
|
||||||
* Minimum donation amount in percent
|
* Minimum donation amount in percent
|
||||||
|
|||||||
@ -96,6 +96,8 @@ if ($user->isAuthenticated()) {
|
|||||||
case 'cashOut':
|
case 'cashOut':
|
||||||
if ($setting->getValue('disable_payouts') == 1 || $setting->getValue('disable_manual_payouts') == 1) {
|
if ($setting->getValue('disable_payouts') == 1 || $setting->getValue('disable_manual_payouts') == 1) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Manual payouts are disabled.', 'TYPE' => 'alert alert-warning');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Manual payouts are disabled.', 'TYPE' => 'alert alert-warning');
|
||||||
|
} else if ($aBalance['confirmed'] < $config['mp_threshold']) {
|
||||||
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Payout must be greater or equal than ' . $config['mp_threshold'] . '.', 'TYPE' => 'info');
|
||||||
} else if (!$user->getCoinAddress($_SESSION['USERDATA']['id'])) {
|
} else if (!$user->getCoinAddress($_SESSION['USERDATA']['id'])) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'You have no payout address set.', 'TYPE' => 'alert alert-danger');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'You have no payout address set.', 'TYPE' => 'alert alert-danger');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -88,6 +88,7 @@ $aGlobal = array(
|
|||||||
'txfee_manual' => $config['txfee_manual'],
|
'txfee_manual' => $config['txfee_manual'],
|
||||||
'txfee_auto' => $config['txfee_auto'],
|
'txfee_auto' => $config['txfee_auto'],
|
||||||
'payout_system' => $config['payout_system'],
|
'payout_system' => $config['payout_system'],
|
||||||
|
'mp_threshold' => $config['mp_threshold'],
|
||||||
'ap_threshold' => array(
|
'ap_threshold' => array(
|
||||||
'min' => $config['ap_threshold']['min'],
|
'min' => $config['ap_threshold']['min'],
|
||||||
'max' => $config['ap_threshold']['max']
|
'max' => $config['ap_threshold']['max']
|
||||||
|
|||||||
7
public/templates/bootstrap/account/edit/cashout.tpl
Normal file → Executable file
7
public/templates/bootstrap/account/edit/cashout.tpl
Normal file → Executable file
@ -15,6 +15,9 @@
|
|||||||
<p style="padding-left:3px; padding-redight:30px; font-size:10px;">
|
<p style="padding-left:3px; padding-redight:30px; font-size:10px;">
|
||||||
Please note: a {if $GLOBAL.config.txfee_manual > 0.00001}{$GLOBAL.config.txfee_manual}{else}{$GLOBAL.config.txfee_manual|number_format:"8"}{/if} {$GLOBAL.config.currency} transaction will apply when processing "On-Demand" manual payments <span id="tt"><img width="15px" height="15px" title="This {if $GLOBAL.config.txfee_manual > 0.00001}{$GLOBAL.config.txfee_manual}{else}{$GLOBAL.config.txfee_manual|number_format:"8"}{/if} manual payment transaction fee is a network fee and goes back into the network not the pool." src="site_assets/mpos/images/questionmark.png"></span>
|
Please note: a {if $GLOBAL.config.txfee_manual > 0.00001}{$GLOBAL.config.txfee_manual}{else}{$GLOBAL.config.txfee_manual|number_format:"8"}{/if} {$GLOBAL.config.currency} transaction will apply when processing "On-Demand" manual payments <span id="tt"><img width="15px" height="15px" title="This {if $GLOBAL.config.txfee_manual > 0.00001}{$GLOBAL.config.txfee_manual}{else}{$GLOBAL.config.txfee_manual|number_format:"8"}{/if} manual payment transaction fee is a network fee and goes back into the network not the pool." src="site_assets/mpos/images/questionmark.png"></span>
|
||||||
</p>
|
</p>
|
||||||
|
<p style="padding-left:3px; padding-redight:30px; font-size:10px;">
|
||||||
|
Minimum Cashout: {$GLOBAL.config.mp_threshold} {$GLOBAL.config.currency}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Account Balance</label>
|
<label>Account Balance</label>
|
||||||
@ -37,7 +40,9 @@
|
|||||||
<input type="hidden" name="ctoken" value="{$CTOKEN|escape|default:""}" />
|
<input type="hidden" name="ctoken" value="{$CTOKEN|escape|default:""}" />
|
||||||
<input type="hidden" name="utype" value="withdraw_funds">
|
<input type="hidden" name="utype" value="withdraw_funds">
|
||||||
{if $GLOBAL.twofactor.enabled && $GLOBAL.twofactor.options.withdraw}
|
{if $GLOBAL.twofactor.enabled && $GLOBAL.twofactor.options.withdraw}
|
||||||
{if $WITHDRAWSENT == 1 && $WITHDRAWUNLOCKED == 1}
|
{if $GLOBAL.userdata.balance.confirmed|escape < $GLOBAL.config.mp_threshold}
|
||||||
|
<input type="submit" value="Unlock" class="alt_btn" name="unlock" disabled>
|
||||||
|
{elseif $WITHDRAWSENT == 1 && $WITHDRAWUNLOCKED == 1}
|
||||||
<input type="submit" value="Cash Out" class="btn btn-success">
|
<input type="submit" value="Cash Out" class="btn btn-success">
|
||||||
{elseif $WITHDRAWSENT == 0 && $WITHDRAWUNLOCKED == 1 || $WITHDRAWSENT == 1 && $WITHDRAWUNLOCKED == 0}
|
{elseif $WITHDRAWSENT == 0 && $WITHDRAWUNLOCKED == 1 || $WITHDRAWSENT == 1 && $WITHDRAWUNLOCKED == 0}
|
||||||
<input type="submit" value="Cash Out" class="btn btn-danger" disabled>
|
<input type="submit" value="Cash Out" class="btn btn-danger" disabled>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user