Skip to content

Commit 3ed28e1

Browse files
committed
MAGETWO-32921: Adapt Payment\Gateway framework to client requirement
- turned off libxml errors for html form converter
1 parent 0489af9 commit 3ed28e1

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

app/code/Magento/Payment/Block/Transparent/Form.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@ public function getCgiUrl()
169169
*/
170170
public function getMethodConfigData($fieldName)
171171
{
172-
if ($this->getMethod() instanceof TransparentInterface) {
173-
return $this->getMethod()->getConfigInterface()->getValue($fieldName);
172+
$method = $this->getMethod();
173+
if ($method instanceof TransparentInterface) {
174+
return $method->getConfigInterface()->getValue($fieldName);
174175
}
175-
return $this->getMethod()->getConfigData($fieldName);
176+
return $method->getConfigData($fieldName);
176177
}
177178

178179
/**

app/code/Magento/Payment/Gateway/Http/Converter/HtmlFormConverter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ class HtmlFormConverter implements ConverterInterface
2020
public function convert($response)
2121
{
2222
$document = new \DOMDocument();
23+
24+
libxml_use_internal_errors(true);
2325
if (!$document->loadHTML($response)) {
2426
throw new ConverterException(__('Wrong gateway response format.'));
2527
}
28+
libxml_use_internal_errors(false);
29+
2630
$document->getElementsByTagName('input');
2731

2832
$convertedResponse = [];

0 commit comments

Comments
 (0)