<?php

namespace Hyperpay\Gateways\Brands;

use Hyperpay\Gateways\App\DefaultGateway;
use Hyperpay\Gateways\Traits\HasSubscription;
use Hyperpay\Gateways\Traits\HasTokenization;
use Hyperpay\Gateways\Main;
use WC_Order;


class CreditCard extends DefaultGateway
{
    use HasSubscription, HasTokenization;

    /**
     * should be lower case and unique
     * @var string $id
     */
    public $id = 'hyperpay';

    /**
     * The title which appear next to gateway on setting page
     * @var string $method_title
     */
    public $method_title = 'Hyperpay Gateway';

    /**
     * Description of gateways which will appear next to title
     * @var string $method_description
     */
    public $method_description = 'Hyperpay Plugin for Woocommerce';

    /**
     *
     * the Brands supported by the gateway
     * @var array $supported_brands
     */
    protected $supported_brands = [
        'VISA' => 'Visa',
        'MASTER' => 'Master Card',
        'AMEX' => 'American Express',
        'JCB' => 'Japan Credit Bureau'
    ];


    public function renderPaymentForm(WC_Order $order, $result)
    {
        array_push($this->brands, 'MADA');
        return parent::renderPaymentForm($order, $result);
    }
}
