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
aab1308e
Commit
aab1308e
authored
Jan 22, 2020
by
Jansa Jose
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.techware.co.in/timeout/timeOut
into jansa
parents
bb3fe290
76f70e67
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
17 deletions
+20
-17
Api.php
application/controllers/Api.php
+17
-15
Webservice_model.php
application/models/Webservice_model.php
+2
-1
promocodeList.php
application/views/Promocode/promocodeList.php
+1
-1
No files found.
application/controllers/Api.php
View file @
aab1308e
...
...
@@ -448,8 +448,8 @@ class Api extends CI_Controller {
$cvv
=
$cardData
[
'cvv'
];
$cardNo
=
$cardData
[
'cardNumber'
];
$holder
=
$cardData
[
'cardHolderName'
];
$cardType
=
$cardData
[
'cardType'
];
$cardMode
=
$cardData
[
'cardMode'
];
$cardType
=
(
$cardMode
==
'DD'
)
?
'MADA'
:
$cardData
[
'cardType'
];
$expMonth
=
substr
(
$cardData
[
'expMonthYear'
],
0
,
2
);
$expYear
=
'20'
.
substr
(
$cardData
[
'expMonthYear'
],
2
,
2
);
$saveCard
=
(
isset
(
$cardData
[
'saveCard'
])
&&
$cardData
[
'saveCard'
]
==
0
)
?
0
:
1
;
...
...
@@ -460,9 +460,10 @@ class Api extends CI_Controller {
$failureUrl
=
base_url
(
'Api/paymentFailureUrl'
);
$successUrl
=
base_url
(
'Api/paymentSuccessUrl'
);
$pText
=
'1111110||'
;
$pText
.=
'11111111|'
.
$last_id
.
'|'
.
$amount
.
'|'
.
$successUrl
.
'|'
.
$failureUrl
.
'|INTERNET|'
.
$cardMode
.
'
|01|SAR||'
;
$saveFlag
=
(
$saveCard
==
1
)
?
'1'
:
'0'
;
$pText
=
'11111'
.
$saveFlag
.
'0||'
;
$pText
.=
'11111111|'
.
$last_id
.
'|'
.
$amount
.
'|'
.
$successUrl
.
'|'
.
$failureUrl
.
'|INTERNET|'
.
$cardMode
.
'|01|SAR||'
;
$pText
.=
'1111111111111|'
.
$f_Name
.
'|'
.
$l_Name
.
'|'
.
$add1
.
'|'
.
$add2
.
'|'
.
$city
.
'|'
.
$state
.
'|'
.
$pincode
.
'|SA|'
.
$email
.
'|'
.
$phone
.
'|34|344|34355344||'
;
$pText
.=
'111111111111|'
.
$f_Name
.
'|'
.
$l_Name
.
'|'
.
$add1
.
'|'
.
$add2
.
'|'
.
$city
.
'|'
.
$state
.
'|'
.
$pincode
.
...
...
@@ -472,11 +473,9 @@ class Api extends CI_Controller {
}
else
{
$pText
.=
'11111100000|'
.
$cardNo
.
'|'
.
$expMonth
.
'|'
.
$expYear
.
'|'
.
$cvv
.
'|'
.
$holder
.
'|'
.
$cardType
.
'||'
;
}
$pText
.=
'1110000|'
.
$last_id
.
'|'
.
$event_id
.
'|'
.
$booking_id
.
'||'
;
$pText
.=
'1110000|'
.
$last_id
.
'|'
.
$event_id
.
'|'
.
$booking_id
;
if
(
$saveCard
==
1
){
$pText
.=
'1000000|'
.
$userId
;
}
else
{
$pText
.=
'0000000'
;
$pText
.=
'||1000000|'
.
$userId
;
}
$settings
=
getSettings
();
...
...
@@ -618,7 +617,8 @@ class Api extends CI_Controller {
$res
=
$this
->
Api_model
->
reset_password
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
$this
->
response
(
$res
[
'data'
]);
}
else
{
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
...
...
@@ -633,7 +633,8 @@ class Api extends CI_Controller {
$res
=
$this
->
Api_model
->
checkSeatAvailability
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
$this
->
response
(
$res
[
'data'
]);
}
else
{
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
...
...
@@ -642,7 +643,8 @@ class Api extends CI_Controller {
$res
=
$this
->
Api_model
->
getCountry
();
if
(
$res
[
'status'
]
!=
0
){
$this
->
response
(
$res
[
'data'
]);
}
else
{
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
...
...
@@ -685,19 +687,19 @@ class Api extends CI_Controller {
$result
=
curl_exec
(
$ch
);
if
(
empty
(
$result
)){
$this
->
errorResponse
(
'892'
,
'
Something went wrong, Please try again
'
);
$this
->
errorResponse
(
'892'
,
'
No Card Found
'
);
}
$resp
=
$this
->
decryptePayData
(
$merchant_iv
,
$merchant_key
,
$result
);
if
(
empty
(
$resp
)
||
!
isset
(
$resp
->
txnCardDetails
)
||
empty
(
$resp
->
txnCardDetails
)
||
count
(
$resp
->
txnCardDetails
)
<=
0
){
$this
->
errorResponse
(
'893'
,
'No
Data
Found'
);
$this
->
errorResponse
(
'893'
,
'No
Card
Found'
);
}
$cardData
=
json_encode
(
json_decode
(
json_encode
(
$resp
->
txnCardDetails
),
true
));
$resp
=
$this
->
encrypt
(
$cardData
,
$this
->
local_key
,
$this
->
local_iv
);
$this
->
response
(
array
(
'saved_cards'
=>
$resp
));
}
catch
(
Exception
$e
)
{
$this
->
errorResponse
(
'894'
,
'
Something went wrong, Please try again
'
);
$this
->
errorResponse
(
'894'
,
'
No Card Found
'
);
}
}
...
...
@@ -768,7 +770,7 @@ class Api extends CI_Controller {
$res
=
$this
->
Api_model
->
payNow
(
$payData
);
if
(
$res
[
'status'
]
==
1
){
$params
=
array
(
'amount'
=>
1
,
'last_id'
=>
$res
[
'transaction_id'
],
'event_id'
=>
'ADD_CARD'
,
$params
=
array
(
'amount'
=>
0.0
1
,
'last_id'
=>
$res
[
'transaction_id'
],
'event_id'
=>
'ADD_CARD'
,
'booking_id'
=>
'ADD_CARD'
,
'custData'
=>
$res
[
'custData'
],
'cardData'
=>
$reqData
);
$reqData
=
$this
->
encrypt
(
json_encode
(
$params
),
$this
->
local_key
,
$this
->
local_iv
);
...
...
application/models/Webservice_model.php
View file @
aab1308e
...
...
@@ -1117,7 +1117,8 @@ class Webservice_model extends CI_Model {
if
(
!
empty
(
$wallet
)
&&
!
empty
(
$wallet
[
'balance_amount'
])
&&
$wallet
[
'balance_amount'
]
>=
$amt
){
$balance
=
$wallet
[
'balance_amount'
]
-
$amt
;
$this
->
db
->
update
(
'wallet'
,
array
(
'balance_amount'
=>
$balance
),
array
(
'customer_id'
=>
$user_id
));
$this
->
db
->
update
(
'wallet'
,
array
(
'balance_amount'
=>
$balance
),
array
(
'customer_id'
=>
$user_id
));
$post_data
[
'status'
]
=
1
;
}
else
{
return
array
(
'status'
=>
0
,
'code'
=>
'ER40'
,
...
...
application/views/Promocode/promocodeList.php
View file @
aab1308e
...
...
@@ -77,7 +77,7 @@
<td
id=
"statusFlag_
<?=
encode_param
(
$promo
->
promocode_id
)
?>
"
>
<?php
if
(
$promo
->
status
==
1
){
if
(
strtotime
(
$promo
->
start_date
)
<
strtotime
(
date
(
'd-M-y H:i:s'
))){
echo
'Yet to Activ
e
te'
;
echo
'Yet to Activ
a
te'
;
}
else
if
(
strtotime
(
$promo
->
start_date
)
>
strtotime
(
date
(
'd-M-y H:i:s'
))
&&
strtotime
(
$promo
->
end_date
)
<
strtotime
(
date
(
'd-M-y H:i:s'
))){
echo
'Active'
;
...
...
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