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
b9dc972e
Commit
b9dc972e
authored
Aug 12, 2021
by
Antonio.Suerte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Help2Pay Migration [Tester Withdrawal Data]
parent
17958994
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
35 deletions
+90
-35
connect_site.php
test/callbacks/connect_site.php
+7
-18
deposit_status.php
test/help2pay/deposit_status.php
+9
-2
test_curl_h2p_payout.php
test/help2pay/test_curl_h2p_payout.php
+36
-13
test_deposit.php
test/help2pay/test_deposit.php
+9
-2
FrameworkTest.php
test/lib/FrameworkTest.php
+29
-0
No files found.
test/callbacks/connect_site.php
View file @
b9dc972e
<?php
include_once
"../
../system/lib/config
.php"
;
include_once
"../
lib/FrameworkTest
.php"
;
class
ConnectSite
extends
System
{
class
ConnectSite
extends
FrameworkTest
{
/**
*
...
...
@@ -91,22 +91,11 @@ class ConnectSite extends System {
]);
}
$devSetting
=
$this
->
getRowData
(
$this
->
accessSelect
(
"SELECT_DEV_SETTING"
,
[
"tester_tool_conf"
]));
if
(
$this
->
isLoopData
(
$devSetting
)){
if
(
$this
->
checkJSONString
(
$this
->
getColumnData
(
$devSetting
,
"dev_setting_value"
))){
$devSetting
=
json_decode
(
$this
->
getColumnData
(
$devSetting
,
"dev_setting_value"
));
$ipAddresses
=
explode
(
","
,
$devSetting
->
ip_address
);
$remoteAddress
=
$this
->
getColumnData
(
$_SERVER
,
"REMOTE_ADDR"
);
if
(
!
in_array
(
$remoteAddress
,
$ipAddresses
)){
$validationRemarks
[]
=
json_encode
([
"code"
=>
"005"
,
"message"
=>
"Invalid IP Address:
{
$remoteAddress
}
"
]);
}
}
if
(
!
$this
->
checkRemoteAddress
()){
$validationRemarks
[]
=
json_encode
([
"code"
=>
"005"
,
"message"
=>
"Invalid IP Address:
{
$this
->
getColumnData
(
$_SERVER
,
"REMOTE_ADDR"
)
}
"
]);
}
if
(
$this
->
isLoopData
(
$validationRemarks
)){
...
...
test/help2pay/deposit_status.php
View file @
b9dc972e
<?php
include_once
'../
../system/lib/config
.php'
;
include_once
'../
lib/FrameworkTest
.php'
;
class
TestDepositStatus
extends
System
{
class
TestDepositStatus
extends
FrameworkTest
{
/**
*
...
...
@@ -86,6 +86,13 @@ class TestDepositStatus extends System {
}
}
if
(
!
$this
->
checkRemoteAddress
()){
$validationRemarks
[]
=
json_encode
([
"code"
=>
"04"
,
"message"
=>
"Invalid IP Address:
{
$this
->
getColumnData
(
$_SERVER
,
"REMOTE_ADDR"
)
}
"
]);
}
if
(
$this
->
isLoopData
(
$validationRemarks
)){
echo
"<pre>"
;
die
(
print_r
(
$validationRemarks
,
true
));
...
...
test/help2pay/test_curl_h2p_payout.php
View file @
b9dc972e
<?php
include
'../../system/lib/config.php'
;
include
_once
"../lib/FrameworkTest.php"
;
class
H2PPayoutTesting
extends
System
{
class
H2PPayoutTesting
extends
FrameworkTest
{
/**
*
* @var string
...
...
@@ -129,22 +129,36 @@ class H2PPayoutTesting extends System{
$memberAccount
=
$this
->
getRowData
(
$this
->
getAccountCommon
(
$this
->
memberCode
));
if
(
!
$this
->
getColumnData
(
$memberAccount
,
COLUMN_TEST_ACCOUNT_FLG
)){
if
(
$this
->
isLoopData
(
$memberAccount
)){
if
(
!
$this
->
getColumnData
(
$memberAccount
,
COLUMN_TEST_ACCOUNT_FLG
)){
$validationRemarks
[]
=
json_encode
([
"code"
=>
"01"
,
"message"
=>
"Member Code (
{
$this
->
memberCode
}
) is not under tester category."
]);
}
$fullName
=
"
{
$this
->
getColumnData
(
$memberAccount
,
COLUMN_FIRST_NAME
)
}
{
$this
->
getColumnData
(
$memberAccount
,
COLUMN_LAST_NAME
)
}
"
;
if
(
strcmp
(
$this
->
bankAccountName
,
$fullName
)
!==
0
){
$validationRemarks
[]
=
json_encode
([
"code"
=>
"02"
,
"message"
=>
"Member Name (
{
$this
->
bankAccountName
}
) is not correct."
]);
}
}
else
{
$validationRemarks
[]
=
json_encode
([
"code"
=>
"0
1
"
,
"message"
=>
"Member Code (
{
$this
->
memberCode
}
)
is not under tester category
."
"code"
=>
"0
3
"
,
"message"
=>
"Member Code (
{
$this
->
memberCode
}
)
doesn't exist
."
]);
}
$fullName
=
"
{
$this
->
getColumnData
(
$memberAccount
,
COLUMN_FIRST_NAME
)
}
{
$this
->
getColumnData
(
$memberAccount
,
COLUMN_LAST_NAME
)
}
"
;
if
(
strcmp
(
$this
->
bankAccountName
,
$fullName
)
!==
0
){
if
(
!
$this
->
checkRemoteAddress
()){
$validationRemarks
[]
=
json_encode
([
"code"
=>
"0
2
"
,
"message"
=>
"
Member Name (
{
$this
->
bankAccountName
}
) is not correct.
"
"code"
=>
"0
4
"
,
"message"
=>
"
Invalid IP Address:
{
$this
->
getColumnData
(
$_SERVER
,
"REMOTE_ADDR"
)
}
"
]);
}
if
(
$this
->
isLoopData
(
$validationRemarks
))
die
(
print_r
(
$validationRemarks
,
true
));
...
...
@@ -205,7 +219,7 @@ class H2PPayoutTesting extends System{
$this
->
setFeeEx
(
round
(
$exchange
[
PARAM_AMOUNT
]
*
0.02
,
VAL_INT_2
));
}
private
function
storeToTemporaryTable
(){
private
function
withdrawalProcessingData
(){
$rtn
=
[];
$rtn
[]
=
$this
->
memberCode
;
// account number(1)
...
...
@@ -240,7 +254,15 @@ class H2PPayoutTesting extends System{
$rtn
[]
=
NO_STRING
;
// Receiving bank branch code(30)
$rtn
[]
=
VAL_STR_H2P_METHOD
;
// withdraw solution (31)
$this
->
accessModify
(
'INSERT_WITHDRAW_H2P_TEMP'
,
$rtn
,
false
);
return
$rtn
;
}
private
function
storeToTemporaryTable
(){
$this
->
accessModify
(
"INSERT_WITHDRAW_H2P_TEMP"
,
$this
->
withdrawalProcessingData
(),
false
);
}
private
function
insertWithdrawalTransaction
(){
$this
->
accessModify
(
"INSERT_WITHDRAW"
,
$this
->
withdrawalProcessingData
(),
false
);
}
private
function
processPayout
(){
...
...
@@ -293,6 +315,7 @@ class H2PPayoutTesting extends System{
case
"000"
:
echo
"
\n
Successful
\n
"
;
echo
"Result:
{
$xmlResult
->
message
}
"
;
$this
->
insertWithdrawalTransaction
();
break
;
default
:
echo
"Result:
{
$xmlResult
->
message
}
"
;
...
...
test/help2pay/test_deposit.php
View file @
b9dc972e
<?php
include_once
'../
../system/lib/config
.php'
;
include_once
'../
lib/FrameworkTest
.php'
;
class
TestDeposit
extends
System
{
class
TestDeposit
extends
FrameworkTest
{
/**
*
...
...
@@ -177,6 +177,13 @@ class TestDeposit extends System {
]);
}
if
(
!
$this
->
checkRemoteAddress
()){
$validationRemarks
[]
=
json_encode
([
"code"
=>
"04"
,
"message"
=>
"Invalid IP Address:
{
$this
->
getColumnData
(
$_SERVER
,
"REMOTE_ADDR"
)
}
"
]);
}
if
(
$this
->
isLoopData
(
$validationRemarks
)){
echo
"<pre>"
;
die
(
print_r
(
$validationRemarks
,
true
));
...
...
test/lib/FrameworkTest.php
0 → 100644
View file @
b9dc972e
<?php
include
"../../system/lib/config.php"
;
class
FrameworkTest
extends
System
{
public
function
__construct
(){
parent
::
__construct
();
}
public
function
checkRemoteAddress
(){
$devSetting
=
$this
->
getRowData
(
$this
->
accessSelect
(
"SELECT_DEV_SETTING"
,
[
"tester_tool_conf"
]));
if
(
$this
->
isLoopData
(
$devSetting
)){
if
(
!
$this
->
getColumnData
(
$devSetting
,
"dev_setting_enabled"
))
return
true
;
if
(
$this
->
checkJSONString
(
$this
->
getColumnData
(
$devSetting
,
"dev_setting_value"
))){
$devSetting
=
json_decode
(
$this
->
getColumnData
(
$devSetting
,
"dev_setting_value"
));
$ipAddresses
=
explode
(
","
,
$devSetting
->
ip_address
);
$remoteAddress
=
$this
->
getColumnData
(
$_SERVER
,
"REMOTE_ADDR"
);
if
(
in_array
(
$remoteAddress
,
$ipAddresses
))
return
true
;
}
}
return
false
;
}
}
\ No newline at end of file
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