本文整理匯總了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;
}