Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
Tobin
dcarfixers
Commits
56c7c3b0
Commit
56c7c3b0
authored
5 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change paystack key
parent
bbabc3a9
master
…
dev_production
jansa
local_production
2 merge requests
!218
Master
,
!214
change paystack key
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
Webservices.php
application/controllers/Webservices.php
+2
-1
Webservice_model.php
application/models/Webservice_model.php
+2
-9
No files found.
application/controllers/Webservices.php
View file @
56c7c3b0
...
@@ -23,7 +23,8 @@
...
@@ -23,7 +23,8 @@
$this
->
load
->
model
(
'Webservice_model'
);
$this
->
load
->
model
(
'Webservice_model'
);
$this
->
load
->
library
(
'form_validation'
);
$this
->
load
->
library
(
'form_validation'
);
define
(
"PAYSTACK_SECRET_KEY"
,
"sk_live_ac1f5350a42852fd3439fdac8ba1d434f1c42360"
);
//define("PAYSTACK_SECRET_KEY", "sk_live_ac1f5350a42852fd3439fdac8ba1d434f1c42360");
define
(
"PAYSTACK_SECRET_KEY"
,
"sk_test_dae3d816baeeabcab5063def4aad5fe546e9758d"
);
date_default_timezone_set
(
'Asia/Kolkata'
);
date_default_timezone_set
(
'Asia/Kolkata'
);
}
}
// customer_login
// customer_login
...
...
This diff is collapsed.
Click to expand it.
application/models/Webservice_model.php
View file @
56c7c3b0
...
@@ -368,15 +368,10 @@ class Webservice_model extends CI_Model {
...
@@ -368,15 +368,10 @@ class Webservice_model extends CI_Model {
$car_loc_lat
=
(
isset
(
$postData
[
'location_lat'
])
&&
!
empty
(
$postData
[
'location_lat'
]))
?
$postData
[
'location_lat'
]
:
''
;
$car_loc_lat
=
(
isset
(
$postData
[
'location_lat'
])
&&
!
empty
(
$postData
[
'location_lat'
]))
?
$postData
[
'location_lat'
]
:
''
;
$car_loc_lng
=
(
isset
(
$postData
[
'location_lng'
])
&&
!
empty
(
$postData
[
'location_lng'
]))
?
$postData
[
'location_lng'
]
:
''
;
$car_loc_lng
=
(
isset
(
$postData
[
'location_lng'
])
&&
!
empty
(
$postData
[
'location_lng'
]))
?
$postData
[
'location_lng'
]
:
''
;
$insert_array
=
array
(
$insert_array
=
array
(
'cost'
=>
$cost
,
'cost'
=>
$cost
,
'scheduled_date'
=>
$date
,
'scheduled_time'
=>
$time
,
'issues_selected'
=>
$issues
,
'scheduled_date'
=>
$date
,
'scheduled_time'
=>
$time
,
'issues_selected'
=>
$issues
,
'service_type'
=>
(
isset
(
$postData
[
'is_emergency'
])
&&
!
empty
(
$postData
[
'is_emergency'
]))
?
2
:
1
,
'service_type'
=>
(
isset
(
$postData
[
'is_emergency'
])
&&
!
empty
(
$postData
[
'is_emergency'
]))
?
2
:
1
,
'status'
=>
(
isset
(
$postData
[
'is_emergency'
])
&&
!
empty
(
$postData
[
'is_emergency'
]))
?
1
:
5
,
'status'
=>
(
isset
(
$postData
[
'is_emergency'
])
&&
!
empty
(
$postData
[
'is_emergency'
]))
?
1
:
5
,
'car_location'
=>
$car_location
,
'car_location'
=>
$car_location
,
'car_loc_lat'
=>
$car_loc_lat
,
'car_loc_lng'
=>
$car_loc_lng
'car_loc_lat'
=>
$car_loc_lat
,
'car_loc_lng'
=>
$car_loc_lng
);
);
if
(
$this
->
db
->
update
(
'bookings'
,
$insert_array
,
array
(
'booking_id'
=>
$postData
[
'booking_id'
]))){
if
(
$this
->
db
->
update
(
'bookings'
,
$insert_array
,
array
(
'booking_id'
=>
$postData
[
'booking_id'
]))){
$this
->
db
->
insert
(
"mechanic_booking"
,
array
(
'booking_id'
=>
$postData
[
'booking_id'
],
'mechanic_id'
=>
$postData
[
'mechanic_id'
],
'amount'
=>
$cost
,
'status'
=>
'0'
));
$this
->
db
->
insert
(
"mechanic_booking"
,
array
(
'booking_id'
=>
$postData
[
'booking_id'
],
'mechanic_id'
=>
$postData
[
'mechanic_id'
],
'amount'
=>
$cost
,
'status'
=>
'0'
));
...
@@ -390,8 +385,6 @@ class Webservice_model extends CI_Model {
...
@@ -390,8 +385,6 @@ class Webservice_model extends CI_Model {
$this
->
db
->
group_by
(
'bookings.booking_id'
);
$this
->
db
->
group_by
(
'bookings.booking_id'
);
$mech_data
=
$this
->
db
->
get_where
(
'bookings'
,
array
(
'bookings.booking_id'
=>
$postData
[
'booking_id'
]));
$mech_data
=
$this
->
db
->
get_where
(
'bookings'
,
array
(
'bookings.booking_id'
=>
$postData
[
'booking_id'
]));
// pr($this->db->last_query());
if
(
!
empty
(
$mech_data
)
&&
!
empty
(
$mechanic_data
=
$mech_data
->
row_array
())){
if
(
!
empty
(
$mech_data
)
&&
!
empty
(
$mechanic_data
=
$mech_data
->
row_array
())){
$this
->
db
->
insert
(
'transaction'
,
array
(
'customer_id'
=>
$mechanic_data
[
'customer_id'
],
'booking_id'
=>
$postData
[
'booking_id'
],
'payment_for'
=>
'1'
,
'datetime'
=>
date
(
'Y-m-d h:i:s'
),
'amount'
=>
$cost
));
$this
->
db
->
insert
(
'transaction'
,
array
(
'customer_id'
=>
$mechanic_data
[
'customer_id'
],
'booking_id'
=>
$postData
[
'booking_id'
],
'payment_for'
=>
'1'
,
'datetime'
=>
date
(
'Y-m-d h:i:s'
),
'amount'
=>
$cost
));
...
...
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