Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

libai / fireflyReg

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • fireflyReg
  • appPhonePay
  • phonepay
  • weipayfor.html
Find file
BlameHistoryPermalink
  • libai's avatar
    测试 · 8e24e39a
    libai committed a year ago
    8e24e39a
weipayfor.html 11.1 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
<!DOCTYPE html>
<html>
<head lang="en">
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-115294467-1"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'UA-115294467-1');
    </script>
    <meta charset="UTF-8">
    <meta name="viewport"   content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta content="telephone=no" name="format-detection">
    <meta name="wap-font-scale" content="no">
    <link rel="stylesheet" href="../css/base.css"/>
    <link rel="stylesheet" href="../css/phonepay.css?v='20180509'"/>
    <script src="../lib/jquery-3.1.1.min.js"></script>
    <link rel="stylesheet" href="../css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/layer.css">
    <title>寶石儲值</title>
    <meta name="keywords" content="firefly,直播福利,直播,uplive,美女直播,美女視頻,泡泡寶盒,視頻直播,一直播,rc唱唱,美女直播間,丫播直播">
    <meta name="description" content="firefly直播,深夜福利派送秀場。花樣主播私密秀,直播分享生活日常,記錄生活點點滴滴,陪你一起度過最美的時光,在直播間偶遇你的TA,連麥私聊,親密互動,說說生活,聊聊人生,談談理想......">
</head>
<body class="alipay">
<!--<h3 class="lo-top">firefly線上儲值</h3>-->
<div style="padding-top: 1rem;"></div>
<div style="height: 0.8rem;background: #F7F7F7;"></div>
<div class="nav">
    <span>用戶登錄></span>
    <span id="pitch">儲值金額></span>
    <span>儲值完成</span>
</div>
<div style="margin-bottom: 5rem;">
    <ul style="height: 20rem;" class="more-pay clearfix">
    </ul>
</div>
<div class="b-btn">
    <a href="login.html"><div><button class="s-btn btn">返回</button></div></a>
    <div class="paypalh">
        <div><button class="next-btn btn" disabled="disabled">确认</button></div>
    </div>

    <p style="text-align: center;color: #FE6B0B; margin-top: 2rem;">*如果出現儲值問題,請登錄firefly并聯繫客服</p>
</div>

<div style="display: none;width: 280px;height: 280px;position: relative;" id="tong">
    <div style="width: 256px;height: 256px;position: absolute;margin: auto;top: 0;left: 0;right: 0;bottom: 0;" id="qrcode"></div>
</div>

</body>
<script src="../lib/globalization.js"></script>
<script src="../lib/paypel.js"></script>
<script src="../lib/qrcode.min.js"></script>
<script src="../layer-v3.1.0/layer/layer.js"></script>
<script src="../lib/jquery.cookie.js"></script>
<script>
    var $ip="https://webserver.yabolive.net";
