Skip to content

Commit 31bba13

Browse files
committed
MAGETWO-38902: Payment\Gateway update
- refactored configurable info block
1 parent 0585f36 commit 31bba13

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

app/code/Magento/Payment/Block/ConfigurableInfo.php

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,40 @@ protected function _prepareSpecificInformation($transport = null)
5858

5959
foreach ($fieldsToStore as $field) {
6060
if ($payment->getAdditionalInformation($field) !== null) {
61-
$transport->setData(
62-
(string)$this->getLabel($field),
63-
(string)$this->getValueView(
64-
$field,
65-
$payment->getAdditionalInformation($field)
66-
)
61+
$this->setDataToTransfer(
62+
$transport,
63+
$field,
64+
$payment->getAdditionalInformation($field)
6765
);
66+
6867
}
6968
}
7069

7170
return $transport;
7271
}
7372

73+
/**
74+
* Sets data to transport
75+
*
76+
* @param \Magento\Framework\Object $transport
77+
* @param string $field
78+
* @param string $value
79+
* @return void
80+
*/
81+
protected function setDataToTransfer(
82+
\Magento\Framework\Object $transport,
83+
$field,
84+
$value
85+
) {
86+
$transport->setData(
87+
(string)$this->getLabel($field),
88+
(string)$this->getValueView(
89+
$field,
90+
$value
91+
)
92+
);
93+
}
94+
7495
/**
7596
* Returns label
7697
*

0 commit comments

Comments
 (0)