You are here

interface CheckoutInterface in Commerce PayPal 8

Provides the interface for the Checkout payment gateway.

The PayPal Checkout payment gateway supports 2 different flows: 1) The "shortcut" flow:

  • Customer initiates the payment from the cart page through the Smart payment buttons.
  • Once the payment is approved on PayPal, the customer is redirected to checkout and the checkout flow is set to "PayPal Checkout" (which is provided by the module and can be customized).
  • The payment is authorized/captured by the CheckoutPaymentProcess pane which calls createPayment().

2) The "mark" flow:

  • This flow requires the presence of the "review" checkout step. In case no "review" step is configured, the Smart payment buttons can be shown using the "commerce_paypal.smart_payment_buttons_builder" service.
  • Customer initiates the payment from the checkout "review" step.
  • Once the payment is approved on PayPal, the payment is created on in onReturn() and the customer is redirected to the next checkout step (usually "payment" which is skipped because the order is already paid).

Hierarchy

Expanded class hierarchy of CheckoutInterface

All classes that implement CheckoutInterface

6 files declare their use of CheckoutInterface
CheckoutController.php in src/Controller/CheckoutController.php
CheckoutPaymentProcess.php in src/Plugin/Commerce/CheckoutPane/CheckoutPaymentProcess.php
commerce_paypal.module in ./commerce_paypal.module
Implements PayPal payment services for use with Drupal Commerce.
CustomCardFieldsBuilder.php in src/CustomCardFieldsBuilder.php
PaymentMethodAddForm.php in src/PluginForm/Checkout/PaymentMethodAddForm.php

... See full list

File

src/Plugin/Commerce/PaymentGateway/CheckoutInterface.php, line 31

Namespace

Drupal\commerce_paypal\Plugin\Commerce\PaymentGateway
View source
interface CheckoutInterface extends OffsitePaymentGatewayInterface, SupportsAuthorizationsInterface, SupportsRefundsInterface, SupportsCreatingPaymentMethodsInterface {

  /**
   * Returns the payment solution (e.g "smart_payment_buttons").
   *
   * @return string
   *   The payment solution.
   */
  public function getPaymentSolution();

}

Members

Namesort descending Modifiers Type Description Overrides
CheckoutInterface::getPaymentSolution public function Returns the payment solution (e.g "smart_payment_buttons"). 1
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
OffsitePaymentGatewayInterface::getNotifyUrl public function Gets the URL to the "notify" page. 1
OffsitePaymentGatewayInterface::onCancel public function Processes the "cancel" request. 1
OffsitePaymentGatewayInterface::onReturn public function Processes the "return" request. 1
PaymentGatewayInterface::buildAvsResponseCodeLabel public function Builds a label for the given AVS response code and card type. 1
PaymentGatewayInterface::buildPaymentOperations public function Builds the available operations for the given payment. 1
PaymentGatewayInterface::collectsBillingInformation public function Gets whether the payment gateway collects billing information. 1
PaymentGatewayInterface::getCreditCardTypes public function Gets the credit card types handled by the gateway. 1
PaymentGatewayInterface::getDefaultPaymentMethodType public function Gets the default payment method type. 1
PaymentGatewayInterface::getDisplayLabel public function Gets the payment gateway display label. 1
PaymentGatewayInterface::getJsLibrary public function Gets the JS library ID. 1
PaymentGatewayInterface::getLabel public function Gets the payment gateway label. 1
PaymentGatewayInterface::getMode public function Gets the mode in which the payment gateway is operating. 1
PaymentGatewayInterface::getPaymentMethodTypes public function Gets the payment method types handled by the payment gateway. 1
PaymentGatewayInterface::getPaymentType public function Gets the payment type used by the payment gateway. 1
PaymentGatewayInterface::getSupportedModes public function Gets the supported modes. 1
PaymentGatewayInterface::toMinorUnits Deprecated public function Converts the given amount to its minor units. 1
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
PluginWithFormsInterface::getFormClass public function Gets the form class for the given operation.
PluginWithFormsInterface::hasFormClass public function Gets whether the plugin has a form class for the given operation.
SupportsAuthorizationsInterface::canCapturePayment public function Checks whether the given payment can be captured.
SupportsAuthorizationsInterface::capturePayment public function Captures the given authorized payment. 1
SupportsCreatingPaymentMethodsInterface::createPaymentMethod public function Creates a payment method with the given payment details. 1
SupportsNotificationsInterface::onNotify public function Processes the notification request. 1
SupportsRefundsInterface::canRefundPayment public function Checks whether the given payment can be refunded.
SupportsRefundsInterface::refundPayment public function Refunds the given payment. 2
SupportsStoredPaymentMethodsInterface::createPayment public function Creates a payment. 2
SupportsStoredPaymentMethodsInterface::deletePaymentMethod public function Deletes the given payment method. 2
SupportsVoidsInterface::canVoidPayment public function Checks whether the given payment can be voided.
SupportsVoidsInterface::voidPayment public function Voids the given payment. 2