Skip to content

Commit

Permalink
fix issue #162
Browse files Browse the repository at this point in the history
  • Loading branch information
nuryagdym committed Oct 31, 2023
1 parent 5022b51 commit 59bf29a
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 38 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"ext-SimpleXML": "*",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-openssl": "*",
"php-http/discovery": "^1.14",
"psr/http-client-implementation": "*",
Expand Down
6 changes: 5 additions & 1 deletion src/Gateways/KuveytPos.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,11 @@ private function getCommon3DFormData(KuveytPosAccount $account, $order, string $
private function transformReceived3DFormData(string $response): array
{
$dom = new DOMDocument();
$dom->loadHTML($response);
/**
* Kuveyt Pos started sending HTML with custom HTML tags such as <APM_DO_NOT_TOUCH>.
* Without LIBXML_NOERROR flag loadHTML throws "Tag apm_do_not_touch invalid in Entity" exception
*/
$dom->loadHTML($response, LIBXML_NOERROR);

$gatewayURL = '';
/** @var \DOMElement $formNode */
Expand Down
Loading

0 comments on commit 59bf29a

Please sign in to comment.