Commit da1ca760 authored by Antonio.Suerte's avatar Antonio.Suerte

Payment API Restriction Enhancement

parent b9cde9cc
...@@ -228,19 +228,33 @@ class SettlementModelClass extends ModelClassEx { ...@@ -228,19 +228,33 @@ class SettlementModelClass extends ModelClassEx {
$apiSignature = $this -> getRowData($this -> getAPISignatureCommon($this -> pNum)); $apiSignature = $this -> getRowData($this -> getAPISignatureCommon($this -> pNum));
$displayTransactionDetails = true; $displayTransactionDetails = true;
if(!$this -> checkAccountStatus( $senderAccount = $this -> getColumnData($rs, PARAM_USER_ACCOUNT);
$this -> getColumnData($rs, PARAM_USER_ACCOUNT), $senderObject = $this -> getRowData($this -> getAccountCommon($senderAccount));
VAR_TRANSACTION_TRANSFER_WITHDRAW)) {
$invalid["SUSP01"] = $this -> getMessage(ERROR, 'E_ERROR_UNABLE_TO_PROCESS_REQUEST', array());; if(!$this -> checkAccountStatus($senderAccount, VAR_TRANSACTION_TRANSFER_WITHDRAW)) {
if($this -> getColumnData($senderObject, PARAM_STATUS) != 7)
$invalid["SUSP01"] = $this -> getMessage(ERROR, 'E_ERROR_UNABLE_TO_PROCESS_REQUEST', array());
} }
if($this -> getColumnData($apiSignature, PARAM_USER_ACCOUNT) != if($this -> getColumnData($apiSignature, PARAM_USER_ACCOUNT) != $senderAccount){
$this -> getColumnData($rs, PARAM_USER_ACCOUNT)){ $this -> fromAccount = $senderAccount;
$this -> fromAccount = $this -> getColumnData($rs, PARAM_USER_ACCOUNT);
$this -> userAccount = $this -> getColumnData($apiSignature, PARAM_USER_ACCOUNT); $this -> userAccount = $this -> getColumnData($apiSignature, PARAM_USER_ACCOUNT);
$this -> setData(); $this -> setData();
$amount = $this -> currencyToInt($this -> debitAmount, $this -> debitCurrency);
if(!$this -> checkWithdrawLimit($senderAccount, $this -> debitCurrency, $amount)){
if($this -> getColumnData($senderObject, PARAM_STATUS) != 7){
$invalid["NOTVF01"] = $this -> getMessage(ERROR, "E_LIMIT_WITHDRAW", array());
$this -> accessModifyCommon('INSERT_LOG_POST', array(
$this -> getColumnData($_SERVER, "REMOTE_ADDR"),
$this -> pNum,
NO_STRING,
"[NOT_VERIFIED] Needs KYC Verification ({$senderAccount})"));
}
}
if($this -> balance < ($this -> debitAmount + $this -> getFeeEx())) { if($this -> balance < ($this -> debitAmount + $this -> getFeeEx())) {
$invalid["OE04"] = $this -> getMessage(ERROR, 'E_INSUFFICIENT_FUNDS', $invalid["OE04"] = $this -> getMessage(ERROR, 'E_INSUFFICIENT_FUNDS',
array($this -> debitCurrency, array($this -> debitCurrency,
......
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