bugs fix callback

This commit is contained in:
Linksehat Staging Server
2024-05-22 14:17:01 +07:00
parent ebd880d9c8
commit 8ae6e44680
4 changed files with 110 additions and 46 deletions

View File

@@ -291,10 +291,9 @@ class DuitkuController extends Controller
// Update status pembayaran
$livechat->payment_method = $notif->paymentCode;
$livechat->status = 5; // success payment
$livechat->save();
// Update start chat
$livechat->start_date = date('Y-m-d H:i:s');
$livechat->save();
// Buat dan simpan data channel ke dalam tabel
$channel = Channel::updateOrCreate([
'name' => $livechat->patient_id .'_' . $request->doctor_id,
@@ -332,7 +331,7 @@ class DuitkuController extends Controller
// Berikan respons yang sesuai ke klien
return response()->json(['message' => 'Channel created successfully', 'channel' => $channel]);
} else if ($notif->resultCode == "01") {
// Action Failed
$livechat = Livechat::where('uuid', $notif->merchantOrderId)->first();