<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Payment.aspx.cs" Inherits="AngelShop.Payment" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head2" runat="server">
    <title><%=Angel.Common.Ashop_WebSetting.WebName%></title>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <asp:Literal ID="LitMeta" runat="server"></asp:Literal>
    <link rel="shortcut icon" href="images/ico_subnav.jpg" />
    <link href="style/global.css" rel="stylesheet" type="text/css" />
    <link href="style/style.css" rel="stylesheet" type="text/css" />
    <link href="style/style1.css" rel="stylesheet" type="text/css" />
    <script src="JS/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {

            $("#subpayment").hide();

            $("#submit1").click(function () {
                var orderlist = $("#hidden2").val();
                $.ajax({
                    type: 'get',
                    url: '/tools/submit_ajax.ashx?action=edit_order_paymentid&pid=' + orderlist,
                    dataType: "json",
                    beforeSend: function (XMLHttpRequest) {
                    },
                    success: function (result) {
                        $('#form2').submit();
                    }
                });
            });

            //Traversing specification attributes
            $("#paylists ul li a").each(function () {
                $(this).click(function () {
                    if (!$(this).hasClass("selected")) {
                        $("#subpayment").show();
                        //Label selected
                        $(this).parent().siblings("li").children("a").removeClass("selected");
                        $(this).addClass("selected");

                        //

                        $("input[name='pm_id']").val($(this).attr("paycode"));



                        var pm_id = $(this).attr("paycode");
                        var orderid = $("input[name='order_id']").val();
                        var amount = $("input[name='amount']").val();

                        $.ajax({
                            type: 'get',
                            dataType: "json",
                            url: '/tools/submit_ajax.ashx?action=sig&pm_id=' + pm_id + "&amount=" + amount + "&x_oid=" + orderid,
                            beforeSend: function (XMLHttpRequest) {
                            },
                            success: function (data) {
                                if (data.status == 1) {
                                    $("input[name='api_sig']").val(data.sig);
                                } else {
                                    $("input[name='api_sig']").val("");
                                }

                            }
                        });


                        //  

                        // $("#output li img").attr("src", $(this).attr("imgs"));

                    }
                });
            });


        });




        function checkNull() {
            //  var num = 0;
            //   var str = "";

            var pm_id = $("input[name='pm_id']").val();
            var api_sig = $("input[name='api_sig']").val();


            if (pm_id == "" || api_sig == "") {
                alert("Incorrect payment method, please contact official staff!!");
                return false

            } else {

                return true;
            }


        }


    </script>
</head>
<body>
    <style type="text/css">
    
        {
            margin: 0px;
            padding: 0px;
            border-top-width: 0px;
            border-right-width: 0px;
            border-bottom-width: 0px;
            border-left-width: 0px;
            font-size: 12px;
        }
        body
        {
            margin:auto;
        }
        #pic
        {
            width: 604px;
        }
        #pic h1
        {
            font-size: 14px;
            color: #000000;
            background-color: #CCCCCC;
            line-height: 20px;
            text-indent: 5px;
            height: 20px;
        }
        #demo
        {
            background: #FFF;
            overflow: hidden;
            width: 590px;
            margin-right: 5px;
            margin-left: 5px;
        }
        #demo img
        {
        }
        #indemo
        {
            float: left;
            width: 800%;
        }
        #demo1
        {
            float: left;
        }
        #demo1 ul
        {
            list-style-type: none;
        }
        #demo1 li
        {
            width: 106px;
            margin-left: 30px;
            text-align: center;
            float: left;
        }
        #demo2 ul
        {
            list-style-type: none;
        }
        #demo2 li
        {
            width: 106px;
            margin-left: 30px;
            text-align: center;
            float: left;
        }
        #demo2
        {
            float: left;
        }
        #demo1 a
        {
            color: #666666;
            text-decoration: none;
        }
           
