You are here

public function Checkout::collectsBillingInformation in Commerce PayPal 8

Gets whether the payment gateway collects billing information.

Return value

bool TRUE if the payment gateway collects billing information, FALSE otherwise.

Overrides PaymentGatewayBase::collectsBillingInformation

File

src/Plugin/Commerce/PaymentGateway/Checkout.php, line 397

Class

Checkout
Provides the PayPal Checkout payment gateway.

Namespace

Drupal\commerce_paypal\Plugin\Commerce\PaymentGateway

Code

public function collectsBillingInformation() {

  // Collecting a billing profile is required when selecting the
  // "PayPal custom card fields" payment solution.
  if ($this
    ->getPaymentSolution() == 'custom_card_fields') {
    return TRUE;
  }
  return parent::collectsBillingInformation();
}