@model Hims.Domain.Configurations.ISalucroConfiguration
@{
    Layout = null;

}
<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript">
        window.addEventListener("message", receiveMessage, false);
        function returnResponse(data) {
            document.getElementById("response").innerHTML = data.response;
            $("#iframeModal").modal("hide");
        }
        function receiveMessage(event) {
            returnResponse(event.data);
        }
    </script>
</head>
<body>
    <div class="payment-content">

        <form id="iframeForm" action="@Model.PaymentURL" method="post" target="iframe">

            <input type="hidden" name="token" id="token" value='{"auth":{"user":"@Model.User","key":"@Model.Key"},"username":"@ViewBag.UserName","accounts":[{"patient_name":"@ViewBag.PatientName","account_number":"@ViewBag.PatientUmrNo","amount":"@ViewBag.Amount","email":"","phone":""}],"processing_id":"@ViewBag.ProcessingId","payment_fill":"pre_full","paymode":"@ViewBag.PayMode","payment_location":"Test Hospital","transaction_id":"@ViewBag.TransactionId","custom":"@ViewBag.Custom","custom1":"@ViewBag.Custom1","custom2":"@ViewBag.Custom2","custom3":"@ViewBag.Custom3","custom4":"@ViewBag.Custom4","custom5":"@ViewBag.Custom5","custom6":"@ViewBag.Custom6","response_url":"@Model.ResponseURL","return_url":"@Model.ReturnURL"}' />

            <input type="hidden" name="mid" id="mid" value="@Model.MId" />

            <input type="hidden" name="check_sum_hash" id="check_sum_hash" value="@ViewBag.CheckSumHash" />

            <h3 class="text-center"><button id="paynow" type="submit" formtarget="_self">Pay Now</button></h3>
        </form>
        <div class="modal fade" id="iframeModal">
            <div class="modal-dialog" style="min-width:90%;">
                <div class="modal-content" id="iframeModalContent">
                    <iframe id="iframe" name="iframe" style="border:0; height:540px;" scrolling="yes" src="" width="100%"></iframe>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            var closeModal = function () {
                $("#iframeModal").modal("hide");
            }
            $(function () {
                $(document).on("click", "#paynow", function (mylogin) {
                    $('#iframeModal').modal('show');
                });
            });
            function hideLoading() {
                Loading(false);
            }

            function showLoading() {
                Loading(true);
            }
        </script>

    </div>
</body>
</html>