<?php
namespace Devurai\AcceptbluePaymentPro\Settings;
use Devurai\AcceptbluePaymentPro\Surcharge\SurchargeSettingsDTO;

class GooglePaySettings extends Settings
{
    use SurchargeSettingsDTO;

    public static function getInstance(): GooglePaySettings
    {
        return parent::getInstance();
    }

    public function get_gateway_id(): string
    {
        return 'acceptblue-google-pay';
    }

    public function get_merchant_ID(): string {
        return $this->get_prop('merchant_id', '');
    }

    public function get_transaction_type(): string {
        return $this->get_prop('transaction_type', 'charge');
    }

    public function is_charge_transaction(): bool {
        return $this->get_prop('transaction_type', 'charge') === 'charge';
    }

    public function is_charge_order(): bool {
        return $this->get_prop('charge_order', 'yes') === 'yes';
    }

    public function get_charge_virtual(): string {
        return $this->get_prop('charge_virtual', 'no');
    }

    public function is_charge_virtual_only(): bool {
        if(!$this->is_charge_transaction() && $this->get_charge_virtual() === 'yes') {
            return true;
        }else{
            return true;
        }
    }
    public function is_level_3_fields_disabled(): bool {
        return $this->get_prop('disable_level_3_fields', 'no') === 'yes';
    }
    public function get_settings_id(): string
    {
        return 'google-pay';
    }
}