class PaymentTestNoResponse in Payment 8.2
A testing payment method.
Plugin annotation
@PaymentMethod(
  id = "payment_test_no_response",
  label = @Translation("Test method (execution does not return response)"),
  message_text = "Foo",
  message_text_format = "plain_text"
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait- class \Drupal\payment\Plugin\Payment\Method\PaymentMethodBase implements ConfigurableInterface, DependentPluginInterface, CacheableDependencyInterface, ContainerFactoryPluginInterface, PluginFormInterface, PaymentMethodCapturePaymentInterface, PaymentMethodInterface, PaymentMethodRefundPaymentInterface uses PaymentAwareTrait- class \Drupal\payment_test\Plugin\Payment\Method\PaymentTestNoResponse
 
 
- class \Drupal\payment\Plugin\Payment\Method\PaymentMethodBase implements ConfigurableInterface, DependentPluginInterface, CacheableDependencyInterface, ContainerFactoryPluginInterface, PluginFormInterface, PaymentMethodCapturePaymentInterface, PaymentMethodInterface, PaymentMethodRefundPaymentInterface uses PaymentAwareTrait
 
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of PaymentTestNoResponse
File
- modules/payment_test/ src/ Plugin/ Payment/ Method/ PaymentTestNoResponse.php, line 22 
Namespace
Drupal\payment_test\Plugin\Payment\MethodView source
class PaymentTestNoResponse extends PaymentMethodBase {
  /**
   * {@inheritdoc}
   */
  protected function getSupportedCurrencies() {
    return TRUE;
  }
  /**
   * {@inheritdoc}
   */
  protected function doExecutePayment() {
    $this
      ->getPayment()
      ->setPaymentStatus($this->paymentStatusManager
      ->createInstance('payment_success'));
    $this
      ->getPayment()
      ->save();
  }
  /**
   * {@inheritdoc}
   */
  protected function doCapturePayment() {
  }
  /**
   * {@inheritdoc}
   */
  protected function doCapturePaymentAccess(AccountInterface $account) {
    return FALSE;
  }
  /**
   * {@inheritdoc}
   */
  protected function doRefundPayment() {
  }
  /**
   * {@inheritdoc}
   */
  protected function doRefundPaymentAccess(AccountInterface $account) {
    return FALSE;
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| DependencySerializationTrait:: | protected | property | An array of entity type IDs keyed by the property name of their storages. | |
| DependencySerializationTrait:: | protected | property | An array of service IDs keyed by property name used for serialization. | |
| DependencySerializationTrait:: | public | function | 1 | |
| DependencySerializationTrait:: | public | function | 2 | |
| MessengerTrait:: | protected | property | The messenger. | 29 | 
| MessengerTrait:: | public | function | Gets the messenger. | 29 | 
| MessengerTrait:: | public | function | Sets the messenger. | |
| PaymentAwareTrait:: | protected | property | The payment. | |
| PaymentAwareTrait:: | public | function | ||
| PaymentAwareTrait:: | public | function | ||
| PaymentMethodBase:: | protected | property | The event dispatcher. | |
| PaymentMethodBase:: | protected | property | The module handler. | |
| PaymentMethodBase:: | protected | property | The token API. | |
| PaymentMethodBase:: | public | function | Form constructor. Overrides PluginFormInterface:: | |
| PaymentMethodBase:: | public | function | Calculates dependencies for the configured plugin. Overrides DependentPluginInterface:: | |
| PaymentMethodBase:: | public | function | Captures the payment. Overrides PaymentMethodCapturePaymentInterface:: | |
| PaymentMethodBase:: | public | function | Checks if the payment can be captured. Overrides PaymentMethodCapturePaymentInterface:: | |
| PaymentMethodBase:: | public static | function | Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: | 1 | 
| PaymentMethodBase:: | public | function | Gets default configuration for this plugin. Overrides ConfigurableInterface:: | |
| PaymentMethodBase:: | protected | function | Performs a payment method-specific access check for payment execution. | |
| PaymentMethodBase:: | public | function | Executes the payment. Overrides PaymentMethodInterface:: | |
| PaymentMethodBase:: | public | function | Checks if the payment can be executed. Overrides PaymentMethodInterface:: | |
| PaymentMethodBase:: | protected | function | Checks a payment's currency against this plugin. | |
| PaymentMethodBase:: | public | function | The cache contexts associated with this object. Overrides CacheableDependencyInterface:: | |
| PaymentMethodBase:: | public | function | The maximum age for which this object may be cached. Overrides CacheableDependencyInterface:: | |
| PaymentMethodBase:: | public | function | The cache tags associated with this object. Overrides CacheableDependencyInterface:: | |
| PaymentMethodBase:: | public | function | Gets this plugin's configuration. Overrides ConfigurableInterface:: | |
| PaymentMethodBase:: | public | function | Gets the payer message text. | |
| PaymentMethodBase:: | public | function | Gets the payer message text format. | |
| PaymentMethodBase:: | public | function | Gets the payment capture status. Overrides PaymentMethodCapturePaymentInterface:: | |
| PaymentMethodBase:: | public | function | Gets the payment execution status. Overrides PaymentMethodInterface:: | 1 | 
| PaymentMethodBase:: | public | function | Gets the payment refund status. Overrides PaymentMethodRefundPaymentInterface:: | |
| PaymentMethodBase:: | public | function | Refunds the payment. Overrides PaymentMethodRefundPaymentInterface:: | |
| PaymentMethodBase:: | public | function | Checks if the payment can be refunded. Overrides PaymentMethodRefundPaymentInterface:: | |
| PaymentMethodBase:: | public | function | Sets the configuration for this plugin instance. Overrides ConfigurableInterface:: | |
| PaymentMethodBase:: | public | function | Form submission handler. Overrides PluginFormInterface:: | |
| PaymentMethodBase:: | public | function | Form validation handler. Overrides PluginFormInterface:: | |
| PaymentMethodBase:: | public | function | Constructs a new instance. Overrides PluginBase:: | 1 | 
| PaymentTestNoResponse:: | protected | function | Performs the actual payment capture. Overrides PaymentMethodBase:: | |
| PaymentTestNoResponse:: | protected | function | Performs a payment method-specific access check for payment capture. Overrides PaymentMethodBase:: | |
| PaymentTestNoResponse:: | protected | function | Performs the actual payment execution. Overrides PaymentMethodBase:: | |
| PaymentTestNoResponse:: | protected | function | Performs the actual payment refund. Overrides PaymentMethodBase:: | |
| PaymentTestNoResponse:: | protected | function | Performs a payment method-specific access check for payment refunds. Overrides PaymentMethodBase:: | |
| PaymentTestNoResponse:: | protected | function | Returns the supported currencies. Overrides PaymentMethodBase:: | |
| PluginBase:: | protected | property | Configuration information passed into the plugin. | 1 | 
| PluginBase:: | protected | property | The plugin implementation definition. | 1 | 
| PluginBase:: | protected | property | The plugin_id. | |
| PluginBase:: | constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
| PluginBase:: | public | function | Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: | |
| PluginBase:: | public | function | Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: | |
| PluginBase:: | public | function | Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: | 3 | 
| PluginBase:: | public | function | Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: | |
| PluginBase:: | public | function | Determines if the plugin is configurable. | |
| StringTranslationTrait:: | protected | property | The string translation service. | 1 | 
| StringTranslationTrait:: | protected | function | Formats a string containing a count of items. | |
| StringTranslationTrait:: | protected | function | Returns the number of plurals supported by a given language. | |
| StringTranslationTrait:: | protected | function | Gets the string translation service. | |
| StringTranslationTrait:: | public | function | Sets the string translation service to use. | 2 | 
| StringTranslationTrait:: | protected | function | Translates a string to the current language or to a given language. | 
