Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SalesOrderPaymentDataConverter.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Sales\Setup;
7 
10 
15 {
24  public function convert($value)
25  {
26  if ($this->isValidJsonValue($value)) {
27  return $value;
28  }
29 
30  $unserializedValue = $this->unserializeValue($value);
31  if (isset($unserializedValue['token_metadata'])) {
32  $unserializedValue['customer_id'] = $unserializedValue['token_metadata']['customer_id'];
33  $unserializedValue['public_hash'] = $unserializedValue['token_metadata']['public_hash'];
34  unset($unserializedValue['token_metadata']);
35  }
36 
37  return $this->encodeJson($unserializedValue);
38  }
39 }
$value
Definition: gender.phtml:16