찾다

 >  Q&A  >  본문

javascript - 银联在线支付接口,qq浏览器不能跳转

银联在线支付接口,qq浏览器不能跳转,其他浏览器可以跳转

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

<code>//html代码

<p class="tr">

    <form  action="" method="POST" id="commitorder" name="payment" target="_blank" >

        <input type="hidden" name="MerId" value="" id="MerId" />

        <input type="hidden" name="OrdId" value="" id="OrdId" />

        <input type="hidden" name="TransAmt" value="" id="TransAmt" />

        <input type="hidden" name="CuryId" value="156" />

        <input type="hidden" name="TransDate" value="" id="TransDate" />

        <input type="hidden" name="TransType" value="" id="TransType" />

        <input type="hidden" name="Version" value="" id="Version" />

        <input type="hidden" name="BgRetUrl" value="" id="BgRetUrl" >

        <input type="hidden" name="PageRetUrl" value="<?php echo Yii::app()->

        request->hostInfo;?>/index.php/user/usercenter/index" id="PageRetUrl">

        <input type="hidden" name="Priv1" value="" id="Priv1">

        <input type="hidden" name="ChkValue" value="" id="ChkValue">

        <input type="hidden" name="GateId" value="" id="GateId">

        <input type="hidden" name="ClientIp" value="" id="ClientIp">

        <button type="submit" rel="" id="tijiao"  style="position: absolute;z-index: -9;left: -999px;opacity: 0;"  class="button button-primary">提交</button>

    </form>

    <span class="td_1 _td_2"></span>

    <span class="text-center">

        <button type="button" rel="login_sign" onclick="<?php if(FrontSession::get('userSession')){?>

            topupmoney()

            <?php }else{?>

            tipmessage()

            <?php }?>" class="button button-primary green">确认充值</button>

    </span>

</p>

</code>

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

<code>//js代码

function topupmoney() { //充值

    var bank_card = $('#bank_card').val(); //银行卡绑定与否

    var topup_amount = $('#topup_amount').val(); //充值金额

    var clientIp = $('#client_ip').val(); //客户端ip

    if (topup_amount == '') {

        tusi('您的充值金额不合法');

    } else {

        //              if (bank_card == '') {

        //                  tusi('您未绑定银行卡');

        //              }else{

        $.ajax({

            url: '/index.php/user/usercenter/bankpay',

            type: 'post',

            data: {

                money: topup_amount,

                clientIp: clientIp

            },

            dataType: 'JSON',

            success: function(re) {

                $('#topmoney').html(re['rechargeamt']);

                $('#fee').html(re['fee']);

                $('#ordernum').html(re['OrdId']);

 

                $('#MerId').val(re['MerId']);

                $('#OrdId').val(re['OrdId']);

                $('#TransAmt').val(re['TransAmt']);

                $('#TransDate').val(re['TransDate']);

                $('#TransType').val(re['TransType']);

                $('#Version').val(re['Version']);

                $('#BgRetUrl').val(re['BgRetUrl']);

                //$('#PageRetUrl').val(re['PageRetUrl']);

                $('#Priv1').val(re['Priv1']);

                $('#ChkValue').val(re['ChkValue']);

                $('#GateId').val(re['GateId']);

                $('#ClientIp').val(re['ClientIp']);

                $('#commitorder').attr('action', re['pay_url']);

            }

        })

        $('#topup_mengban').fadeIn(500); //充值后 跳转页面是显示

        $('p[rle="topup"]').show();

        $('#pblem').hide();

        setTimeout("$('#tijiao').click()", 2000); //定时提交银联form表单

        //              };

 

    }

}

</code>

怪我咯怪我咯2833일 전1078

모든 응답(0)나는 대답할 것이다

답장 없음
  • 취소회신하다