30 protected $_infoBlockType = \Magento\Paypal\Block\Payment\Info\Billing\Agreement::class;
35 protected $_formBlockType = \Magento\Paypal\Block\Payment\Form\Billing\Agreement::class;
66 \
Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory,
71 \
Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory,
76 $this->_agreementFactory = $agreementFactory;
116 parent::assignData(
$data);
120 if (!is_array($additionalData) || !isset($additionalData[self::TRANSPORT_BILLING_AGREEMENT_ID])) {
125 if (!
$id || !is_numeric(
$id)) {
131 $ba = $this->_agreementFactory->create();
134 if ($ba->getId() && $ba->getCustomerId() ==
$info->getQuote()->getCustomerId()) {
135 $info->setAdditionalInformation(self::TRANSPORT_BILLING_AGREEMENT_ID,
$id);
136 $info->setAdditionalInformation(self::PAYMENT_INFO_REFERENCE_ID, $ba->getReferenceId());
const TRANSPORT_BILLING_AGREEMENT_ID
const KEY_ADDITIONAL_DATA
__construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Payment\Model\Method\Logger $logger, \Magento\Paypal\Model\Billing\AgreementFactory $agreementFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[])
isAvailable(\Magento\Quote\Api\Data\CartInterface $quote=null)
const PAYMENT_INFO_REFERENCE_ID
assignData(\Magento\Framework\DataObject $data)
foreach( $_productCollection as $_product)() ?>" class $info