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

Payment method entities are now payment_method_configuration config entities that implement \Drupal\payment\Entity\PaymentMethodConfigurationInterface. The default entity implementation is \Drupal\payment\Entity\PaymentMethodConfiguration.
payment_method_access() has been replaced by \Drupal\payment\Entity\PaymentMethodConfigurationInterface::access(), which invokes the payment_method_configuration's access controller.

Payment method controllers are now Payment/Method plugins that implement \Drupal\payment\Plugin\Payment\Method\PaymentMethodInterface and optionally extend \Drupal\payment\Plugin\Payment\Method\Base. They are annotated using \Drupal\payment\Annotations\PaymentMethod. Controllers no longer have to take care of their own storage, as payment method configuration entities store controller configuration together with their own configuration.
All payment_method_controller*() functions have been replaced by the plugin.manager.payment.method service.
Plugins are identified by their IDs (machine names), as opposed to controller class names in 7.x-1.x. As a consequence URLs and permissions now use plugin IDs instead of class names. Modules that provided payment method controllers for 7.x-1.x must upgrade the corresponding payment.payment_method.create.$controller_class_name permission to payment.payment_method.create.$payment_method_plugin_id.

7.x-1.x

// Configure a payment method entity to use a particular plugin.
$payment_method_entity = new PaymentMethod();
$payment_method_controller = payment_method_controller_load('FooController');
$payment_method_entity->controller = $payment_method_controller;

// Check for "create" permission. This is just an example and should normally be done by calling payment_access().
user_access('payment.payment_method.create.FooController');

8.x-2.x

// Configure a payment method entity to use a particular plugin.
$payment_method_configuration_entity = entity_create('payment_method_configuration');
$manager = \Drupal\payment\Payment::methodConfigurationManager();
$payment_method_configuration_plugin = $manager->createInstance('foo_method');
$payment_method_configuration_entity->setPlugin($payment_method_configuration_plugin);

// Check for "create" permission.
\Drupal::entityManager()->getAccessController('payment_method')->createAccess($plugin_id).
Impacts: 
Module developers