paymentMail:gwm

This commit is contained in:
sriramv 2023-06-24 15:53:29 +05:30
parent 4f73a1bea2
commit d2f0c6ffb6

View File

@ -305,30 +305,12 @@ class Sendmail_controller extends BaseController
{
// $TransactionData = $this->TransactionModel->where('member_id', session()->get('logged_user'))->orderBy('created_at', 'DESC')->first();
// $Transaction_id = $TransactionData['transaction_id'];
// $timestamp = strtotime($TransactionData['created_at']);
// $Transaction_date = date('l, F j, Y', $timestamp);
// $amount = json_decode($TransactionData['transaction'] , true)['payment']['amount_money']['amount'];
// $payment_method = json_decode($TransactionData['transaction'] , true)['payment']['source_type'];
// $temp_data = $this->MailModel->where('type' , $return)->where('is_active' , 1)->find();
// if ($temp_data[0]['to'])
// $email->setCC($temp_data[0]['to']);
$data['id'] = $return;
$temp_data = $this->MailModel->where('type' , $return)->where('is_active' , 1)->find();
if ($temp_data[0]['to'])
$email->setCC($temp_data[0]['to']);
$data['TransactionData'] = $this->TransactionModel->where('order_id', $code )->where('member_id', session()->get('logged_user'))->find();
$memberCredits = $this->creditsModel->where('order_id', $code )
->where('member_id', session()->get('logged_user'))
@ -353,33 +335,13 @@ class Sendmail_controller extends BaseController
$data['last_4'] = json_decode($data['TransactionData'][0]['transaction'] , true)['payment']['card_details']['card']['last_4'];
$data['html'] = view('success_mail',$data);
// if ($temp_data) {
// $data['html'] = str_replace("%name%",session()->get('logged_user_name'),$temp_data[0]['html']);
// $data['html'] = str_replace("%id%",$Transaction_id,$temp_data[0]['html']);
// $data['html'] = str_replace("%method%",$payment_method,$temp_data[0]['html']);
// $data['html'] = str_replace("%date%", $Transaction_date,$temp_data[0]['html']);
// $data['html'] = str_replace("%amount%",$amount,$temp_data[0]['html']);
$message = view('verification_mail_temp',$data);
// }
if ($temp_data[0]['is_active'] == 1)
$email->setSubject($temp_data[0]['subject']);
else
$email->setSubject('Username Password');
// if ($temp_data[0]['is_active'] == 1)
// $email->setSubject($temp_data[0]['subject']);
// else
$email->setSubject('Golf Evolution : Confirmation of your order');
}
@ -423,30 +385,10 @@ class Sendmail_controller extends BaseController
{
// $TransactionData = $this->TransactionModel->where('member_id', session()->get('logged_user'))->orderBy('created_at', 'DESC')->first();
// $Transaction_id = $TransactionData['transaction_id'];
// $timestamp = strtotime($TransactionData['created_at']);
// $Transaction_date = date('l, F j, Y', $timestamp);
// $amount = json_decode($TransactionData['transaction'] , true)['payment']['amount_money']['amount'];
// $payment_method = json_decode($TransactionData['transaction'] , true)['payment']['source_type'];
// $temp_data = $this->MailModel->where('type' , $return)->where('is_active' , 1)->find();
// if ($temp_data[0]['to'])
// $email->setCC($temp_data[0]['to']);
$data['id'] = $return;
$temp_data = $this->MailModel->where('type' , $return)->where('is_active' , 1)->find();
if ($temp_data[0]['to'])
$email->setCC($temp_data[0]['to']);
$data['TransactionData'] = $this->TransactionModel->where('order_id', $code )->where('member_id', session()->get('logged_user'))->find();
$data['category'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['category'];
$data['code'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['code'];
@ -456,33 +398,13 @@ class Sendmail_controller extends BaseController
$data['formattedDate'] = date('l, F j, Y', $timestamp);
$data['html'] = view('failed_mail',$data);
// if ($temp_data) {
// $data['html'] = str_replace("%name%",session()->get('logged_user_name'),$temp_data[0]['html']);
// $data['html'] = str_replace("%id%",$Transaction_id,$temp_data[0]['html']);
// $data['html'] = str_replace("%method%",$payment_method,$temp_data[0]['html']);
// $data['html'] = str_replace("%date%", $Transaction_date,$temp_data[0]['html']);
// $data['html'] = str_replace("%amount%",$amount,$temp_data[0]['html']);
$message = view('verification_mail_temp',$data);
// }
if ($temp_data[0]['is_active'] == 1)
$email->setSubject($temp_data[0]['subject']);
else
$email->setSubject('Username Password');
// if ($temp_data[0]['is_active'] == 1)
// $email->setSubject($temp_data[0]['subject']);
// else
$email->setSubject('Golf Evolution : Order Failed. Please try again');
}