bugs fix callback
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user