fixing mail
This commit is contained in:
parent
12c0f3ec92
commit
7937c1aa4c
@ -375,7 +375,15 @@ class CustomerController extends Controller
|
|||||||
$order->update($payload);
|
$order->update($payload);
|
||||||
|
|
||||||
if($order->email){
|
if($order->email){
|
||||||
Mail::to($order->email)->send(new NotifikasiPembayaran($order->nama_pemesan, $order->no_order));
|
try {
|
||||||
|
Mail::to($order->email)->send(
|
||||||
|
new NotifikasiPembayaran($order->nama_pemesan, $order->no_order)
|
||||||
|
);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
// log error biar bisa ditelusuri nanti
|
||||||
|
// \Log::error('Gagal mengirim email ke ' . $order->email . ': ' . $e->getMessage());
|
||||||
|
// continue tanpa break flow
|
||||||
|
}
|
||||||
}
|
}
|
||||||
DB::connection('dbOrderGizi')->commit();
|
DB::connection('dbOrderGizi')->commit();
|
||||||
session()->flash('payment_success', true);
|
session()->flash('payment_success', true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user