<?php
use Give\Framework\PaymentGateways\PaymentGateway;
use Give\Framework\PaymentGateways\Commands\PaymentRefunded;
use Give\Framework\PaymentGateways\Exceptions\PaymentGatewayException;
use Give\Donations\Models\Donation;

class BayarcashDuitnowGateway extends PaymentGateway {
	use BayarcashPaymentTrait;

	public static function id(): string {
		return 'bayarcash_duitnow_block';
	}

	public function getId(): string {
		return self::id();
	}

	public function getName(): string {
		return __('Bayarcash DuitNow OBW', 'bayarcash-for-givewp');
	}

	public function getPaymentMethodLabel(): string {
		return __('Online Banking & Wallets', 'bayarcash-for-givewp');
	}

	/**
	 * @throws PaymentGatewayException
	 */
	public function refundDonation(Donation $donation): PaymentRefunded {
		throw new PaymentGatewayException(__('Refunds are not yet supported.', 'bayarcash-for-givewp'));
	}
}