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
30350a84
Commit
30350a84
authored
6 years ago
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
c7907f34
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
config.php
application/config/config.php
+1
-1
Api.php
application/controllers/Api.php
+7
-6
viewSettings.php
application/views/Settings/viewSettings.php
+8
-0
No files found.
application/config/config.php
View file @
30350a84
...
...
@@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| a PHP script and you can easily do that on your own.
|
*/
$config
[
'base_url'
]
=
"http://"
.
$_SERVER
[
'HTTP_HOST'
]
.
dirname
(
$_SERVER
[
'SCRIPT_NAME'
]);
$config
[
'base_url'
]
=
"http
s
://"
.
$_SERVER
[
'HTTP_HOST'
]
.
dirname
(
$_SERVER
[
'SCRIPT_NAME'
]);
/*
|--------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
application/controllers/Api.php
View file @
30350a84
...
...
@@ -300,7 +300,7 @@ class Api extends CI_Controller {
public
function
payNow
(
$auth_token
=
''
,
$amount
=
0
,
$booking_id
=
''
,
$event_id
=
''
){
if
(
empty
(
$auth_token
)
||
empty
(
$amount
)
||
empty
(
$booking_id
)){
redirect
(
'http
://projects.nuvento.com/failure'
);
redirect
(
'https
://projects.nuvento.com/failure'
);
}
$payData
=
array
(
'auth_token'
=>
$auth_token
,
'amount'
=>
$amount
,
'booking_id'
=>
$booking_id
);
$res
=
$this
->
Api_model
->
payNow
(
$payData
);
...
...
@@ -309,7 +309,7 @@ class Api extends CI_Controller {
$this
->
paymentGateway
(
$amount
,
$res
[
'transaction_id'
],
$event_id
,
$booking_id
);
}
else
{
redirect
(
'http://projects.nuvento.com/failure?event_id='
.
$eventid
);
redirect
(
'http
s
://projects.nuvento.com/failure?event_id='
.
$eventid
);
}
}
...
...
@@ -331,7 +331,7 @@ class Api extends CI_Controller {
$booking_id
=
$last_id
[
3
];
$this
->
Api_model
->
update_payment
(
$response
,
$transaction_id
,
$lastid
,
'1'
)
;
redirect
(
'http
://projects.nuvento.com/bookingdetails?booking_id='
.
$booking_id
);
redirect
(
'https
://projects.nuvento.com/bookingdetails?booking_id='
.
$booking_id
);
}
}
...
...
@@ -354,7 +354,7 @@ class Api extends CI_Controller {
$booking_id
=
$last_id
[
3
];
$this
->
Api_model
->
update_payment
(
$response
,
$transaction_id
,
$lastid
,
'0'
);
redirect
(
'http
://projects.nuvento.com/failure?event_id='
.
$eventid
);
redirect
(
'https
://projects.nuvento.com/failure?event_id='
.
$eventid
);
}
}
...
...
@@ -384,11 +384,12 @@ class Api extends CI_Controller {
}
function
bayanPayArray
(
$amount
=
'0'
,
$lastid
=
''
,
$event_id
=
''
,
$booking_id
=
''
){
$settings
=
getSettings
();
$BayanPayArray
=
array
(
'BayanPay_Online_setting'
=>
array
(
'merchantKey'
=>
"+Hu4bL6iVk943JmFAvGtWEYMODFry4fad2I+iM0X2m0="
,
'merchantId'
=>
'201901291000002'
,
'merchantKey'
=>
$settings
->
merchant_key
,
'merchantId'
=>
$settings
->
merchant_id
,
'collaboratorId'
=>
'BAYANPAY'
,
'iv'
=>
'0123456789abcdef'
,
'url'
=>
false
// Set to false if you are using testing environment , set to true if you are using live environment
...
...
This diff is collapsed.
Click to expand it.
application/views/Settings/viewSettings.php
View file @
30350a84
...
...
@@ -96,6 +96,14 @@
<label>
Commission Per Booking
</label>
<input
type=
"text"
name=
"service_charge"
class=
"form-control required"
placeholder=
"Enter Service Charge"
value=
"
<?=
$data
[
'service_charge'
]
?>
"
>
</div>
<div
class=
"form-group col-xs-3"
>
<label>
BayanPay Merchant Key
</label>
<input
type=
"text"
name=
"merchant_key"
class=
"form-control required"
placeholder=
"Enter Merchant Key"
value=
"
<?=
$data
[
'merchant_key'
]
?>
"
>
</div>
<div
class=
"form-group col-xs-4"
>
<label>
BayanPay Merchant ID
</label>
<input
type=
"text"
name=
"merchant_id"
class=
"form-control required"
placeholder=
"Enter Merchant ID"
value=
"
<?=
$data
[
'merchant_id'
]
?>
"
>
</div>
</div>
</div>
<div
class=
"box-footer"
style=
"padding-left:46%"
>
...
...
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