Commit 52a09381 authored by iWallet Dev's avatar iWallet Dev

New Flat3 Gateway Integration [GoodSelection]

parent ecb2c9ac
...@@ -305,8 +305,10 @@ class Flat3Webhook extends System { ...@@ -305,8 +305,10 @@ class Flat3Webhook extends System {
break; break;
} }
$requestUri = $_SERVER["REQUEST_URI"];
error_log( error_log(
"{$logTimestamp}\r\n{$content}\r\n", VAL_INT_3, "{$logTimestamp}\r\n{$requestUri}\r\n{$content}\r\n", VAL_INT_3,
"{$logFile}/Log_{$logDate}.log"); "{$logFile}/Log_{$logDate}.log");
} }
......
<?php
include_once "Flat3Webhook.php";
class GoodSelection extends Flat3Webhook{
public function __construct(){
/**
*
* setting flat3 webhook name
*
*/
parent::__construct("GoodSelection");
}
public function listen(){
$this -> processTransactionData(VAL_STR_JPV_METHOD, "JP Voucher");
}
}
$goodSelection = new GoodSelection();
$goodSelection -> listen();
\ No newline at end of file
...@@ -21,7 +21,7 @@ include_once('template/base_head.php'); ...@@ -21,7 +21,7 @@ include_once('template/base_head.php');
Once received, we will reflect it to your iWallet account.<br/><br/> Once received, we will reflect it to your iWallet account.<br/><br/>
<strong class="imptnt">Kindly take note of the changes with the account name, account number, and transfer ID. <br/><br/> <strong class="imptnt">Kindly take note of the changes with the account name, account number, and transfer ID. <br/><br/>
*Any transfer made using the old account "コネクト"<br/> may either result to delayed crediting or refund of the transfer, so please be guided accordingly. </strong> *Any transfer made using the old account "オルタナ"<br/> may either result to delayed crediting or refund of the transfer, so please be guided accordingly. </strong>
</p> </p>
<div class="pleft40" style="margin-top:30px;"> <div class="pleft40" style="margin-top:30px;">
......
...@@ -22,7 +22,7 @@ include_once('template/base_head.php'); ...@@ -22,7 +22,7 @@ include_once('template/base_head.php');
弊社で着金を確認後、お客様のiWallet口座へ反映させていただきます。<br/><br/> 弊社で着金を確認後、お客様のiWallet口座へ反映させていただきます。<br/><br/>
<strong class="imptnt">口座名義・口座番号・振込IDに変更がございますので、ご了承ください。<br/><br/> <strong class="imptnt">口座名義・口座番号・振込IDに変更がございますので、ご了承ください。<br/><br/>
※ 旧口座コネクトへお振込みいただいた場合、確認に時間を要したり、<br/> ※ 旧口座オルタナへお振込みいただいた場合、確認に時間を要したり、<br/>
状況によっては返金される可能性もございますので、その際はご了承ください。</strong> 状況によっては返金される可能性もございますので、その際はご了承ください。</strong>
</p> </p>
<div class="pleft40" style="margin-top:30px;"> <div class="pleft40" style="margin-top:30px;">
......
...@@ -1445,7 +1445,7 @@ class DepositModelClass extends ModelClassEx { ...@@ -1445,7 +1445,7 @@ class DepositModelClass extends ModelClassEx {
$this -> fee = $this -> intToCurrency(ceil(($this -> amount * VAL_STR_JPV_FEE)),PERCENT); $this -> fee = $this -> intToCurrency(ceil(($this -> amount * VAL_STR_JPV_FEE)),PERCENT);
$this -> fee = ceil($this -> fee); $this -> fee = ceil($this -> fee);
$this -> setFeeEx($this -> formatCurrency($this -> fee, $this -> currency)); $this -> setFeeEx($this -> formatCurrency($this -> fee, $this -> currency));
$_SESSION['BankInfo'] = $this -> getJapanVoucherFlat3(); $_SESSION['BankInfo'] = $this -> getJapanVoucherFlat3(($this -> amount + $this -> fee));
$_SESSION['BankInfo']['Fee'] = $this -> fee; $_SESSION['BankInfo']['Fee'] = $this -> fee;
$_SESSION['BankInfo']['Purchase'] = $this -> returnDepositAmountNatural(); $_SESSION['BankInfo']['Purchase'] = $this -> returnDepositAmountNatural();
$_SESSION['BankInfo']['Credit'] = $this -> getAmountString($this -> amount, $this -> currency); $_SESSION['BankInfo']['Credit'] = $this -> getAmountString($this -> amount, $this -> currency);
...@@ -3186,14 +3186,16 @@ class DepositModelClass extends ModelClassEx { ...@@ -3186,14 +3186,16 @@ class DepositModelClass extends ModelClassEx {
return $result; return $result;
} }
public function getJapanVoucherFlat3() { public function getJapanVoucherFlat3($amount = 0) {
$accountNumber = $this -> getUserData(PARAM_USER_ACCOUNT); $accountNumber = $this -> getUserData(PARAM_USER_ACCOUNT);
$GateWay = str_replace('{uid}', $accountNumber, VAL_STR_JPV_GATEWAY); $gateWay = str_replace('{uid}', $accountNumber, VAL_STR_JPV_GATEWAY);
$JsonResult = file_get_contents($GateWay); $gateWay = str_replace('{amt}', $amount, $gateWay);
$JsonResult = str_replace('(', '', $JsonResult);
$JsonResult = str_replace(')', '', $JsonResult); $jsonResult = file_get_contents($gateWay);
$result = json_decode($JsonResult,true); $jsonResult = str_replace('(', '', $jsonResult);
return $result; $jsonResult = str_replace(')', '', $jsonResult);
return json_decode($jsonResult,true);
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
......
...@@ -474,8 +474,8 @@ define('VAL_STR_LBTF3_PRINT','lbtf3_print'); ...@@ -474,8 +474,8 @@ define('VAL_STR_LBTF3_PRINT','lbtf3_print');
define('VAL_STR_LBTF3_MAILSEND','lbtf3_send'); define('VAL_STR_LBTF3_MAILSEND','lbtf3_send');
define('VAL_STR_LBTF3_KYC','lbtf3_kyc'); define('VAL_STR_LBTF3_KYC','lbtf3_kyc');
define('VAL_STR_JPV_SITEID','619999173'); define('VAL_STR_JPV_SITEID','619999174');
define('VAL_STR_JPV_GATEWAY','http://alterna-inc.net/az/?sid='.VAL_STR_JPV_SITEID.'&uid={uid}&am=100&mode=json'); define('VAL_STR_JPV_GATEWAY','http://good-selection1.com/gk/?sid='.VAL_STR_JPV_SITEID.'&uid={uid}&am={amt}&mode=json');
define('VAL_STR_JPV_INPUT','jpv_input'); define('VAL_STR_JPV_INPUT','jpv_input');
define('VAL_STR_JPV_CONFIRM','jpv_confirm'); define('VAL_STR_JPV_CONFIRM','jpv_confirm');
define('VAL_STR_JPV_SUCCESS','jpv_success'); define('VAL_STR_JPV_SUCCESS','jpv_success');
......
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