You are here

protected function PaymentMethodAddForm::shouldInjectForm in Commerce PayPal 8

Determines whether the card fields form should be injected.

2 calls to PaymentMethodAddForm::shouldInjectForm()
PaymentMethodAddForm::buildConfigurationForm in src/PluginForm/Checkout/PaymentMethodAddForm.php
Form constructor.
PaymentMethodAddForm::submitConfigurationForm in src/PluginForm/Checkout/PaymentMethodAddForm.php
Form submission handler.

File

src/PluginForm/Checkout/PaymentMethodAddForm.php, line 124

Class

PaymentMethodAddForm

Namespace

Drupal\commerce_paypal\PluginForm\Checkout

Code

protected function shouldInjectForm(PaymentGatewayInterface $plugin) {
  return $plugin instanceof CheckoutInterface && $plugin
    ->getPaymentSolution() === 'custom_card_fields';
}