/home/kueuepay/public_html/app/Notifications/Admin/CardMethodRejectLogEmailNotification.php
<?php

namespace App\Notifications\Admin;

use Illuminate\Bus\Queueable;
use Illuminate\Support\Carbon;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;

class CardMethodRejectLogEmailNotification extends Notification
{
    use Queueable;
    public $data;
    /**
     * Create a new notification instance.
     *
     * @return void
     */
    public function __construct($data)
    {
        $this->data     = $data;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return ['mail'];
    }

    /**
     * Get the mail representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return \Illuminate\Notifications\Messages\MailMessage
     */
    public function toMail($notifiable)
    {   
        $data   = $this->data;
        $date               = Carbon::now();
        $dateTime           = $date->format('Y-m-d h:i:s A');

        return (new MailMessage)
            ->greeting("Hello ".$data['data']->user->fullname." !")
            ->subject("Order placed using ".'****'. substr($data['data']->card_payment_method->card_number,-4))
            ->line("Request Amount: " . $data['data']->request_amount.' '. $data['data']->request_currency)
            ->line("Transaction ID: " .$data['data']->trx_id)
            ->line("Status: " .$data['status'])
            ->line("Reject Reason: " .$data['data']->reject_reason)
            ->line("Date And Time: " .$dateTime)
            ->line('Thank you for using our application!');
    }

    /**
     * Get the array representation of the notification.
     *
     * @param  mixed  $notifiable
     * @return array
     */
    public function toArray($notifiable)
    {
        return [
            //
        ];
    }
}
Prerequisites

Prerequisites

Before you begin integrating the Kueue Pay Developer API, make sure you have:

  1. An active Kueue Pay merchant account.
  2. Basic knowledge of API integration and web development with PHP & Laravel.
  3. A secure and accessible web server to handle API requests.