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
c9fa4fc6
Commit
c9fa4fc6
authored
Aug 13, 2021
by
Antonio.Suerte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Help2Pay Migration [Withdrawal Webhook Validation Enhancement]
parent
435afa02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
52 deletions
+50
-52
H2PWithdrawalWebhook.php
api/H2PWithdrawalWebhook.php
+50
-52
No files found.
api/H2PWithdrawalWebhook.php
View file @
c9fa4fc6
...
@@ -108,67 +108,65 @@ class H2PWithdrawalWebhook extends System {
...
@@ -108,67 +108,65 @@ class H2PWithdrawalWebhook extends System {
//log the access details
//log the access details
$this
->
logEvent
(
"Accessed:
{
$response
}
"
,
VAL_INT_1
);
$this
->
logEvent
(
"Accessed:
{
$response
}
"
,
VAL_INT_1
);
if
(
$this
->
transactionNum
!=
NO_STRING
&&
$this
->
transactionKey
!=
NO_STRING
){
if
(
$this
->
transactionNum
!=
NO_STRING
&&
$this
->
transactionKey
!=
NO_STRING
){
$result
=
$this
->
getRowData
(
$this
->
accessSelect
(
'SELECT_WITHDRAW_H2P_TEMP'
,
array
(
$this
->
transactionNum
)));
$result
=
$this
->
getRowData
(
$this
->
accessSelect
(
'SELECT_WITHDRAW_H2P_TEMP'
,
array
(
$this
->
transactionNum
)));
if
(
$this
->
isLoopData
(
$result
)){
if
(
$this
->
isLoopData
(
$result
)){
$resultData
=
print_r
(
$result
,
true
);
$resultData
=
print_r
(
$result
,
true
);
$this
->
logEvent
(
"Withdrawal Transaction Data:
{
$resultData
}
"
,
VAL_INT_1
);
$this
->
logEvent
(
"Withdrawal Transaction Data:
{
$resultData
}
"
,
VAL_INT_1
);
$memberCode
=
$this
->
getColumnData
(
$result
,
COLUMN_USER_ACCOUNT
);
$memberCode
=
$this
->
getColumnData
(
$result
,
COLUMN_USER_ACCOUNT
);
$bankCode
=
$this
->
getColumnData
(
$result
,
COLUMN_RECEIPT_BANK_NAME
);
$bankCode
=
$this
->
getColumnData
(
$result
,
COLUMN_RECEIPT_BANK_NAME
);
$language
=
$this
->
getColumnData
(
$result
,
COLUMN_LANGUAGE
);
$language
=
$this
->
getColumnData
(
$result
,
COLUMN_LANGUAGE
);
if
(
strcasecmp
(
$this
->
transactionKey
,
$this
->
getColumnData
(
$result
,
"api_key"
))
===
0
){
$param
=
[];
$param
=
[];
if
(
$this
->
memberCode
==
$memberCode
){
$param
[]
=
$this
->
transactionNum
;
$param
[]
=
$response
.
'Bank_code:'
.
$bankCode
;
if
(
$this
->
memberCode
==
$memberCode
){
switch
(
$this
->
status
){
$param
[]
=
$this
->
transactionNum
;
case
"000"
:
$param
[]
=
$response
.
'Bank_code:'
.
$bankCode
;
//update withdraw
$param
[]
=
VAL_INT_2
;
switch
(
$this
->
status
){
$this
->
accessModifyCommon
(
'UPDATE_WITHDRAW_H2P_STATUS'
,
$param
);
case
"000"
:
$this
->
accessModifyCommon
(
'UPDATE_WITHDRAW_H2P_TEMP_STATUS'
,
$param
);
//update withdraw
$param
[]
=
VAL_INT_2
;
$this
->
sendMailByTmp
(
$this
->
accessModifyCommon
(
'UPDATE_WITHDRAW_H2P_STATUS'
,
$param
);
"
{
$language
}
/withdraw_h2p_success.xml"
,
$this
->
accessModifyCommon
(
'UPDATE_WITHDRAW_H2P_TEMP_STATUS'
,
$param
);
$this
->
emailParams
(
$this
->
status
,
$result
),
$this
->
getUserEMailCommon
(
$memberCode
),
$this
->
sendMailByTmp
(
VAR_CS_MAIL_ADDRESS
"
{
$language
}
/withdraw_h2p_success.xml"
,
);
$this
->
emailParams
(
$this
->
status
,
$result
),
$this
->
getUserEMailCommon
(
$memberCode
),
$this
->
logEvent
(
"success status:
\r\n\r\n
{
$response
}
"
,
VAL_INT_3
);
VAR_CS_MAIL_ADDRESS
break
;
);
case
"001"
:
//update withdraw
$this
->
logEvent
(
"success status:
\r\n\r\n
{
$response
}
"
,
VAL_INT_3
);
$param
[]
=
VAL_INT_5
;
break
;
$this
->
accessModifyCommon
(
'UPDATE_WITHDRAW_H2P_STATUS'
,
$param
);
case
"001"
:
$this
->
accessModifyCommon
(
'UPDATE_WITHDRAW_H2P_TEMP_STATUS'
,
$param
);
//update withdraw
$param
[]
=
VAL_INT_5
;
$this
->
sendMailByTmp
(
"
{
$language
}
/withdraw_h2p_fail.xml"
,
$this
->
accessModifyCommon
(
'UPDATE_WITHDRAW_H2P_STATUS'
,
$param
);
$this
->
emailParams
(
$this
->
status
,
$result
),
$this
->
accessModifyCommon
(
'UPDATE_WITHDRAW_H2P_TEMP_STATUS'
,
$param
);
$this
->
getUserEMailCommon
(
$memberCode
),
VAR_CS_MAIL_ADDRESS
$this
->
sendMailByTmp
(
"
{
$language
}
/withdraw_h2p_fail.xml"
,
);
$this
->
emailParams
(
$this
->
status
,
$result
),
$this
->
getUserEMailCommon
(
$memberCode
),
$this
->
logEvent
(
"nFailed Status:
\r\n\r\n
{
$response
}
"
,
VAL_INT_2
);
VAR_CS_MAIL_ADDRESS
break
;
);
default
:
//error, status not valid
$this
->
logEvent
(
"nfail status:
\r\n\r\n
{
$response
}
"
,
VAL_INT_2
);
$this
->
logEvent
(
"Invalid Status Code:
\r\n\r\n
{
$response
}
\r\n
{
$this
->
status
}
"
,
VAL_INT_2
);
break
;
break
;
default
:
}
//error, status not valid
$this
->
logEvent
(
"Error status code invalid:
\r\n\r\n
{
$response
}
\r\n
{
$this
->
status
}
"
,
VAL_INT_2
);
break
;
}
}
else
{
//error, member code not valid
$this
->
logEvent
(
"Error member code invalid:
{
$memberCode
}
"
,
VAL_INT_2
);
}
}
else
{
}
else
{
//error, status not valid
//error, member code not valid
$this
->
logEvent
(
"Key invalid:
\r\n\r\n
{
$response
}
"
,
VAL_INT_2
);
$this
->
logEvent
(
"Invalid Member Code:
{
$this
->
memberCode
}
"
,
VAL_INT_2
);
}
}
}
else
{
//error, transaction num not valid
$this
->
logEvent
(
"Invalid Transaction Number:
\r\n\r\n
{
$this
->
transactionNum
}
"
,
VAL_INT_2
);
}
}
}
}
}
}
...
...
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