Change record status: 
Project: 
Introduced in branch: 
8.x-2.x
Introduced in version: 
8.x-2.19
Description: 

Previous versions of Drupal Commerce only allowed on-site payment gateways to store payment methods (e.g. tokenized credit card details for reuse in checkout or recurring billing). As of 8.x-2.19, off-site payment gateways can also do this by implementing \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsStoredPaymentMethodsInterface.

Dong so means off-site payment gateways can create stored payment methods in their \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\OffsitePaymentGatewayInterface::onReturn and \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsNotificationsInterface::onNotify methods.

Customers will then be able to use that payment method in their next checkout, in which the payment gateway's \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsStoredPaymentMethodsInterface::createPayment method will be invoked.

Note: the module does not yet support creating payment methods via off-site payment gateways from user account pages. Follow development of that feature in: #3009860: Support creating reusable payment method for off-site payment gateways from user page

Existing payment gateways should have no backwards compatibility problems if they have implemented \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\OnsitePaymentGatewayInterface or \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\OffsitePaymentGatewayInterface.

Impacts: 
Module developers