paymentMail:gwm
This commit is contained in:
parent
4f73a1bea2
commit
d2f0c6ffb6
@ -307,28 +307,10 @@ class Sendmail_controller extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $TransactionData = $this->TransactionModel->where('member_id', session()->get('logged_user'))->orderBy('created_at', 'DESC')->first();
|
// $temp_data = $this->MailModel->where('type' , $return)->where('is_active' , 1)->find();
|
||||||
|
// if ($temp_data[0]['to'])
|
||||||
// $Transaction_id = $TransactionData['transaction_id'];
|
// $email->setCC($temp_data[0]['to']);
|
||||||
|
|
||||||
// $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'];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$data['id'] = $return;
|
$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['TransactionData'] = $this->TransactionModel->where('order_id', $code )->where('member_id', session()->get('logged_user'))->find();
|
||||||
$memberCredits = $this->creditsModel->where('order_id', $code )
|
$memberCredits = $this->creditsModel->where('order_id', $code )
|
||||||
->where('member_id', session()->get('logged_user'))
|
->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['last_4'] = json_decode($data['TransactionData'][0]['transaction'] , true)['payment']['card_details']['card']['last_4'];
|
||||||
$data['html'] = view('success_mail',$data);
|
$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);
|
$message = view('verification_mail_temp',$data);
|
||||||
|
|
||||||
// }
|
// if ($temp_data[0]['is_active'] == 1)
|
||||||
|
// $email->setSubject($temp_data[0]['subject']);
|
||||||
if ($temp_data[0]['is_active'] == 1)
|
// else
|
||||||
|
$email->setSubject('Golf Evolution : Confirmation of your order');
|
||||||
$email->setSubject($temp_data[0]['subject']);
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
$email->setSubject('Username Password');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,30 +385,10 @@ class Sendmail_controller extends BaseController
|
|||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// $temp_data = $this->MailModel->where('type' , $return)->where('is_active' , 1)->find();
|
||||||
|
// if ($temp_data[0]['to'])
|
||||||
// $TransactionData = $this->TransactionModel->where('member_id', session()->get('logged_user'))->orderBy('created_at', 'DESC')->first();
|
// $email->setCC($temp_data[0]['to']);
|
||||||
|
|
||||||
// $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'];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$data['id'] = $return;
|
$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['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['category'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['category'];
|
||||||
$data['code'] = json_decode($data['TransactionData'][0]['transaction'] , true)[0]['code'];
|
$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['formattedDate'] = date('l, F j, Y', $timestamp);
|
||||||
$data['html'] = view('failed_mail',$data);
|
$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);
|
$message = view('verification_mail_temp',$data);
|
||||||
|
|
||||||
// }
|
// if ($temp_data[0]['is_active'] == 1)
|
||||||
|
// $email->setSubject($temp_data[0]['subject']);
|
||||||
if ($temp_data[0]['is_active'] == 1)
|
// else
|
||||||
|
$email->setSubject('Golf Evolution : Order Failed. Please try again');
|
||||||
$email->setSubject($temp_data[0]['subject']);
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
$email->setSubject('Username Password');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user