//var $ip='http://ceshi.yabolive.tv/web'
    $.ajax({
        url:$ip+"/setting/getRecharge.html",
        type:"post",
        data:{
            'cid':"web_gw",
            'os':"h5",
            lang:sessionStorage.lang,
            'vest':0,
            'paytype':sessionStorage.pay
        },
        error:function(msg){
            console.log('请求出错');
        },
        success: function (msg) {
            var data=JSON.parse(msg);
            var html=[];
            for(var i=0;i<data.data.length;i++){
                html+="<li>";
                html+="<div class='p-top'><img src='../img/zuan.png'><span>"+data.data[i].diamond+"</span></div>";
                html+="<div class='p-bot'><span>"+data.data[i].price[0].currency+"</span><span>"+data.data[i].price[0].price+"</span></div>";
                html+="<span style='visibility: hidden'>"+data.data[i].rid+"</span>";
                html+="</li>";
            }
            $(".more-pay").html(html);

            $(".more-pay li").on("click", function () {
                $(this).siblings("li").removeClass("p-active");
                $(this).addClass("p-active");
                rid= $(this).children().eq(2).text();
                money=$(this).children().eq(1).children().eq(1).text();
                var html=[];
                html+='<div><button class="next-btn btn" id="next-go">确认</button></div>';
                $(".paypalh").html(html);
//                $(".next-btn").attr("id","next-go");
//                $('.next-btn').attr("disabled",false);
                $(".next-btn").on("click", function () {
                    if(sessionStorage.pay=="PAYPALPAY") {
                        $.ajax({
                            url:$ip+"/pay/getPayPreid.html",
                            type:"post",
                            data:{
                                'cid':"web_gw",
                                'os':"h5",
                                lang:sessionStorage.lang,
                                'uid':sessionStorage.uid,
                                'product':"橙钻充值",
                                'country':"86",
                                'rid':rid,
                                'payType':sessionStorage.pay,
                                'payTypeSub':"NAVITE",
                                'amount':money*100,
                                'extend':"0",
                            },
                            success: function (msg) {
                                var data =JSON.parse(msg);
                                $.cookie('oid',data.orderId,{expires:1});
                                sessionStorage.oid=data.orderId;
                                key=data.payInfo.key;
                                var html1=[];
                                html1+="<div class='paypalpay'>";
                                html1+="<div id=paypal-button-container></div>";
                                html1+="</div>";
                                $(".paypalh").html(html1);
                                paypal.Button.render({

                                    env: 'production', // sandbox | production

                                    // PayPal Client IDs - replace with your own
                                    // Create a PayPal app: https://developer.paypal.com/developer/applications/create
                                    client: {
                                        production:key,
//            production: '<insert production client id>'
                                    },
                                    style: {
                                        color: 'gold',
                                        size: 'large',
                                        shape:'rect',
                                        locale:'zh_US',

                                    },
                                    // Show the buyer a 'Pay Now' button in the checkout flow
                                    commit: true,

                                    // payment() is called when the button is clicked
                                    payment: function(data, actions) {



                                        // Make a call to the REST api to create the payment
                                        return actions.payment.create({
                                            payment: {
                                                transactions: [
                                                    {
                                                        amount: { total: money, currency: 'USD' },
                                                        custom: sessionStorage.oid,
                                                    }
                                                ]
                                            }
                                        });
                                    },

                                    // onAuthorize() is called when the buyer approves the payment
                                    onAuthorize: function(data, actions) {

                                        // Make a call to the REST api to execute the payment
                                        return actions.payment.execute().then(function() {
                                            setInterval(function () {
                                                window.location.href='payend.html';
                                            },1000)

                                        });
                                    }

                                }, '#paypal-button-container');
                            }
                        })
                    }
                    else if(sessionStorage.pay=="ALIPAY"){
                        $.ajax({
                            url:$ip+"/pay/getPayPreid.html",
                            type:"post",
                            data:{
                                'cid':"web_gw",
                                'os':"h5",
                                lang:sessionStorage.lang,
                                'uid':sessionStorage.uid,
                                'product':"橙钻充值",
                                'country':"86",
                                'rid':rid,
                                'payType':sessionStorage.pay,
                                'payTypeSub':"H5",
                                'amount':money*100,
                                'extend':"https://www.yabolive.tv/phonepay/payend.html",
                            },
                            success: function (msg) {
                                var data =JSON.parse(msg);
                                $.cookie('oid',data.orderId,{expires:1});
                                sessionStorage.oid=data.orderId;
                                var html=[];
                                html+=data.payInfo.h5
                                $(".alipay").html(html);
                            }
                        })
                    }
                    else if(sessionStorage.pay=="WECHATPAY"){
                        $.ajax({
                            url:$ip+"/pay/getPayPreid.html",
                            type:"post",
                            data:{
                                'cid':"web_gw",
                                'os':"h5",
                                lang:sessionStorage.lang,
                                'uid':sessionStorage.uid,
                                'product':"橙钻充值",
                                'country':"86",
                                'rid':rid,
                                'payType':sessionStorage.pay,
                                'payTypeSub':"MWEB",
                                'amount':money*100,
                                'extend':"https://www.yabolive.tv/phonepay/payend.html",
                            },
                            success: function (msg) {
                                var data = JSON.parse(msg);
                                $.cookie('oid',data.orderId,{expires:1});
                                sessionStorage.oid=data.orderId;
                                var url =data.payInfo.mweb_url;
                                window.location.href=url;
                            }

                        })
                    }
                })
            })


        }
    })

</script>
</html>