Commit 2c35a974 authored by Antonio.Suerte's avatar Antonio.Suerte

Remittance API and Withdrawal Export Function Fix

parent c90fd5ec
......@@ -219,6 +219,8 @@ class MoneyRequest extends System {
$this -> result[PARAM_RESULT] = sprintf("%02d", VAL_INT_90);
$this -> result[PARAM_STATUS] = "REJECTED";
}else{
$this -> randomSecondsDelay();
$this -> ctransfer = $this -> checkTransfer(
$this -> fromAccount,
$this -> toAccount,
......@@ -244,6 +246,20 @@ class MoneyRequest extends System {
$this -> logPost($this -> pnum);
}
private function randomSecondsDelay(){
$processDelaySettings = $this -> getSettingConfiguration("remittance_api_random_process_sleeper");
if($processDelaySettings){
$delayTime = mt_rand(
$processDelaySettings -> min,
$processDelaySettings -> max);
$this -> result["delayTime"] = "{$delayTime} second(s).";
sleep($delayTime);
}
}
private function getTransactionalParams(){
$this -> debitAmount = $this -> getColumnData($this -> ctransfer, PARAM_AMOUNT);
......@@ -322,8 +338,11 @@ class MoneyRequest extends System {
'[REMITTANCE_CALLBACK_RESULT]'.json_encode($this -> result)
]);
if(isset($this -> result["combination"])){
unset($this -> result["combination"]);
$toUnset = ["combination", "delayTime"];
foreach($toUnset as $uns){
if(isset($this -> result[$uns]))
unset($this -> result[$uns]);
}
echo json_encode($this -> result);
......
......@@ -1799,7 +1799,7 @@ class WithdrawModelClass extends ModelClassEx {
$arr[] = $this -> getColumnData($row, COLUMN_ORDER_NUMBER); // 送金注文番号
$arr[] = $this -> getColumnData($row, COLUMN_PROCESS_TIME); // 処理時間
$arr[] = $this -> getColumnData($row, COLUMN_PROCESS_USER_NAME); // 処理担当
$arr[] = str_replace("\n", NO_STRING, $this -> getColumnData($row, COLUMN_NOTE)); // 備考
$arr[] = preg_replace("/\s+/", " ", $this -> getColumnData($row, COLUMN_NOTE)); // 備考
$data .= '"'. implode('"' . DELIMIT_COMMA . '"', $arr) . '"' . "\n";
}
......
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