<?php
namespace WpBookingHotelFrontend\app\models;
defined('_WPBOOKINGHOTEL_EXEC') or die;

use WpBookingHotel\Factory;
use WpBookingHotel\Mvc\Model\ModelForm;
use WpBookingHotel\Form\Form;
use WpBookingHotel\Mvc\Model\ModelList;
use WpBookingHotel\payments\WBPayment;
use WpBookingHotel\Registry\Registry;

class PaymentModel extends ModelForm
{
    /**
     * @var string
     */
    public $context = "payment";
    /**
     * @var string
     */
    public $table_name = "payment";
    public function getPaymentPlugin($payment_id)
    {
        $payment = $this->getItem($payment_id);
        $paymentPlugin = WBPayment::getInstance($payment->type, $payment);
        return $paymentPlugin;
    }
}
