本文整理汇总了PHP中Reservation::rejectReserv方法的典型用法代码示例。如果您正苦于以下问题:PHP Reservation::rejectReserv方法的具体用法?PHP Reservation::rejectReserv怎么用?PHP Reservation::rejectReserv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reservation
的用法示例。
在下文中一共展示了Reservation::rejectReserv方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rejectPayment
public function rejectPayment()
{
$_confirmPay = new Reservation();
$dataId = Input::get('id');
$_confirmPay->rejectReserv($dataId);
$reservation = $_confirmPay->getReserv($dataId);
$users = new User();
$user = $users->getUserDetailById($reservation->created_by);
$data = array('refNumber' => str_pad($dataId, 10, "0", STR_PAD_LEFT), 'package' => $reservation->pack_name, 'amount' => '₱' . number_format($reservation->total_amount, 2), 'paymentMethod' => $reservation->payment_method, 'status' => 4, 'email' => $user->user_email, 'name' => $user->user_fname . ' ' . $user->user_lname);
try {
Mail::send('emails.user.transactionReservation', $data, function ($message) use($data) {
$message->from('no-reply@reservation.com', 'El Sitio Filipino');
$message->to($data['email'], $data['name'])->subject('El Sitio Filipino Transaction Details');
});
} catch (Exception $ex) {
}
return json_encode(['success' => $_confirmPay]);
}