<?php
use BTCPayServer\WC\Gateway\AbstractGateway;
class BTCPay_GF_BTC_LNURL extends AbstractGateway {
public function __construct() {
$this->id = 'btcpaygf_btc_lnurl';
parent::__construct();
$this->method_title = 'BTCPay Gateway: BTC_LNURL';
$this->method_description = 'This is separate payment gateway managed by BTCPay.';
$this->tokenType = $this->getTokenType();
$this->primaryPaymentMethod = 'BTC_LNURL';
}
public function getPaymentMethods(): array {
return ['BTC_LNURL']; // todo: add feature to add other pm
}
public function getTitle(): string {
return $this->get_option('title', 'BTC_LNURL');
}
public function init_form_fields() {
parent::init_form_fields();
$this->form_fields += [
'token_type' => [
'title' => __( 'Token type', 'btcpay-greenfield-for-woocommerce' ),
'type' => 'select',
'options' => [
'payment' => 'Payment',
'promotion' => 'Promotion'
],
'default' => 'payment',
'description' => __( 'Tokens of type promotion will not have a FIAT (USD, EUR, ..) exchange rate but counted as 1 per item quantity. See <a target="_blank" href="https://docs.btcpayserver.org/FAQ/Integrations/#token-types">here</a> for more details.', 'btcpay-greenfield-for-woocommerce' ),
'desc_tip' => false,
],
];
}
}