I'm trying to add a new field via KO in the payment method where paymentdata is collected. Right now all I see is the agreement_id
as part of it's parameter. Now I added another parameter which is the subscription_id
. But upon clicking the proceed button it say
Property "SubscriptionIds" does not have accessor method "getSubscriptionIds" in class "Magento\Quote\Api\Data\PaymentExtensionInterface".
Now I can't find this class in vendor/magento/module-quote/Api/Data
. I need to overwrite this class right now it's being defined in the generated
folder the content is this
<?php
namespace Magento\Quote\Api\Data;
/**
* Extension class for @see \Magento\Quote\Api\Data\PaymentInterface
*/
class PaymentExtension extends \Magento\Framework\Api\AbstractSimpleObject implements PaymentExtensionInterface
{
/**
* @return string[]|null
*/
public function getAgreementIds()
{
return $this->_get('agreement_ids');
}
/**
* @param string[] $agreementIds
* @return $this
*/
public function setAgreementIds($agreementIds)
{
$this->setData('agreement_ids', $agreementIds);
return $this;
}
}
But I can't find this in the vendor folder even though I looked in the vendor/magento/module-quote/Api/Data
Any idea on how to override this? As I need to retrieve the new parameter when submitting the order in the payment method page