<?php

namespace Mnv\Modules\Payment;

use Mnv\Core\Mnv;

/**
 * Class PaymentMethod
 * @package Mnv\Api\Payment
 */
class PaymentMethod extends Mnv
{
    protected $payment;

    public function __construct()
    {
        parent::__construct();
    }

    /**
     * @param $name
     * @return array|false|mixed|string
     */
    public function get_payment($name)
    {
        $payment = connect('shop_payments')->select('*')->where('fileName', $name)->get('array');
        $payment['settings'] = json_decode($payment['settings'], true);

         return $payment;
    }
}