#topNotice { width:960px;background:#E24E06; padding:0px;text-align:left;margin-bottom:0px;padding-bottom:10px;height: auto;}
#topNotice P {color:#ffffff; padding: 5px 0px 0px 30px; margin: 0px; line-height: 120%; font-family: arial, helvetica, sans-serif; height: auto;}
#topNotice .topNotice_close { padding: 0px; float: right; margin: 4px 10px 0px; cursor: pointer;}       
     
        .items li
        {
            position: relative;
            float: left;
            margin: 0 5px 8px 0;
            padding: 1px;
            line-height: 20px;
            vertical-align: middle;
        }
        .items li a
        {
            display: block;
            padding: 6px;
            color: #666;
            min-width: 10px;
            width: auto !important;
            text-align: center;
            text-decoration: none;
            border: 1px solid #eee;
            cursor: pointer;
            white-space: nowrap;
            text-overflow: ellipsis;
            vertical-align: middle;
        }
        .items li a span
        {
            display: inline-block;
            padding: 5px 9px;
            font-style: normal;
            line-height: 20px;
        }
        .items li a img
        {
            width: 138px;
            height: 42px;
            vertical-align: middle;
        }
        .items li a.selected
        {
            margin: -1px;
            color: #333;
            border: 2px solid #f40;
            color: #f40;
        }   
     
     
     </style>
    <%=webSiteNotices%>
    <div class="tou">
        <div class="tou_1">
            <a href="index.aspx">
                <img src="images/LOGO.jpg" width="188" height="146" /></a></div>
        <div class="tou_2">
            <div class="tou_12">
                <span id="localtime"></span>
                <script type="text/javascript" language="javascript">
                    function showLocale(objD) {
                        var str, colorhead, colorfoot;
                        var yy = objD.getYear();
                        if (yy < 1900) yy = yy + 1900;
                        var MM = objD.getMonth() + 1;
                        if (MM < 10) MM = '0' + MM;
                        var dd = objD.getDate();
                        if (dd < 10) dd = '0' + dd;
                        var hh = objD.getHours();
                        if (hh < 10) hh = '0' + hh;
                        var mm = objD.getMinutes();
                        if (mm < 10) mm = '0' + mm;
                        var ss = objD.getSeconds();
                        if (ss < 10) ss = '0' + ss;
                        var ww = objD.getDay();
                        if (ww == 0) colorhead = "<font color=\"#FF0000\">";
                        if (ww > 0 && ww < 6) colorhead = "<font color=\"#373737\">";
                        if (ww == 6) colorhead = "<font color=\"#008000\">";
                        if (ww == 0) ww = "Sunday";
                        if (ww == 1) ww = "Monday";
                        if (ww == 2) ww = "Tuesday";
                        if (ww == 3) ww = "Wednesday";
                        if (ww == 4) ww = "Thursday";
                        if (ww == 5) ww = "Friday";
                        if (ww == 6) ww = "Saturday";
                        colorfoot = "</font>"

                        var y2 = String(yy);
                        var u3 = y2.slice(2);
                        str = "China " + MM + "-" + dd + "-" + u3 + " " + hh + ":" + mm + ":" + ss;
                        return (str);
                    }
                    function tick() {
                        var today;
                        today = new Date();
                        document.getElementById("localtime").innerHTML = showLocale(today);
                        window.setTimeout("tick()", 1000);
                    }
                    tick();
                </script>
            </div>
            <div class="tou_22">
                <div class="tou_78">
                    <div id="pic">
                        <div id="demo">
                            <div id="indemo">
                                <div id="demo1">
                                    <asp:Repeater ID="rptProducts" runat="server">
                                        <HeaderTemplate>
                                            <ul>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <li><a href="Products.aspx?gn=<%# Eval("id") %>">
                                                <img src="<%# Eval("Image") %>" width="98" height="44" /></a></li>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </ul>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                </div>
                                <div id="demo2">
                                </div>
                            </div>
                        </div>
                        <div style="clear: both">
                        </div>
                    </div>
                    <script src="JS/js_left.js" type="text/javascript"></script>
                </div>
                <div class="tou_79">
                    <a href="sitemap.aspx">
                        <img src="images/ann_06.jpg" /></a>
                </div>
            </div>
            <div class="tou_32">
                <ul>
                    <li><a href="Video.aspx">Repair</a><span></span></li>
                    <li><a href="About.aspx">About Us</a></li>
                    <li><a href="News.aspx">News</a></li>
                    <li><a href="products.aspx">Products</a></li>
                    <li><a href="denglu.aspx">Member</a></li>
                    <li><a href="ShoppingCart.aspx">Shopping </a></li>
                    <li><a href="OrderHelp.aspx">Order Help </a></li>
                    <li style="background: 0;"><a href="Contact.aspx">Contact</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div style="text-align: center;border:1px #cccccc solid;width:960px;margin-top:5px;">
        <%--     <form id="Form1" method="post" action="<%Response.Write (URL);%>">       
        <input type="hidden" name="cmd" value="<%Response.Write (cmd);%>">
        <input type="hidden" name="business" value="<%Response.Write (business);%>">
        <input type="hidden" name="item_name" value="<%Response.Write (item_name);%>">
        <div style="width:300px;text-align:left;margin:auto">The total payment：<%Response.Write (amount);%></div>
        <div  style="width:300px;text-align:left;margin:auto">Order No：<%Response.Write (OrderNoid);%></div>
        <input type="hidden" name="amount" value="<%Response.Write (amount);%>">
        <input type="hidden" name="no_shipping" value="<%Response.Write (no_shipping);%>">
        <input type="hidden" name="return" value="<%Response.Write (return_url);%>">
        <input type="hidden" name="rm" value="<%Response.Write (rm);%>">
        <input type="hidden" name="notify_url" value="<%Response.Write (notify_url);%>">
        <input type="hidden" name="cancel_return" value="<%Response.Write (cancel_url);%>">
        <input type="hidden" name="currency_code" value="<%Response.Write (currency_code);%>">
        <input type="hidden" name="custom" value="<%Response.Write (request_id);%>">
       <div style="width:300px;text-align:left;margin:auto"> <input name="Paypal" type="button" style="background:url('images/paybutton.gif');width:95px;height:60px;" onclick="javaScript:this.form.submit();"></div>
    </form>--%>
        <form id="form2" runat="server" action="https://pay.yizhifubj.com/prs/e_user_payment.checkit">
        <input id="hidden1" type="hidden" name="v_mid" value="<%=v_mid%>" />
        <input id="hidden2" type="hidden" name="v_oid" value="<%=v_oid%>" />
        <div style="width: 300px; text-align: left; margin: auto; height: 30px">
        </div>
        <div style="width: 300px; text-align: left; margin: auto">
            The total payment：<%Response.Write(amount);%></div>
        <div style="width: 300px; text-align: left; margin: auto">
            Order No：<%Response.Write(OrderNoid);%></div>
   
        <input id="hidden5" type="hidden" name="v_rcvname" value="<%=v_rcvname%>" />
        <input id="hidden4" type="hidden" name="v_rcvtel" value="<%=v_rcvtel%>" />
        <input id="hidden6" type="hidden" name="v_rcvpost" value="<%=v_rcvpost%>" />
        <input id="hidden7" type="hidden" name="v_amount" value="<%=v_amount%>" />
        <input id="hidden8" type="hidden" name="v_ymd" value="<%=v_ymd%>" />
        <input id="hidden3" type="hidden" name="v_rcvaddr" value="<%=v_rcvaddr%>" />
        <input id="hidden9" type="hidden" name="v_ordername" value="<%=v_ordername%>" />
        <input id="hidden10" type="hidden" name="v_orderstatus" value="<%=v_orderstatus%>" />
        <br />
        <input id="hidden11" type="hidden" name="v_moneytype" value="<%=v_moneytype%>" />
        <input id="hidden12" type="hidden" name="v_url" value="<%=v_url%>" />
        <input id="hidden13" type="hidden" name="v_md5info" value="<%=v_md5info%>" />
        <input id="hidden14" type="hidden" name="v_shipstreet" value="<%=v_shipstreet%>" />
        <input id="hidden15" type="hidden" name="v_shipcity" value="<%=v_shipcity%>" />
        <input id="hidden16" type="hidden" name="v_shipstate" value="<%=v_shipstate%>" />
        <input id="hidden17" type="hidden" name="v_shippost" value="<%=v_shippost%>" />
        <input id="hidden18" type="hidden" name="v_shipcountry" value="<%=v_shipcountry%>" />
        <input id="hidden19" type="hidden" name="v_shipphone" value="<%=v_shipphone%>" />
        <input id="hidden20" type="hidden" name="v_shipemail" value="<%=v_shipemail%>" />
        <input id="hidden21" type="hidden" name="v_billstreet" value="<%=v_billstreet%>" />
        <input id="hidden22" type="hidden" name="v_billcity" value="<%=v_billcity%>" />
        <input id="hidden23" type="hidden" name="v_billstate" value="<%=v_billstate%>" />
        <input id="hidden24" type="hidden" name="v_billpost" value="<%=v_billpost%>" />
        <input id="hidden25" type="hidden" name="v_billcountry" value="<%=v_billcountry%>" />
        <input id="hidden26" type="hidden" name="v_billphone" value="<%=v_billphone%>" />
        <input id="hidden27" type="hidden" name="v_billemail" value="<%=v_billemail%>" />
        <div style="width: 300px; text-align: left; margin: auto">
            <input id="submit1" type="button" value=" " style="background: url('images/VisaMasterLogo.jpg');
                width: 158px; height: 76px;" />
        </div>
        <div style="width: 300px; text-align: left; margin: auto; clear: both; height: 30px;">
        </div>
        </form>
        <div style="width: 300px; text-align: left; margin: auto;">
            <a class='payssion-button pay_now_large' data-key='3ec5398a60e859fd'><i class='fa fa-shopping-cart'>
            </i>&nbsp;Pay Via Payssion</a><script src='https://www.payssion.com/static/checkout/button.js'
                type='text/javascript'></script>
        </div>
        <form name="payssion_payment" action="<%=actionurl%>" method="post">
        <div id="paylists" style="margin-left:6px;text-align:center;">
            <ul class="items">
                <%= otherpay()%></ul>
        </div>
        <input type="hidden" name="api_key" value="<%=api_key%>">
        <input type="hidden" name="api_sig" value="<%=xin_sig%>">
        <input type="hidden" name="pm_id" value="<%=pm_id%>">
        <input id="hidden2" type="hidden" name="order_id" value="<%=x_oid%>">
        <input type="hidden" name="description" value="<%=x_description%>">
        <input type="hidden" name="amount" value="<%=v_amount%>">
        <input type="hidden" name="currency" value="<%=currency%>">
        <input type="hidden" name="return_url" value="<%=x_url%>">
        <input type="hidden" name="payer_email" value="<%=p_useremail%>">
        <%--    <input type="submit" value="Submit"  style="background:url('images/VisaMasterLogo.jpg');width:158px;height:76px;" />--%>
        <div style="clear: both; height: 38px;">
            <div style="width: 160px; float: left; line-height: 38px;" id="show_amount">
                Amount:<%=v_amount%></div>
            <div style="width: 300px; float: left; line-height: 38px;">
                Email:<asp:Label ID="Useremail" runat="server" Text="0"></asp:Label>
            </div>
        </div>
        <div style="clear: both; margin-bottom: 10px;" id="subpayment">
            <input type="submit" value="Pay" style="width: 138px; height: 42px;" onclick="return checkNull()" /></div>
        </form>
    </div>
    <div class="dibu">
        <div class="dibu_1">
            <img src="images/dixia_03.jpg" width="92" height="84" /></div>
        <div class="dibu_2">
            <asp:Literal ID="LinkList" runat="server"></asp:Literal>
        </div>
        <div class="dibu_3" style="text-align: right">
            <asp:Repeater ID="rptBto" runat="server">
                <ItemTemplate>
                    TEL:<%# Eval("tell_bt ") %><br />
                    <%# Eval("Copyright") %></ul>
                </ItemTemplate>
            </asp:Repeater>
        </div>
    </div>
</body>
</html>
