本文整理汇总了PHP中Magento\Framework\DataObject::getAdditionalData方法的典型用法代码示例。如果您正苦于以下问题:PHP DataObject::getAdditionalData方法的具体用法?PHP DataObject::getAdditionalData怎么用?PHP DataObject::getAdditionalData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\DataObject
的用法示例。
在下文中一共展示了DataObject::getAdditionalData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: assignData
public function assignData(DataObject $data)
{
$additional_data = new DataObject($data->getAdditionalData());
$info_instance = $this->getInfoInstance();
$info_instance->setAdditionalInformation('ticket', $additional_data->getData('ticket_response_ticket'));
$info_instance->setAdditionalInformation('hmac', $additional_data->getData('ticket_response_monetra_resp_hmacsha256'));
$info_instance->setAdditionalInformation('sequence', $additional_data->getData('ticket_request_sequence'));
$info_instance->setAdditionalInformation('timestamp', $additional_data->getData('ticket_request_timestamp'));
return $this;
}
示例2: assignData
/**
* Assign corresponding data
*
* @param \Magento\Framework\DataObject|mixed $data
* @return $this
* @throws LocalizedException
*/
public function assignData(\Magento\Framework\DataObject $data)
{
$additionalData = $data->getAdditionalData();
if (!is_array($data->getAdditionalData())) {
return $this;
}
$additionalData = new DataObject($additionalData);
$infoInstance = $this->getInfoInstance();
$infoInstance->setAdditionalInformation('payment_method_nonce', $additionalData->getData('payment_method_nonce'));
return $this;
}
示例3: assignData
/**
* Assign corresponding data
*
* @param \Magento\Framework\DataObject|mixed $data
* @return $this
* @throws LocalizedException
*/
public function assignData(\Magento\Framework\DataObject $data)
{
$additionalData = $data->getAdditionalData();
if (!is_array($data->getAdditionalData())) {
return $this;
}
$additionalData = new DataObject($additionalData);
$infoInstance = $this->getInfoInstance();
if ($this->getConfigData('fraudprotection') > 0) {
$infoInstance->setAdditionalInformation('device_data', $additionalData->getData('device_data'));
}
$infoInstance->setAdditionalInformation('cc_last4', $additionalData->getData('cc_last4'));
$infoInstance->setAdditionalInformation('cc_token', $additionalData->getData('cc_token'));
$infoInstance->setAdditionalInformation('payment_method_nonce', $additionalData->getData('payment_method_nonce'));
$infoInstance->setCcLast4($additionalData->getData('cc_last4'));
$infoInstance->setCcType($additionalData->getData('cc_type'));
$infoInstance->setCcExpMonth($additionalData->getData('cc_exp_month'));
$infoInstance->setCcExpYear($additionalData->getData('cc_exp_year'));
return $this;
}