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

class BayarcashDuitnowQRGateway extends PaymentGateway {
	use BayarcashPaymentTrait;

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

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

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

	public function getPaymentMethodLabel(): string {
		return __('DuitNow QR', 'bayarcash-for-givewp');
	}

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