PaymentTestNoResponse.php in Payment 8.2
File
modules/payment_test/src/Plugin/Payment/Method/PaymentTestNoResponse.php
View source
<?php
namespace Drupal\payment_test\Plugin\Payment\Method;
use Drupal\Core\Session\AccountInterface;
use Drupal\payment\Plugin\Payment\Method\PaymentMethodBase;
class PaymentTestNoResponse extends PaymentMethodBase {
protected function getSupportedCurrencies() {
return TRUE;
}
protected function doExecutePayment() {
$this
->getPayment()
->setPaymentStatus($this->paymentStatusManager
->createInstance('payment_success'));
$this
->getPayment()
->save();
}
protected function doCapturePayment() {
}
protected function doCapturePaymentAccess(AccountInterface $account) {
return FALSE;
}
protected function doRefundPayment() {
}
protected function doRefundPaymentAccess(AccountInterface $account) {
return FALSE;
}
}