<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<form id="pnPayForm" name="pnPayForm" action="" method="post">
	<input name="order_no" id="order_no" type="hidden" value=""/>
	<input name="order_detail" id="order_detail" type="hidden" value=""/>
	<input name="total_fee" id="total_fee" type="hidden" value=""/>
	<input name="sign" id="sign" type="hidden" value=""/>
	<input name="return_url" id="return_url" type="hidden" value=""/>
	<input name="channel_id" id="channel_id" type="hidden" value=""/>
</form>
<jsp:include page="../../../index/multi_init_param.jsp"/>
<script type="text/javascript" src="<c:url value='/resources/versions-2.0/js/jquery.min.js' />"></script>
<script type="text/javascript" src="<c:url value='/resources/js/layer/layer.js'/>"></script>
<script>
    var baseUrl = '${pageContext.request.contextPath }';

    function changeFrameHeight(){
        var topWindow;
        for(topWindow=window;topWindow.parent!=null && topWindow.parent!=topWindow;topWindow=topWindow.parent){
            for(var i=0;i<topWindow.parent.frames.length;i++){
                var isIframe = true;
                try {
                    topWindow.parent.frames[i].window.document;
                }catch (e) {
                    isIframe = false;
                }
                if(isIframe){
                    var tObj = topWindow.parent.frames[i];
                    if(tObj.window.document==topWindow.document){
                        var tName = tObj.name;
                        if(tName != ''){
                            if(tName.indexOf('frame3d')!=-1){
//                                console.log(parent.document.getElementById("frame3d").height);
                                parent.document.getElementById("frame3d").height=600;
                            }
                        }
                    }
                }
            }
        }
    }
    changeFrameHeight();
    $(function(){
        $.ajax({
            type: 'POST',
            url: baseUrl + "/PA-API/paCheckstand",
            data:{oid:'${dto.oid}'},
            dataType:"json",
            cache: false,
            success: function(data){
                $("#order_no").val(data.order_no);
                $("#order_detail").val(data.order_detail);
                $("#total_fee").val(data.total_fee);
                $("#sign").val(data.sign);
                $("#return_url").val(data.return_url);
                $("#channel_id").val(data.channel_id);
                $("#pnPayForm").attr("action",data.url);
                $("#pnPayForm").submit();
            }
        });
    });

</script>