MAIL ERROR ENABLED

This commit is contained in:
Velz2020 2019-10-19 16:47:32 +05:30
parent 1f54c9dc92
commit c69820680f
3 changed files with 26 additions and 15 deletions

View File

@ -130,10 +130,11 @@ class iobpay extends REST_Controller
}
public function receiveIOBPAYResponse_post()
{
log_message('ERROR',$_SERVER['HTTP_ORIGIN']);
if($_SERVER['HTTP_ORIGIN'] == $this->config->item('referer_url'))
{
$merchant_id = $this->config->item('merchant_id');
@ -164,7 +165,9 @@ class iobpay extends REST_Controller
// $data['status'] = REST_Controller::HTTP_NOT_FOUND;
// $data['msg'] = 'Server error ! Please contact your website Administrator! Error Code : '. $errorcd;
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);
}
else
@ -189,7 +192,7 @@ class iobpay extends REST_Controller
//update child
$updated = $this->user_management_model->updateRecords(array('status' => 'FUNDS_RECEIVED'),CSR_CONTRIBUTION_DETAILS,array('cont_id' => $contribution_id[0]['con_id']));
//trigger mail
//$this->sendMail('SUCCESS',$merchanttxnid);
$this->sendMail('SUCCESS',$merchanttxnid);
header('Location: '.$this->config->item('success_url'));
exit;
@ -229,6 +232,8 @@ class iobpay extends REST_Controller
$response['error']="Access denied!";
log_message('error','Access denied!');
echo json_encode($response);
sleep(2);
header('Location: '.$this->config->item('failure_url'));
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));
//update child
$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);
}
}

View File

@ -49,16 +49,18 @@ class user_management extends REST_Controller
if($user_id)
{
$org_info['user_id'] = $user_data['id'];
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']));
}
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);
if(isset($org_info['id']))
{
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']));
}
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);
}
}
}
}

View File

@ -5,7 +5,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
//include_once APPPATH.'/vendor/autoload.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
class mymaillib
class myMaillib
{
public function __construct()
{