Автор: Adam Piotrowski (adam@wellcommerce.org)
Наследование: extends WellCommerce\Bundle\CoreBundle\Entity\TimestampableInterface, extends WellCommerce\Bundle\CoreBundle\Entity\TranslatableInterface, extends WellCommerce\Bundle\CoreBundle\Entity\BlameableInterface, extends WellCommerce\Bundle\AppBundle\Entity\HierarchyAwareInterface
 public function configure(PaymentMethodInterface $paymentMethod)
 {
     $configuration = $paymentMethod->getConfiguration();
     $resolver = new OptionsResolver();
     $this->configureOptions($resolver);
     $this->configuration = $resolver->resolve($configuration);
 }
 /**
  * Creates and filters the configuration collection
  *
  * @param object|PaymentMethodInterface $paymentMethod
  * @param array                         $values
  *
  * @return Collection|static
  */
 protected function createConfigurationCollection(PaymentMethodInterface $paymentMethod, array $values = [])
 {
     $processor = $paymentMethod->getProcessor();
     $collection = new ArrayCollection();
     foreach ($values as $name => $value) {
         $configuration = $this->factory->create();
         $configuration->setName($name);
         $configuration->setPaymentMethod($paymentMethod);
         $configuration->setValue($value);
         $collection->add($configuration);
     }
     return $collection->filter(function (PaymentMethodConfigurationInterface $configuration) use($processor) {
         return substr($configuration->getName(), 0, strlen($processor)) === $processor;
     });
 }