Commit 3ac30d0d authored by iWallet Dev's avatar iWallet Dev

Adjusted Maximum Withdrawal Limit

parent 82004243
......@@ -44,7 +44,6 @@ class WithdrawModelClass extends ModelClassEx {
private $province = null; //province (SDPay)
private $city = null; //city (SDPay)
private $withdrawTool = null; //withdrawal tool class (SDPay)
private $administrativeExceptions = null; //user account whitelisting settings
/*-------------------------------------------------------------------------
* @function_name: コントロールパネルシステムindexモデルクラスコンストラクタ
......@@ -70,6 +69,7 @@ class WithdrawModelClass extends ModelClassEx {
// チェック
$this -> validate();
} catch (Exception $e) {
throw $e;
}
......@@ -125,8 +125,6 @@ class WithdrawModelClass extends ModelClassEx {
//get account data
$this -> account = $this -> getRowData($this -> getAccountCommon($this -> getUserData(PARAM_USER_ACCOUNT)));
$this -> administrativeExceptions = $this -> getSettingConfiguration("administrative_exception");
//if moneyout solution is not null save it to session
if($this -> moneyoutSolution != NO_STRING && in_array($this -> moneyoutSolution, VAL_ARR_MONEYOUT_SOLUTIONS)){
$_SESSION['moneyoutSolution'] = $this -> moneyoutSolution;
......@@ -312,19 +310,12 @@ class WithdrawModelClass extends ModelClassEx {
, $this -> getUserData(PARAM_USER_ACCOUNT));
}
// 手数料なし
$accounts = array_map(function($element){
return $element -> user_account;
}, $this -> administrativeExceptions);
if(!in_array($this -> getUserData(PARAM_USER_ACCOUNT), $accounts)){
// バランスと(送金額 + 手数料)のチェック
if($this -> fromCurrency == USD)
if($this -> fromCurrency == USD) {
$this -> setFeeEx($fee[USD . VAL_INT_1]);
else
} else {
$this -> setFeeEx($feeExchange[PARAM_AMOUNT]);
}else
$this -> setFeeEx(0);
}
$this -> setAgent1Ex($fee[PARAM_AGENT_CODE . VAL_INT_1]);
......@@ -378,7 +369,6 @@ class WithdrawModelClass extends ModelClassEx {
//check if flat 3
if($_SESSION['moneyoutSolution'] == 'Flat3'){
if(!in_array($this -> getUserData(PARAM_USER_ACCOUNT), $accounts)){
$flat3Fee = round($this -> debitAmount * VAL_FLOAT_FLAT3_WITHDRAW_FEE, 2);
if($this -> getFeeEx() < $flat3Fee){
......@@ -386,7 +376,6 @@ class WithdrawModelClass extends ModelClassEx {
}
}
}
}
} else if($this -> getType() == $typeArray["Confirm"]) { // 確認タイプの場合
......@@ -444,19 +433,12 @@ class WithdrawModelClass extends ModelClassEx {
, $this -> getUserData(PARAM_USER_ACCOUNT));
}
// setting exception
$accounts = array_map(function($element){
return $element -> user_account;
}, $this -> administrativeExceptions);
// バランスと(送金額 + 手数料)のチェック
if(!in_array($this -> getUserData(PARAM_USER_ACCOUNT), $accounts)){
if($this -> fromCurrency == USD)
if($this -> fromCurrency == USD) {
$this -> setFeeEx($fee[USD . VAL_INT_1]);
else
} else {
$this -> setFeeEx($feeExchange[PARAM_AMOUNT]);
}else
$this -> setFeeEx(0);
}
$this -> setAgent1Ex($fee[PARAM_AGENT_CODE . VAL_INT_1]);
......@@ -479,7 +461,7 @@ class WithdrawModelClass extends ModelClassEx {
$rtn = false;
}
if($this -> amount >= 1000000){
if($this -> amount >= 500000){
$this -> popUpSessionMessage(ERROR, 'E_ERROR_AMOUNT', array());
$rtn = false;
}
......@@ -516,17 +498,15 @@ class WithdrawModelClass extends ModelClassEx {
//check if flat 3
if($_SESSION['moneyoutSolution'] == 'Flat3'){
$flat3Fee = round($this -> debitAmount * VAL_FLOAT_FLAT3_WITHDRAW_FEE, 2);
// $flat3Fee = round($this -> debitAmount * VAL_FLOAT_FLAT3_WITHDRAW_FEE, 2);
$accounts = array_map(function($element){
return $element -> user_account;
}, $this -> administrativeExceptions);
// if($this -> getFeeEx() < $flat3Fee){
// $this -> setFeeEx($flat3Fee);
// }
if(!in_array($this -> getUserData(PARAM_USER_ACCOUNT), $accounts)){
$this -> arrangeMinimumFee();
}
}
}
//create session variable for 2favalidated
$_SESSION['2fa_validated'] = 'not validated';
......@@ -1571,11 +1551,7 @@ class WithdrawModelClass extends ModelClassEx {
}
}
/*-------------------------------------------------------------------------
* @function_name: 引落口座通貨の取得
* @parameter : なし
* @return : 引落口座通貨
-------------------------------------------------------------------------*/
public function echoDebitCurrency() {
echo $this -> debitCurrency;
}
......@@ -1608,7 +1584,6 @@ class WithdrawModelClass extends ModelClassEx {
foreach($adminException as $data){
if(isset($data -> user_account) && $data -> user_account === $loggedInUserAcc){
if(isset($data -> ignore_f3withdrawal_fee) && $data -> ignore_f3withdrawal_fee){
$this -> setFeeEx(NO_COUNT);
$this -> drawFee = NO_COUNT;
......@@ -2222,17 +2197,7 @@ class WithdrawModelClass extends ModelClassEx {
public function getOutStatus()
{
$rtn = array();
$userAccounts = array_map(function($element){
return $element -> user_account;
}, $this -> administrativeExceptions);
if(in_array($this -> getUserData(PARAM_USER_ACCOUNT), $userAccounts)){
$method = getOutMoney();
} else {
$method = getOouMoney();
}
$lang = $this -> getLangage();
foreach ($method as $key => $value) {
$solution = ($value[1] == 'Flat3') ? PARAM_WITHDRAW_FLAT3_METHOD : (($value[1] == 'SDPay') ? PARAM_WITHDRAW_LBTC_METHOD : (($value[1] == 'H2P') ? PARAM_WITHDRAW_H2P_METHOD : PARAM_WITHDRAW_IBT_METHOD));
......@@ -2287,17 +2252,11 @@ class WithdrawModelClass extends ModelClassEx {
$this -> popUpSessionMessage(ERROR, 'E_ERROR_REGULAR_NUMBER', array(VAL_STR_AMOUNT));
$rtn = false;
} elseif(!$this->CheckWithdrawMinimum($this -> currency, $this -> amount)) { //check withdrawal minimum
$userAccounts = array_map(function($element){
return $element -> user_account;
}, $this -> administrativeExceptions);
if(!in_array($this -> getUserData(PARAM_USER_ACCOUNT), $userAccounts)){
$exchange = $this -> getExchangeCommon(VAL_INT_MINIMUM_WITHDRAW_AMOUNT, 'USD', $this -> currency,
false, false, NO_STRING, $this -> getUserData(PARAM_USER_ACCOUNT)); // anton
$this -> popUpSessionMessage(ERROR, 'E_ERROR_WITHDRAW_MINIMUM', array($this -> currency, $exchange[PARAM_ORIGINAL_AMOUNT]));
$rtn = false;
}
}
// check currency if in list of allowed currenicies
if(!$this -> checkWithdrawCurrency($this -> currency, $_SESSION['moneyoutSolution'])){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment