<?php
namespace WpBookingEventFrontend\app\models;
defined('_WPBOOKINGEVENT_EXEC') or die;

use WpBookingEvent\Factory;
use WpBookingEvent\Mvc\Model\ModelForm;
use WpBookingEvent\Form\Form;
use WpBookingEvent\Mvc\Model\ModelList;
use WpBookingEvent\payments\WBPayment;
use WpBookingEvent\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;
    }
}
