Subversion Repositories SmartDukaan

Rev

Rev 12997 | Rev 13013 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12997 Rev 13010
Line 10... Line 10...
10
    <div><?php echo $recharge_orderconfirmation[0]->response->rechargeStatus; ?></div>
10
    <div><?php echo $recharge_orderconfirmation[0]->response->rechargeStatus; ?></div>
11
<?php if(isset($recharge_orderconfirmation[0]->response->isOperatorAsynchronous) && $recharge_orderconfirmation[0]->response->isOperatorAsynchronous ==1):?>
11
<?php if(isset($recharge_orderconfirmation[0]->response->isOperatorAsynchronous) && $recharge_orderconfirmation[0]->response->isOperatorAsynchronous ==1):?>
12
<div id="countdown" style="margin:10px auto;display:block;"></div>
12
<div id="countdown" style="margin:10px auto;display:block;"></div>
13
<div id="rechargestatus"><?php echo $orderConfirmation->response->detailDisplayMessage;?></div>
13
<div id="rechargestatus"><?php echo $orderConfirmation->response->detailDisplayMessage;?></div>
14
	<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
14
	<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
15
        <script src="/assets/js/jquery.countdown360.js" type="text/javascript" charset="utf-8"></script>
15
  <script src="/assets/js/jquery.countdown360.js" type="text/javascript" charset="utf-8"></script>
-
 
16
 
16
    <script type="text/javascript" charset="utf-8">
17
  <script type="text/javascript" charset="utf-8">
-
 
18
    var callCounter = 0;
17
        $("#countdown").countdown360({
19
    $("#countdown").countdown360({
18
                 radius      : 50,
20
      radius: 50,
19
             seconds     : 60,
21
      seconds: 60,
20
                 fontColor   : 'white',
22
      fontColor: 'white',
21
                fillStyle   : '#6699ff',
23
      fillStyle: '#6699ff',
22
                strokeStyle : '#F6F47A',
24
      strokeStyle: '#F6F47A',
23
                autostart   : true,
25
      autostart: true,
24
                onComplete  : function () { hideCountDown()}
26
      onComplete: function() {
-
 
27
        hideCountDown()
25
        })
28
      }
-
 
29
    })
-
 
30
 
26
                function hideCountDown(){
31
    function hideCountDown() {
27
                        $('#countdown').hide();
32
      $('#countdown').hide();
28
                        jQuery.ajax({
33
      jQuery.ajax({
29
                type : "GET",
34
        type: "GET",
30
 
-
 
31
                url : "/recharge-status?rechargeOrderId=<?php echo substr($recharge_orderconfirmation[0]->response->rechargeDisplayId,4);?>&isFinal=true",
35
        url: "/recharge-status?rechargeOrderId=<?php echo substr($recharge_orderconfirmation[0]->response->rechargeDisplayId,4);?>&isFinal=true",
32
                success : function(response) {
36
        success: function(response) {},
33
                                        if (response=='RECHARGE_SUCCESSFUL' || response == 'RECHARGE_FAILED' || response == 'PAYMENT_SUCCESSFUL'){
-
 
34
                                                location.reload();
-
 
35
                                        }
-
 
36
                },
-
 
37
                error : function() {
37
        error: function() {}
38
                }
-
 
39
           });
38
      });
40
           location.reload();
39
      window.setTimeout(reload, 5000);
41
                }
40
    }
-
 
41
 
42
                function checkUnknownTransactions(){
42
    function checkUnknownTransactions() {
43
                        jQuery.ajax({
43
      jQuery.ajax({
44
                                type : "GET",
44
        type: "GET",
45
                                url : "/recharge-status?rechargeOrderId=<?php echo substr($recharge_orderconfirmation[0]->response->rechargeDisplayId,4);?>&isFinal=false",
45
        url: "/recharge-status?rechargeOrderId=<?php echo substr($recharge_orderconfirmation[0]->response->rechargeDisplayId,4);?>&isFinal=false",
46
                                success : function(response) {
46
        success: function(response) {
47
                                        if (response=='RECHARGE_SUCCESSFUL' || response == 'RECHARGE_FAILED' || response == 'PAYMENT_SUCCESSFUL'){
47
          if (response == 'RECHARGE_SUCCESSFUL' || response == 'RECHARGE_FAILED' || response == 'PAYMENT_SUCCESSFUL') {
48
                                                location.reload();
48
            reload();
-
 
49
          }
49
                                        }
50
          incrementCounter();
50
                                        if ($('#countdown').is(':visible')){
51
          if ($('#countdown').is(':visible')) {
-
 
52
            if (callCounter < 4) {
51
                                                window.setTimeout(checkUnknownTransactions, 5000);
53
              window.setTimeout(checkUnknownTransactions, 5000);
-
 
54
            }
-
 
55
          }
-
 
56
        },
52
                                        }
57
        error: function() {
53
                                },
58
          incrementCounter();
54
                                error : function() {
59
          if ($('#countdown').is(':visible')) {
55
                                }
60
            if (callCounter < 4) {
-
 
61
              window.setTimeout(checkUnknownTransactions, 5000);
56
                        });
62
            }
-
 
63
          }
57
        }
64
        }
-
 
65
      });
-
 
66
    }
-
 
67
 
-
 
68
    function incrementCounter() {
-
 
69
      callCounter++;
-
 
70
    }
-
 
71
 
-
 
72
    function reload() {
-
 
73
      location.reload();
-
 
74
    }
58
</script>
75
</script>
59
<script type="text/javascript">
76
<script type="text/javascript">
60
  $(function(){
77
  $(function(){
61
        if ($('#countdown').is(':visible')){
78
    if ($('#countdown').is(':visible')){  
62
                window.setTimeout(checkUnknownTransactions, 40000);
79
    window.setTimeout(checkUnknownTransactions, 40000);
63
        }
80
  }
64
        });
81
  });
65
</script>
82
</script>
-
 
83
 
66
<?php endif;?>
84
<?php endif;?>
67
 
85
 
68
  </div>
86
  </div>
69
  <div class="r-info">
87
  <div class="r-info">
70
    <div class="r-info-head clearfix">
88
    <div class="r-info-head clearfix">