MAIL ERROR ENABLED
This commit is contained in:
parent
1f54c9dc92
commit
c69820680f
@ -130,10 +130,11 @@ class iobpay extends REST_Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function receiveIOBPAYResponse_post()
|
public function receiveIOBPAYResponse_post()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
log_message('ERROR',$_SERVER['HTTP_ORIGIN']);
|
||||||
if($_SERVER['HTTP_ORIGIN'] == $this->config->item('referer_url'))
|
if($_SERVER['HTTP_ORIGIN'] == $this->config->item('referer_url'))
|
||||||
{
|
{
|
||||||
$merchant_id = $this->config->item('merchant_id');
|
$merchant_id = $this->config->item('merchant_id');
|
||||||
@ -164,7 +165,9 @@ class iobpay extends REST_Controller
|
|||||||
// $data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
// $data['status'] = REST_Controller::HTTP_NOT_FOUND;
|
||||||
// $data['msg'] = 'Server error ! Please contact your website Administrator! Error Code : '. $errorcd;
|
// $data['msg'] = 'Server error ! Please contact your website Administrator! Error Code : '. $errorcd;
|
||||||
echo $log_message;
|
echo $log_message;
|
||||||
header('Location: '.$this->config->item('failure_url'));
|
sleep(2);
|
||||||
|
header('Location: '.$this->config->item('failure_url'));
|
||||||
|
exit;
|
||||||
// $this->response($data,REST_Controller::HTTP_OK);
|
// $this->response($data,REST_Controller::HTTP_OK);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -189,7 +192,7 @@ class iobpay extends REST_Controller
|
|||||||
//update child
|
//update child
|
||||||
$updated = $this->user_management_model->updateRecords(array('status' => 'FUNDS_RECEIVED'),CSR_CONTRIBUTION_DETAILS,array('cont_id' => $contribution_id[0]['con_id']));
|
$updated = $this->user_management_model->updateRecords(array('status' => 'FUNDS_RECEIVED'),CSR_CONTRIBUTION_DETAILS,array('cont_id' => $contribution_id[0]['con_id']));
|
||||||
//trigger mail
|
//trigger mail
|
||||||
//$this->sendMail('SUCCESS',$merchanttxnid);
|
$this->sendMail('SUCCESS',$merchanttxnid);
|
||||||
|
|
||||||
header('Location: '.$this->config->item('success_url'));
|
header('Location: '.$this->config->item('success_url'));
|
||||||
exit;
|
exit;
|
||||||
@ -229,6 +232,8 @@ class iobpay extends REST_Controller
|
|||||||
$response['error']="Access denied!";
|
$response['error']="Access denied!";
|
||||||
log_message('error','Access denied!');
|
log_message('error','Access denied!');
|
||||||
echo json_encode($response);
|
echo json_encode($response);
|
||||||
|
sleep(2);
|
||||||
|
header('Location: '.$this->config->item('failure_url'));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -302,7 +307,11 @@ class iobpay extends REST_Controller
|
|||||||
$updated = $this->user_management_model->updateRecords(array('status' => 'FUNDS_RECEIVED'),CSR_CONTRIBUTIONS,array('id' => $con_id));
|
$updated = $this->user_management_model->updateRecords(array('status' => 'FUNDS_RECEIVED'),CSR_CONTRIBUTIONS,array('id' => $con_id));
|
||||||
//update child
|
//update child
|
||||||
$updated = $this->user_management_model->updateRecords(array('status' => 'FUNDS_RECEIVED'),CSR_CONTRIBUTION_DETAILS,array('cont_id' => $con_id));
|
$updated = $this->user_management_model->updateRecords(array('status' => 'FUNDS_RECEIVED'),CSR_CONTRIBUTION_DETAILS,array('cont_id' => $con_id));
|
||||||
|
$this->sendMail('SUCCESS',$merchanttxnid);
|
||||||
|
}
|
||||||
|
else if($txnstatus == 'FAILURE')
|
||||||
|
{
|
||||||
|
$this->sendMail('FAILURE',$merchanttxnid);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,16 +49,18 @@ class user_management extends REST_Controller
|
|||||||
if($user_id)
|
if($user_id)
|
||||||
{
|
{
|
||||||
$org_info['user_id'] = $user_data['id'];
|
$org_info['user_id'] = $user_data['id'];
|
||||||
|
if(isset($org_info['id']))
|
||||||
if($org_info['id'] != "" || $org_info['id'] != null)
|
{
|
||||||
{
|
if(($org_info['id'] != "" || $org_info['id'] != null))
|
||||||
// $org_info['updated_by'] = $user_data['updated_by'] ;
|
{
|
||||||
$org_id = $this->user_management_model->updateRecords($org_info,CSR_USER_ORG,array('id' => $org_info['id']));
|
// $org_info['updated_by'] = $user_data['updated_by'] ;
|
||||||
}
|
$org_id = $this->user_management_model->updateRecords($org_info,CSR_USER_ORG,array('id' => $org_info['id']));
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
$org_info['created_by'] = $user_data['updated_by'] != "" ? $user_data['updated_by'] : $user_data['created_by'];
|
{
|
||||||
$org_id = $this->user_management_model->saveRecords($org_info,CSR_USER_ORG);
|
$org_info['created_by'] = $user_data['updated_by'] != "" ? $user_data['updated_by'] : $user_data['created_by'];
|
||||||
|
$org_id = $this->user_management_model->saveRecords($org_info,CSR_USER_ORG);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
//include_once APPPATH.'/vendor/autoload.php';
|
//include_once APPPATH.'/vendor/autoload.php';
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
use PHPMailer\PHPMailer\Exception;
|
use PHPMailer\PHPMailer\Exception;
|
||||||
class mymaillib
|
class myMaillib
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user