Commit 5c9c35f9 authored by iWallet Dev's avatar iWallet Dev

Flat3 Withdrawal Enhancement

parent 51c66b6b
......@@ -26,7 +26,7 @@ include_once('template/base_head.php');
</tr>
<tr>
<th>Fee</th>
<td><?php $this -> echoDebitCurrency(); ?> <?php $this -> dispFee(); ?></td>
<td><?php $this -> echoDrawFeeCurrency(); ?> <?php $this -> echoDrawFee(); ?></td>
</tr>
<tr>
<th>Account Number or IBAN</th>
......
......@@ -109,6 +109,8 @@ include_once('template/base_head.php');
</form>
<strong>Note:</strong>
<ol class="ol_list ml50">
<li>The fee is 0.50% of the withdrawal amount per transaction (minimum of <strong>35.00 USD</strong> equivalent in JPY rate at the time of transaction: <span class="red">JPY <strong><span id="stdF3FXfee"></span></strong></span>)</li>
<li>The minimum application amount is 85.00 USD per transaction or the equivalent amount in other currencies (withdrawals can only be applied if the account has a balance of $120 and above, excluding the fee indicated)</li>
<li>Name must be written in Katakana characters.</li>
<li>This service only supports "Savings Account".</li>
<li>For non-savings bank account type or incorrect bank details, your request will be cancelled and a refund fee will be applied.</li>
......
......@@ -26,7 +26,7 @@ include_once('template/base_head.php');
</tr>
<tr>
<th>手数料</th>
<td><?php $this -> echoDebitCurrency(); ?> <?php $this -> dispFee(); ?></td>
<td><?php $this -> echoDrawFeeCurrency(); ?> <?php $this -> echoDrawFee(); ?></td>
</tr>
<tr>
<th>口座番号またはIBAN</th>
......
......@@ -110,6 +110,8 @@ include_once('template/base_head.php');
</form>
<strong>注意事項</strong>
<ol class="ol_list ml50">
<li>手数料は、取引一回につきご出金額の0.50%(最小 <strong>35.00USD</strong> ※取引時点のJPYレートで:<span class="red">JPY <strong><span id="stdF3FXfee"></span></strong></span> )</li>
<li>最小申請金額は、取引一回につき85.00USDまたは他の通貨での同等額(手数料プラスで$120以上の残高で出金申請可能)になります。</li>
<li>口座名義はカタカナで記入してください。</li>
<li>本サービスは【普通口座】のみ対応しております。</li>
<li>普通口座以外または銀行情報をお間違えの場合は、送金依頼は取り消され、組み戻し手数料が発生します。</li>
......
......@@ -659,4 +659,18 @@ $(function() {
});
}
if($("#stdF3FXfee").length === 1){
$.ajax({
"url":"../api/Exchange.php",
"type":"POST",
"data":{
"from":"USD",
"to":"JPY",
"amount":35.0
},
dataType:"json"
}).done(function(data){
$("#stdF3FXfee").html(data.publish_amount)
})
}
});
......@@ -34,6 +34,8 @@ class WithdrawModelClass extends ModelClassEx {
private $fromCurrency = NO_STRING; // From通貨
private $debitCurrency = NO_STRING; // 引落通貨
private $debitAmount = NO_STRING; // 引落金額
private $drawFee = NO_COUNT; // 引落金額
private $drawFeeCurrency = NO_STRING; // 引落通貨
private $fee = NO_STRING; // 引落金額
private $addressTextArray = null; //contains array('beneficiary address', 'bank address') based on language
private $moneyoutSolution = NO_STRING; //moneyout solution selected
......@@ -516,9 +518,12 @@ class WithdrawModelClass extends ModelClassEx {
}, $this -> administrativeExceptions);
if(!in_array($this -> getUserData(PARAM_USER_ACCOUNT), $accounts)){
if($this -> getFeeEx() < $flat3Fee)
if($this -> getFeeEx() < $flat3Fee){
$this -> setFeeEx($flat3Fee);
}
$this -> arrangeMinimumFee();
}
}
}
......@@ -1207,6 +1212,24 @@ class WithdrawModelClass extends ModelClassEx {
echo $this -> dispCurrencyOptionList($this -> currency, false);
}
/*-------------------------------------------------------------------------
* @function_name: 手数料
* @parameter : なし
* @return :
-------------------------------------------------------------------------*/
public function echoDrawFee(){
echo $this -> drawFee;
}
/*-------------------------------------------------------------------------
* @function_name: 手数料
* @parameter : なし
* @return :
-------------------------------------------------------------------------*/
public function echoDrawFeeCurrency(){
echo $this -> drawFeeCurrency;
}
/*-------------------------------------------------------------------------
* @function_name: 金額の取得
* @parameter : なし
......@@ -1566,6 +1589,54 @@ class WithdrawModelClass extends ModelClassEx {
echo $this -> debitCurrency;
}
/*-------------------------------------------------------------------------
* @function_name: 最小手数料の指定
* @parameter :
* @return :
-------------------------------------------------------------------------*/
private function arrangeMinimumFee(){
$minimumFee = VAL_INT_35;
$this -> drawFeeCurrency = JPY;
$transactionFee = $this -> convertedFee($this -> debitCurrency, USD, $this -> getFeeEx());
if($transactionFee["published_amount"] < $minimumFee){
// antonius gaming 2023
$standardJPYFee = $this -> convertedFee(USD, JPY, $minimumFee);
$transactionFee = $this -> convertedFee(USD, $this -> debitCurrency, $minimumFee);
$this -> setFeeEx($transactionFee["published_amount"]);
}else{
$standardJPYFee = $this -> convertedFee(USD, JPY, $transactionFee["published_amount"]);
}
$this -> drawFee = $standardJPYFee["published_amount"];
}
/*-------------------------------------------------------------------------
* @function_name: 手数料の両替
* @parameter : from, to, amount
* @return : 引落口座通貨
-------------------------------------------------------------------------*/
private function convertedFee($from, $to, $amount){
$exchange = $this -> getExchangeCommon($amount,
$from,
$to,
false,
true,
NO_STRING,
$this -> getUserData(PARAM_USER_ACCOUNT));
$rtn = [
"parameter" => $amount,
"conversion_currency" => $to,
"original_amount" => $exchange[PARAM_ORIGINAL_AMOUNT],
"published_amount" => $exchange[PARAM_AMOUNT]
];
return $rtn;
}
/*-------------------------------------------------------------------------
* @function_name: 引落口座通貨の取得
* @parameter : なし
......@@ -1727,6 +1798,8 @@ class WithdrawModelClass extends ModelClassEx {
// 変数宣言部
$rtn = array();
$this -> arrangeMinimumFee();
$rtn[] = $this -> getUserData(PARAM_USER_ACCOUNT); // 口座番号(1)
$rtn[] = $this -> currency; // 通貨(2)
$rtn[] = $this -> currencyToInt($this -> amount, $this -> currency); // 金額(3)
......@@ -1755,9 +1828,11 @@ class WithdrawModelClass extends ModelClassEx {
$rtn[] = $this -> currencyToInt($this -> debitAmount, $this -> debitCurrency); // 引落口座金額(26)
$rtn[] = $this -> getRateEx(); // レート(27)
$rtn[] = $this -> currencyToInt($this -> getFeeEx(), $this -> debitCurrency); // 手数料(28)
$rtn[] = $this -> getTransactionNumberCommon(VAR_TRANSACTION_WITHDRAW); // 取引番号(29)
$rtn[] = $this -> receiptBranchCode; // 受取銀行支店コード(30)
$rtn[] = $_SESSION['moneyoutSolution']; // withdraw solution (31)
$rtn[] = $this -> drawFeeCurrency; // 通貨(29)
$rtn[] = $this -> drawFee; // 手数料(30)
$rtn[] = $this -> getTransactionNumberCommon(VAR_TRANSACTION_WITHDRAW); // 取引番号(31)
$rtn[] = $this -> receiptBranchCode; // 受取銀行支店コード(32)
$rtn[] = $_SESSION['moneyoutSolution']; // withdraw solution (33)
return $rtn;
}
......
......@@ -90,6 +90,8 @@ define('COLUMN_WITHDRAW_AMOUNT', 'withdraw_amount');
define('COLUMN_WITHDRAW_FEE', 'withdraw_fee');
define('COLUMN_DEPOSIT_AMOUNT', 'deposit_amount');
define('COLUMN_DEPOSIT_FEE', 'deposit_fee');
define('COLUMN_DRAW_FEE', "draw_fee");
define('COLUMN_DRAW_FEE_CURRENCY', "draw_fee_currency");
define('COLUMN_RATE', 'rate');
define('COLUMN_ORIGINAL_RATE', 'original_rate');
define('COLUMN_DEPOSIT_BANK', 'deposit_bank');
......
......@@ -2159,6 +2159,8 @@
, debit_amount
, rate
, fee
, draw_fee_currency
, draw_fee
, transaction_number
, receipt_branch_code
, withdraw_solution
......@@ -2195,6 +2197,8 @@
, '__ELEMENT29__'
, '__ELEMENT30__'
, '__ELEMENT31__'
, '__ELEMENT32__'
, '__ELEMENT33__'
, CONVERT_TZ(NOW(),@@session.time_zone,'+09:00')
)
</INSERT_WITHDRAW>
......@@ -3264,6 +3268,8 @@
, trans.deposit_amount AS deposit_amount
, trans.deposit_fee AS deposit_fee
, trans.rate AS rate
, trans.draw_fee AS draw_fee
, trans.draw_fee_currency AS draw_fee_currency
, trans.debit_currency AS debit_currency
, trans.debit_amount AS debit_amount
, trans.type AS type
......@@ -3283,6 +3289,8 @@
, '' AS withdraw_fee
, amount AS deposit_amount
, fee AS deposit_fee
, 0 AS draw_fee
, '' AS draw_fee_currency
, '' AS rate
, currency AS deposit_currency
, '' AS withdraw_currency
......@@ -3309,6 +3317,8 @@
, fee AS withdraw_fee
, '' AS deposit_amount
, '' AS deposit_fee
, draw_fee AS draw_fee
, draw_fee_currency AS draw_fee_currency
, rate AS rate
, '' AS deposit_currency
, currency AS withdraw_currency
......@@ -3338,6 +3348,8 @@
, from_fee AS withdraw_fee
, transfer_amount AS deposit_amount
, to_fee AS deposit_fee
, 0 AS draw_fee
, '' AS draw_fee_currency
, '' AS rate
, to_currency AS deposit_currency
, debit_currency AS withdraw_currency
......@@ -3363,6 +3375,8 @@
, 0 AS withdraw_fee
, amount AS deposit_amount
, 0 AS deposit_fee
, 0 AS draw_fee
, '' AS draw_fee_currency
, rate AS rate
, currency AS deposit_currency
, debit_currency AS withdraw_currency
......@@ -3387,6 +3401,8 @@
, from_fee AS withdraw_fee
, amount AS deposit_amount
, to_fee AS deposit_fee
, 0 AS draw_fee
, '' AS draw_fee_currency
, '' AS rate
, currency AS deposit_currency
, debit_currency AS withdraw_currency
......@@ -3411,6 +3427,8 @@
, '' AS withdraw_fee
, debit_amount AS deposit_amount
, (fee + fee_refund) AS deposit_fee
, draw_fee AS draw_fee
, draw_fee_currency AS draw_fee_currency
, '' AS rate
, debit_currency AS deposit_currency
, '' AS withdraw_currency
......@@ -3437,6 +3455,8 @@
, '' AS withdraw_fee
, debit_amount AS deposit_amount
, (fee) AS deposit_fee
, draw_fee AS draw_fee
, draw_fee_currency AS draw_fee_currency
, '' AS rate
, debit_currency AS deposit_currency
, '' AS withdraw_currency
......@@ -3463,6 +3483,8 @@
, (fee) AS withdraw_fee
, debit_amount AS deposit_amount
, '' AS deposit_fee
, draw_fee AS draw_fee
, draw_fee_currency AS draw_fee_currency
, '' AS rate
, debit_currency AS deposit_currency
, '' AS withdraw_currency
......
......@@ -316,6 +316,7 @@ class TransactionModelClass extends ModelClassEx {
$debitCur = NO_STRING;
$debitAmount = NO_STRING;
$pStatus = NO_STRING;
$fee = NO_STRING;
if($this -> isLoopData($this -> rs)) {
......@@ -323,9 +324,6 @@ class TransactionModelClass extends ModelClassEx {
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$end = $this -> getTargetPage() * VAR_DEFAULT_PAGE_COUNT;
$listCount = count($this -> rs);
// for($cnt = $start; $cnt < $end && $cnt < $listCount; $cnt++) {
// $row = $this -> getRowData($this -> rs, $cnt);
foreach($this -> rs as $row) {
// 処理種別
......@@ -338,6 +336,7 @@ class TransactionModelClass extends ModelClassEx {
$withdraw = NO_STRING;
$tNumber = $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER);
$transId = $this -> getColumnData($row, COLUMN_TRANSACTION_ID);
$fee = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur);
} else if($row[COLUMN_TRANSACTION_TYPE] == VAL_INT_2
&& $this -> getColumnData($row, COLUMN_TYPE) == VAR_WITHDRAW_TYPE_NORMAL) { // 通常出金
......@@ -350,8 +349,15 @@ class TransactionModelClass extends ModelClassEx {
$deposit = NO_STRING;
$withdraw = $this -> getAmountString($this -> getColumnData($row, COLUMN_DEBIT_AMOUNT), $withdrawCur) . '(' . $debitCur . DELIMIT_SPACE . $debitAmount . ')';
$tNumber = $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER);
$transId = $this -> getColumnData($row, COLUMN_TRANSACTION_ID);
$drawFeeCurrency = $this -> getColumnData($row, COLUMN_DRAW_FEE_CURRENCY);
$drawFee = $this -> getAmountString($this -> getColumnData($row, COLUMN_DRAW_FEE), $drawFeeCurrency);
$fee = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur);
$fee = "{$fee} ({$drawFeeCurrency} {$drawFee})";
} else if($row[COLUMN_TRANSACTION_TYPE] == VAL_INT_2
&& $this -> getColumnData($row, COLUMN_TYPE) == VAR_WITHDRAW_TYPE_CARD) { // 通常出金
......@@ -365,6 +371,7 @@ class TransactionModelClass extends ModelClassEx {
$withdraw = $this -> getAmountString($this -> getColumnData($row, COLUMN_DEBIT_AMOUNT), $withdrawCur) . '(' . $debitCur . DELIMIT_SPACE . $debitAmount . ')';
$tNumber = $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER);
$transId = $this -> getColumnData($row, COLUMN_TRANSACTION_ID);
$fee = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur);
} else if($this -> getColumnData($row, COLUMN_TRANSACTION_TYPE) == VAL_INT_4) { // 通貨両替
$tType = VAL_STR_EXCHANGE;
......@@ -374,6 +381,7 @@ class TransactionModelClass extends ModelClassEx {
$withdraw = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_AMOUNT), $withdrawCur);
$tNumber = $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER);
$transId = $this -> getColumnData($row, COLUMN_TRANSACTION_ID);
$fee = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur);
} else if($row[COLUMN_TRANSACTION_TYPE] == VAL_INT_2
&& $this -> getColumnData($row, COLUMN_TYPE) == VAR_WITHDRAW_TYPE_FEE) { // 手数料出金
......@@ -384,6 +392,7 @@ class TransactionModelClass extends ModelClassEx {
$withdraw = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_AMOUNT), $withdrawCur);
$tNumber = $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER);
$transId = $this -> getColumnData($row, COLUMN_TRANSACTION_ID);
$fee = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur);
} else if($row[COLUMN_TRANSACTION_TYPE] == VAL_INT_3) { // 口座振替(出金)
$tType = VAL_STR_TRANSFER;
......@@ -393,6 +402,7 @@ class TransactionModelClass extends ModelClassEx {
$withdraw = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_AMOUNT), $withdrawCur);
$tNumber = $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER);
$transId = $this -> getColumnData($row, COLUMN_TRANSACTION_ID) ;
$fee = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur);
} else if($this -> getColumnData($row, COLUMN_TRANSACTION_TYPE) == VAL_INT_5) { // 引落(出金)
$tType = VAL_STR_REQUEST;
......@@ -402,6 +412,7 @@ class TransactionModelClass extends ModelClassEx {
$withdraw = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_AMOUNT), $withdrawCur);
$tNumber = $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER);
$transId = $this -> getColumnData($row, COLUMN_TRANSACTION_ID);
$fee = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur);
} else if($this -> getColumnData($row, COLUMN_TRANSACTION_TYPE) == VAL_INT_7
|| $this -> getColumnData($row, COLUMN_TRANSACTION_TYPE) == VAL_INT_8) { // 出金差戻し
......@@ -413,6 +424,7 @@ class TransactionModelClass extends ModelClassEx {
$withdraw = NO_STRING;
$tNumber = $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER);
$transId = $this -> getColumnData($row, COLUMN_TRANSACTION_ID);
$fee = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur);
} else if($this -> getColumnData($row, COLUMN_TRANSACTION_TYPE) == VAL_INT_11) { // 出金差戻し
$tType = VAL_STR_FEE;
......@@ -422,6 +434,7 @@ class TransactionModelClass extends ModelClassEx {
$withdraw = $this -> getAmountString($this -> getColumnData($row, COLUMN_FEE), $withdrawCur);
$tNumber = $this -> getColumnData($row, COLUMN_TRANSACTION_NUMBER);
$transId = $this -> getColumnData($row, COLUMN_TRANSACTION_ID);
$fee = $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur);
} else {
$tType = NO_STRING;
}
......@@ -441,16 +454,13 @@ class TransactionModelClass extends ModelClassEx {
$rtn .= '<tr>'
. '<td>' . $this -> getColumnData($row, COLUMN_TRANSACTION_TIME) . '</td>'
//. '<td>'. $transId .'' . $tNumber . '</a></td>'
. '<td><a href="javascript:void(0);" onclick="javascript:actionDetail(\'' . $this -> getColumnData($row, COLUMN_TRANSACTION_ID) . '\', \'_blank\', '. $row[COLUMN_TRANSACTION_TYPE] .');">' . $tNumber . '</td>'
. '<td>' . $tType . '</td>'
// . '<td><a href="javascript:userDetail(\'' . $this -> getColumnData($row, COLUMN_WITHDRAW_ACCOUNT_NUMBER) . '\', \'_blank\');">' . $this -> getColumnData($row, COLUMN_WITHDRAW_ACCOUNT_NAME) . '</a></td>'
. '<td><a href="account_edit?detail_account=' . $this -> getColumnData($row, COLUMN_WITHDRAW_ACCOUNT_NUMBER) . '">'. $this -> getColumnData($row, COLUMN_WITHDRAW_ACCOUNT_NAME) .'</a></td>'
. '<td>' . $this -> getColumnData($row, COLUMN_WITHDRAW_ACCOUNT_NUMBER) . '</td>'
. '<td>' . $withdrawCur . '</td>'
. '<td class="r">' . $withdraw . '</td>'
. '<td class="r">' . $this -> getAmountString($this -> getColumnData($row, COLUMN_WITHDRAW_FEE), $withdrawCur) . '</td>'
// . '<td><a href="javascript:userDetail(\'' . $this -> getColumnData($row, COLUMN_DEPOSIT_ACCOUNT_NUMBER) . '\', \'_blank\');">' . $this -> getColumnData($row, COLUMN_DEPOSIT_ACCOUNT_NAME) . '</a></td>'
. '<td class="r">' . $fee . '</td>'
. '<td><a href="account_edit?detail_account=' . $this -> getColumnData($row, COLUMN_DEPOSIT_ACCOUNT_NUMBER) . '">'. $this -> getColumnData($row, COLUMN_DEPOSIT_ACCOUNT_NAME) .'</a></td>'
. '<td>' . $this -> getColumnData($row, COLUMN_DEPOSIT_ACCOUNT_NUMBER) . '</td>'
. '<td>' . $depositCur . '</td>'
......
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