Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iwl-live
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anthony.Suerte
iwl-live
Commits
6a2341e1
Commit
6a2341e1
authored
Sep 14, 2023
by
iWallet Dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Exception to Admin Corp Account
parent
3131375a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
45 deletions
+21
-45
model.php
logic/withdraw/model.php
+21
-45
No files found.
logic/withdraw/model.php
View file @
6a2341e1
...
...
@@ -126,6 +126,10 @@ class WithdrawModelClass extends ModelClassEx {
$this
->
account
=
$this
->
getRowData
(
$this
->
getAccountCommon
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
)));
$this
->
administrativeExceptions
=
$this
->
getSettingConfiguration
(
"administrative_exception"
);
$this
->
administrativeExceptions
=
array_map
(
function
(
$element
){
return
$element
->
user_account
;
},
$this
->
administrativeExceptions
);
//if moneyout solution is not null save it to session
if
(
$this
->
moneyoutSolution
!=
NO_STRING
&&
in_array
(
$this
->
moneyoutSolution
,
VAL_ARR_MONEYOUT_SOLUTIONS
)){
...
...
@@ -185,7 +189,7 @@ class WithdrawModelClass extends ModelClassEx {
* @parameter : なし
* @return : TRUE:成功、FALSE:失敗
-------------------------------------------------------------------------*/
public
function
validate
()
{
public
function
validate
()
{
$rtn
=
true
;
//set type confirm, type complete and type back based on money out solution
...
...
@@ -312,12 +316,8 @@ 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
(
!
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$this
->
administrativeExceptions
)){
// バランスと(送金額 + 手数料)のチェック
if
(
$this
->
fromCurrency
==
USD
)
$this
->
setFeeEx
(
$fee
[
USD
.
VAL_INT_1
]);
...
...
@@ -443,14 +443,9 @@ class WithdrawModelClass extends ModelClassEx {
,
NO_STRING
,
$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
),
$
account
s
)){
if
(
!
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$
this
->
administrativeException
s
)){
if
(
$this
->
fromCurrency
==
USD
)
$this
->
setFeeEx
(
$fee
[
USD
.
VAL_INT_1
]);
else
...
...
@@ -479,7 +474,8 @@ class WithdrawModelClass extends ModelClassEx {
$rtn
=
false
;
}
if
(
$this
->
amount
>
500000
){
if
(
!
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$this
->
administrativeExceptions
)
&&
$this
->
amount
>
500000
){
$this
->
popUpSessionMessage
(
ERROR
,
'E_ERROR_AMOUNT'
,
array
());
$rtn
=
false
;
}
...
...
@@ -517,12 +513,8 @@ class WithdrawModelClass extends ModelClassEx {
//check if flat 3
if
(
$_SESSION
[
'moneyoutSolution'
]
==
'Flat3'
){
$flat3Fee
=
round
(
$this
->
debitAmount
*
VAL_FLOAT_FLAT3_WITHDRAW_FEE
,
2
);
$accounts
=
array_map
(
function
(
$element
){
return
$element
->
user_account
;
},
$this
->
administrativeExceptions
);
if
(
!
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$
account
s
)){
if
(
!
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$
this
->
administrativeException
s
)){
$this
->
arrangeMinimumFee
();
}
}
...
...
@@ -789,7 +781,8 @@ class WithdrawModelClass extends ModelClassEx {
//check if method is Flat3
if
(
$_SESSION
[
'moneyoutSolution'
]
==
'Flat3'
){
if
(
count
(
$this
->
getPendingWithdrawalTransactions
())){
if
(
!
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$this
->
administrativeExceptions
)
&&
count
(
$this
->
getPendingWithdrawalTransactions
())){
$this
->
popUpSessionMessage
(
ERROR
,
'E_ERROR_PENDING_FLAT3_WITHDRAWAL'
,
array
());
$this
->
setType
();
return
;
...
...
@@ -1602,19 +1595,10 @@ class WithdrawModelClass extends ModelClassEx {
}
$this
->
drawFee
=
$standardJPYFee
[
"published_amount"
];
$loggedInUserAcc
=
$this
->
getUserData
(
PARAM_USER_ACCOUNT
);
$adminException
=
$this
->
getSettingConfiguration
(
"administrative_exception"
);
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
;
}
break
;
}
if
(
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$this
->
administrativeExceptions
)){
$this
->
setFeeEx
(
NO_COUNT
);
$this
->
drawFee
=
NO_COUNT
;
}
}
...
...
@@ -2214,12 +2198,8 @@ 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
)){
if
(
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$this
->
administrativeExceptions
)){
$method
=
getOutMoney
();
}
else
{
$method
=
getOouMoney
();
...
...
@@ -2278,12 +2258,8 @@ class WithdrawModelClass extends ModelClassEx {
}
elseif
(
!
$this
->
checkStringNumber
(
$this
->
amount
))
{
$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
)){
}
elseif
(
!
$this
->
CheckWithdrawMinimum
(
$this
->
currency
,
$this
->
amount
))
{
//check withdrawal minimum
if
(
!
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$this
->
administrativeExceptions
)){
$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
]));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment