I am trying to use payment system with Angular. In the payment gateway API, 3D Secure Page exposing as an html in json. I am trying to put this html in an iframe. The main problem is html is not shown. When I try to inspect element on browser, there are html code in the iframe but not shown. What is the reason of it? How can I solve this?
payment.component.ts:
this.applicationService.pay(this.card).subscribe((data: any) => {
this.modalContent = data.content;
}
payment.component.html
<iframe [innerHTML]="modalContent | sanitizeHtml" frameborder="0"></iframe>
3d secure content example:
<!doctype html>↵<html lang="en">↵<head>↵ <title>iyzico Mock 3D-Secure Processing Page</title>↵</head>↵<body>↵<form id="iyzico-3ds-form" action="https://sandbox-api.iyzipay.com/payment/mock/init3ds" method="post">↵ <input type="hidden" name="orderId" value="mock64-7127975743472898iyziord">↵ <input type="hidden" name="bin" value="405418">↵ <input type="hidden" name="successUrl" value="https://sandbox-api.iyzipay.com/payment/iyzipos/callback3ds/success/37">↵ <input type="hidden" name="failureUrl" value="https://sandbox-api.iyzipay.com/payment/iyzipos/callback3ds/failure/37">↵ <input type="hidden" name="confirmationUrl" value="https://sandbox-api.iyzipay.com/payment/mock/confirm3ds">↵ <input type="hidden" name="PaReq" value="66e28140-1079-4f29-81c6-0220c720620e">↵</form>↵<script type="text/javascript">↵ document.getElementById("iyzico-3ds-form").submit();↵</script>↵</body>↵</html>
URLforiframeotherwise usedivinstead<iframe [innerHTML]="modalContent | sanitizeHtml" frameborder="0"></iframe>.