Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
TimeOut
TimeOutAdmin
Commits
70592bbd
Commit
70592bbd
authored
5 years ago
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev_production'
dc See merge request
!313
parents
47f71938
5436e572
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
Api.php
application/controllers/Api.php
+12
-9
No files found.
application/controllers/Api.php
View file @
70592bbd
...
@@ -772,7 +772,7 @@ class Api extends CI_Controller {
...
@@ -772,7 +772,7 @@ class Api extends CI_Controller {
$res
=
$this
->
Api_model
->
payNow
(
$payData
);
$res
=
$this
->
Api_model
->
payNow
(
$payData
);
if
(
$res
[
'status'
]
==
1
){
if
(
$res
[
'status'
]
==
1
){
$params
=
array
(
'amount'
=>
0.0
1
,
'last_id'
=>
$res
[
'transaction_id'
],
'event_id'
=>
'ADD_CARD'
,
$params
=
array
(
'amount'
=>
1
,
'last_id'
=>
$res
[
'transaction_id'
],
'event_id'
=>
'ADD_CARD'
,
'booking_id'
=>
'ADD_CARD'
,
'custData'
=>
$res
[
'custData'
],
'cardData'
=>
$reqData
);
'booking_id'
=>
'ADD_CARD'
,
'custData'
=>
$res
[
'custData'
],
'cardData'
=>
$reqData
);
$reqData
=
$this
->
encrypt
(
json_encode
(
$params
),
$this
->
local_key
,
$this
->
local_iv
);
$reqData
=
$this
->
encrypt
(
json_encode
(
$params
),
$this
->
local_key
,
$this
->
local_iv
);
...
@@ -818,16 +818,19 @@ class Api extends CI_Controller {
...
@@ -818,16 +818,19 @@ class Api extends CI_Controller {
curl_setopt
(
$ch
,
CURLOPT_HTTPHEADER
,
array
(
'Content-Type: application/x-www-form-urlencoded'
));
curl_setopt
(
$ch
,
CURLOPT_HTTPHEADER
,
array
(
'Content-Type: application/x-www-form-urlencoded'
));
$result
=
curl_exec
(
$ch
);
$result
=
curl_exec
(
$ch
);
if
(
!
empty
(
$result
)){
if
(
empty
(
$result
)){
// $this->errorResponse('892','Invalid Card Data');
$this
->
errorResponse
(
'892'
,
'Invalid Card Data'
);
$this
->
response
(
array
(
'message'
=>
'SUCCESS'
));
}
}
// $resp = $this->decryptePayData($merchant_iv,$merchant_key,$result);
$resp
=
$this
->
decryptePayData
(
$merchant_iv
,
$merchant_key
,
$result
);
// if(empty($resp) || isset($resp->status) || $resp->status != 'SUCCESS'){
if
(
!
empty
(
$resp
)
&&
isset
(
$resp
->
status
)
&&
isset
(
$resp
->
statusMessage
)){
$this
->
errorResponse
(
'893'
,
'No Card Found'
);
if
(
$resp
->
status
==
'SUCCESS'
){
// }
$this
->
response
(
array
(
'message'
=>
$resp
->
statusMessage
));
// $this->response(array('message'=>$resp->statusMessage));
}
else
{
$this
->
errorResponse
(
'893'
,
$resp
->
statusMessage
);
}
}
$this
->
errorResponse
(
'892'
,
'Invalid Card Data'
);
}
}
function
hotelBooking
(){
function
hotelBooking
(){
...
...
This diff is collapsed.
Click to expand it.
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