3

In payment methods

\Magento\Payment\Model\Method\AbstractMethod

\Magento\Payment\Model\Method\Cc

both are deprecated.

In stead to extends both method now as per this link , we should implements

\Magento\Payment\Model\MethodInterface

Is there any specific reason for deprecated both class ? because if we implements interface we have to defined all methods in our base class, and its lots of other work added for payment gateway developers.

I am looking for brief explanations with reasons if any have idea about that.

5

Magento provides new way for payment integrations - Magento Payment Provider Gateway.

The \Magento\Payment\Model\Method\AbstractMethod is too complicated for customization, requires using inheritance instead of composition and code duplication for customizations. New infrastructure solves these issues.

To do not support both approaches the AbstractMethod has been deprecated in 2.1.0 release and will be removed in some of the next product major releases (it has not been removed to don't break backward compatibility and give time for 3rd party developers to move their extensions).

Magento\Payment\Model\Method\Cc has been deprecated for two main reasons:

  1. It extends AbstractMethod.
  2. It doesn't follow PCI compliance (the most import).

As summary. In most cases, you don't need to implement \Magento\Payment\Model\MethodInterface all infrastructure already prepared for payment integrations. Magento payment integrations like Braintree, Cybersource, eWay, Worldpay, partially PayPal PayflowPro already use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.