FIX_PAYMENT_STATUS,FEAT_PAYMENTSTATUS ADDED , FEAT_PAYMENT_TIME
This commit is contained in:
parent
db7cc3d8eb
commit
b109ecb3c9
@ -610,7 +610,8 @@ public function create_or_update_subscription($invoice_id,$invoice_status, $msg_
|
|||||||
try {
|
try {
|
||||||
$id = $this->paymentModel->where('membership_id', $membership_id)->first()['id'];
|
$id = $this->paymentModel->where('membership_id', $membership_id)->first()['id'];
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$data['status'] = 9999;
|
$data['status'] = 999999;
|
||||||
|
$data['payment_status'] = "Approved";
|
||||||
$data['updated_by'] = (int)get_logged_user_id();
|
$data['updated_by'] = (int)get_logged_user_id();
|
||||||
$this->paymentModel->update($id, $data);
|
$this->paymentModel->update($id, $data);
|
||||||
log_message('error', 'Payment Status Found and updated by User' . $data['updated_by']);
|
log_message('error', 'Payment Status Found and updated by User' . $data['updated_by']);
|
||||||
|
|||||||
@ -118,7 +118,8 @@ class Payment extends BaseController
|
|||||||
'order_id' => $ORDER_ID,
|
'order_id' => $ORDER_ID,
|
||||||
'scheme_id' => env('RENEWAL_SCHEME_ID'),
|
'scheme_id' => env('RENEWAL_SCHEME_ID'),
|
||||||
'amount' => $TXN_AMOUNT,
|
'amount' => $TXN_AMOUNT,
|
||||||
'device' => $payment_method == "mobile"? "Mobile":"Web"
|
'device' => $payment_method == "mobile"? "Mobile":"Web",
|
||||||
|
'payment_status'=> 'Not Received'
|
||||||
];
|
];
|
||||||
$result = $this->paymentModel->insert($payment_status_data);
|
$result = $this->paymentModel->insert($payment_status_data);
|
||||||
if ($result){
|
if ($result){
|
||||||
@ -186,6 +187,18 @@ public function payment_failure(){
|
|||||||
|
|
||||||
$model4 = new TransactionModel();
|
$model4 = new TransactionModel();
|
||||||
$model4->insert($paramList);
|
$model4->insert($paramList);
|
||||||
|
// $insertId = $model4->insertID();
|
||||||
|
$payment_status_id = $this->paymentModel->select('id')->where('order_id',$this->request->getVar('ORDERID'))->first()['id'];
|
||||||
|
// echo "payment status id :";
|
||||||
|
// var_dump($payment_status_id);die();
|
||||||
|
// $payement_status_update['status'] = $insertId;
|
||||||
|
$converted_status = ucfirst(strtolower(str_replace("TXN_", "", $this->request->getVar('STATUS'))));
|
||||||
|
$payement_status_update['payment_status'] = $converted_status;
|
||||||
|
|
||||||
|
// $payement_status_update['status'] = $payment_status_id;
|
||||||
|
|
||||||
|
$updated = $this->paymentModel->update($payment_status_id, $payement_status_update);
|
||||||
|
log_message('error', 'Payment Status Updated: ' . json_encode($updated));
|
||||||
|
|
||||||
return view('/payment_failure');
|
return view('/payment_failure');
|
||||||
}
|
}
|
||||||
@ -345,6 +358,9 @@ public function payment_process() {
|
|||||||
// echo "payment status id :";
|
// echo "payment status id :";
|
||||||
// var_dump($payment_status_id);die();
|
// var_dump($payment_status_id);die();
|
||||||
$payement_status_update['status'] = $insertId;
|
$payement_status_update['status'] = $insertId;
|
||||||
|
$converted_status = ucfirst(strtolower(str_replace("TXN_", "", $this->request->getVar('STATUS'))));
|
||||||
|
$payement_status_update['payment_status'] = $converted_status;
|
||||||
|
|
||||||
// $payement_status_update['status'] = $payment_status_id;
|
// $payement_status_update['status'] = $payment_status_id;
|
||||||
|
|
||||||
$updated = $this->paymentModel->update($payment_status_id, $payement_status_update);
|
$updated = $this->paymentModel->update($payment_status_id, $payement_status_update);
|
||||||
|
|||||||
@ -22,7 +22,8 @@ class PaymentStatusModel extends Model
|
|||||||
'device',
|
'device',
|
||||||
'status',
|
'status',
|
||||||
'is_active',
|
'is_active',
|
||||||
'order_id'
|
'order_id',
|
||||||
|
'payment_status'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,9 @@
|
|||||||
<th><b>Customer Name</b></th>
|
<th><b>Customer Name</b></th>
|
||||||
<th><b>Membership ID</b></th>
|
<th><b>Membership ID</b></th>
|
||||||
<th><b>SCHEME Name</b></th>
|
<th><b>SCHEME Name</b></th>
|
||||||
|
<th>Date/Time</th>
|
||||||
<th><b>ORDER ID</b></th>
|
<th><b>ORDER ID</b></th>
|
||||||
|
<th>Payment Status</th>
|
||||||
<th><b>Amount</b></th>
|
<th><b>Amount</b></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -14,7 +16,9 @@
|
|||||||
<td><?= isset($row['customer_name'])?$row['customer_name']:"-"?></td>
|
<td><?= isset($row['customer_name'])?$row['customer_name']:"-"?></td>
|
||||||
<td><?= isset($row['membership_id'])?$row['membership_id']:"-"?></td>
|
<td><?= isset($row['membership_id'])?$row['membership_id']:"-"?></td>
|
||||||
<td><?= isset($row['scheme_name'])?$row['scheme_name']:"-"?></td>
|
<td><?= isset($row['scheme_name'])?$row['scheme_name']:"-"?></td>
|
||||||
|
<td><?= isset($row['created_at'])? date("d/m/Y H:i:s", strtotime($row['created_at'])) : '-' ?></td>
|
||||||
<td><?= isset($row['order_id'])?$row['order_id']:"-"?></td>
|
<td><?= isset($row['order_id'])?$row['order_id']:"-"?></td>
|
||||||
|
<td><?= isset($row['payment_status'])?$row['payment_status']:"-" ?></td>
|
||||||
<td><?= isset($row['amount'])?$row['amount']:"-"?></td>
|
<td><?= isset($row['amount'])?$row['amount']:"-"?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="custom-control custom-switch" style="text-align: left;">
|
<div class="custom-control custom-switch" style="text-align: left;">
|
||||||
<input type="checkbox" class="custom-control-input" id="statusSwitch" data-parsley-multiple="statusSwitch" checked>
|
<input type="checkbox" class="custom-control-input" id="statusSwitch" data-parsley-multiple="statusSwitch" checked>
|
||||||
<label class="custom-control-label" for="statusSwitch">Payment receieved</label>
|
<label class="custom-control-label" for="statusSwitch">Payment Received</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -137,6 +137,7 @@
|
|||||||
console.log("Response Data:", response.data);
|
console.log("Response Data:", response.data);
|
||||||
$('#payment_status_table').html(response.html);
|
$('#payment_status_table').html(response.html);
|
||||||
setTable();
|
setTable();
|
||||||
|
$('#daterange').val(response.data.selected_data);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.log("Error: Unexpected response format.");
|
console.log("Error: Unexpected response format.");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user