Commit 30350a84 by Tobin

dc

parent c7907f34
...@@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ...@@ -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. | 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'] = "https://".$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']);
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -300,7 +300,7 @@ class Api extends CI_Controller { ...@@ -300,7 +300,7 @@ class Api extends CI_Controller {
public function payNow($auth_token='',$amount=0,$booking_id='',$event_id=''){ public function payNow($auth_token='',$amount=0,$booking_id='',$event_id=''){
if(empty($auth_token) || empty($amount) || empty($booking_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); $payData = array('auth_token'=>$auth_token,'amount'=>$amount,'booking_id'=>$booking_id);
$res = $this->Api_model->payNow($payData); $res = $this->Api_model->payNow($payData);
...@@ -309,7 +309,7 @@ class Api extends CI_Controller { ...@@ -309,7 +309,7 @@ class Api extends CI_Controller {
$this->paymentGateway($amount,$res['transaction_id'],$event_id,$booking_id); $this->paymentGateway($amount,$res['transaction_id'],$event_id,$booking_id);
} }
else{ else{
redirect('http://projects.nuvento.com/failure?event_id='.$eventid); redirect('https://projects.nuvento.com/failure?event_id='.$eventid);
} }
} }
...@@ -331,7 +331,7 @@ class Api extends CI_Controller { ...@@ -331,7 +331,7 @@ class Api extends CI_Controller {
$booking_id = $last_id[3]; $booking_id = $last_id[3];
$this->Api_model->update_payment($response,$transaction_id,$lastid,'1') ; $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 { ...@@ -354,7 +354,7 @@ class Api extends CI_Controller {
$booking_id = $last_id[3]; $booking_id = $last_id[3];
$this->Api_model->update_payment($response,$transaction_id,$lastid,'0'); $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 { ...@@ -384,11 +384,12 @@ class Api extends CI_Controller {
} }
function bayanPayArray($amount = '0',$lastid='',$event_id='',$booking_id=''){ function bayanPayArray($amount = '0',$lastid='',$event_id='',$booking_id=''){
$settings = getSettings();
$BayanPayArray = $BayanPayArray =
array( array(
'BayanPay_Online_setting' => array( 'BayanPay_Online_setting' => array(
'merchantKey' => "+Hu4bL6iVk943JmFAvGtWEYMODFry4fad2I+iM0X2m0=", 'merchantKey' => $settings->merchant_key,
'merchantId' => '201901291000002', 'merchantId' => $settings->merchant_id,
'collaboratorId' => 'BAYANPAY', 'collaboratorId' => 'BAYANPAY',
'iv' => '0123456789abcdef', 'iv' => '0123456789abcdef',
'url' => false// Set to false if you are using testing environment , set to true if you are using live environment 'url' => false// Set to false if you are using testing environment , set to true if you are using live environment
......
...@@ -96,6 +96,14 @@ ...@@ -96,6 +96,14 @@
<label>Commission Per Booking</label> <label>Commission Per Booking</label>
<input type="text" name="service_charge" class="form-control required" placeholder="Enter Service Charge" value="<?= $data['service_charge'] ?>"> <input type="text" name="service_charge" class="form-control required" placeholder="Enter Service Charge" value="<?= $data['service_charge'] ?>">
</div> </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> </div>
<div class="box-footer" style="padding-left:46%"> <div class="box-footer" style="padding-left:46%">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment