· 4 years ago · Aug 14, 2021, 06:20 PM
1<html style=""><head>
2 <meta charset="utf-8">
3 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
4 <title>Powering The Nation | Tenaga Nasional Berhad (200866-W)</title>
5
6
7 <!-- Enable responsive layout in devices
8 <meta name="viewport" content="width=device-width">-->
9 <meta name="viewport" content="width=device-width, initial-scale=1">
10
11 <!-- Styles (using google fonts if possible) -->
12 <script type="text/javascript" src="/ruxitagentjs_ICA2SVfgjoqru_10221210805073954.js" data-dtconfig="app=a2f093350650d201|ssc=1|rcdec=1209600000|featureHash=ICA2SVfgjoqru|vcv=2|rdnt=1|uxrgce=1|bp=3|srmcrv=10|cuc=lzy842r5|mel=100000|dpvc=1|ssv=4|lastModification=1628678052789|dtVersion=10221210805073954|srmcrl=1|tp=500,50,0,1|uxdcw=1500|vs=2|agentUri=/ruxitagentjs_ICA2SVfgjoqru_10221210805073954.js|reportUrl=epayment.tnb.com.my/rb_967543ce-ab3c-4341-839d-1c8c2ef55f43|rid=RID_-571677586|rpid=-799576707|domain=tnb.com.my"></script><link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,300,700">
13 <link rel="stylesheet" href="/payment/template/tnbResponsive/css/main.css">
14 <link rel="stylesheet" href="/payment/template/dinoMarketResponsive/css/bootstrap-responsive.css">
15
16
17 <!-- Respond.js: Add support for media queries in older IE desktop versions (needs to be after css) -->
18 <!--[if (lt IE 9) & (!IEMobile)]><script src="js/ie/respond.min.js"></script><![endif]-->
19
20 <!-- JQuery: only required if using bootstrap's alerts -->
21 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
22 <script>window.jQuery || document.write('<script src="/payment/template/responsiveJS/js/jquery-1.9.0.min.js"><\/script>')</script>
23 <script>jQuery.noConflict()</script>
24 <script src="/payment/template/responsiveJS/js/bootstrap-alert.js"></script>
25
26 <!-- Modernizr.js: enables HTML5 elements in IE & feature detects all browsers -->
27 <script src="/payment/template/responsiveJS/js/modernizr-2.6.1.min.js"> </script>
28 <script src="/payment/template/responsiveJS/css3-mediaqueries.js">
29 </script>
30
31
32 </head>
33 <body>
34
35 <header class="header" role="banner">
36
37 <div class="header_inner"><img src="template/tnbResponsive/images/tnbHeaderNew.jpg" width="1130" height="180">
38 </div></header>
39 <div class="main" role="main">
40 <div class="inner">
41 <div class="hidden-phone">
42 <div class="container intro"><h2>Secure Payment Page</h2>
43 <br>
44 To complete your
45purchase, please provide your payment information. For your security,
46the information you enter will be encrypted before being sent over the
47internet. This is to keep your information from being stolen or
48intercepted while it is being transmitted to the bank.</div></div>
49
50
51 <div class="innerBottom"><div class="container purchase-info">
52
53<h2>Your transaction summary</h2>
54 <table class="transaction-summary">
55 <tbody><tr>
56 <th scope="row">Merchant ID</th>
57 <td>myTNB SSP</td>
58 </tr>
59 <tr>
60 <th scope="row">Payment Ref</th>
61 <td>R0007419045-4F63</td>
62 </tr>
63
64 <tr id="instTr" style="display: none">
65 <th scope="row">Installment Term</th>
66 <td id="instDisplay">0 month</td>
67 </tr>
68
69 <tr>
70 <th scope="row">Amount</th>
71 <td>MYR250.00</td>
72 </tr>
73 <tr>
74 <th scope="row">Description</th>
75 <td>Bill</td>
76 </tr>
77 </tbody></table>
78 <div class="hidden-phone"><div class="well">We comply with all applicable privacy laws. All information collection on our web pages will remain private and confidential. Please note that by submitting your personal information to us, you consent to our privacy statement that governs your account.</div></div>
79
80
81
82
83 </div>
84
85 <div class="container purchase-form" id="PaymentWindowTime" style="display: none;">
86 <table width="100%" border="0">
87
88 <tbody><tr>
89 <td width="36%" align="left"><span class="timeText">Payment window timeout</span></td>
90 <td width="64%" align="left"><input id="paymentWindowTimeout" name="paymentWindowTimeout" type="text" class="input-block-level3" value="" disabled="disabled"></td>
91
92 </tr>
93
94 </tbody></table>
95 </div>
96
97 <div class="container purchase-form">
98
99 <noscript>
100 <meta http-equiv="refresh" content="0; url=/payment/PaymentNoScript.jsp?NOSCRIPT=Y&MERCHANT_TRANID=R0007419045-4F63"/>
101 </noscript>
102
103<script language="JavaScript">
104 var message = "Right Click is not allowed here!";
105 document.oncontextmenu = new Function("alert(message);return false")
106
107 //King - 20120210 : New script to disable F5 and backspace, the previous script is not working across browser(chrome letter "t" causes refresh)
108 var fn = function(e) {
109 var keycode;
110
111 //IE & CHROME
112 if (window.event){
113 keycode = window.event.keyCode;
114 if (116 == keycode) { //Trap F5
115 window.event.keyCode = 0;
116 window.event.cancelBubble = true;
117 window.event.returnValue = false;
118 return false;
119
120 }
121 else if (8 == keycode) { //Trap Backspace - only Chrome
122 var nodeName = e.target.nodeName.toLowerCase();
123 if ((nodeName == 'input' && (e.target.type == 'text' || e.target.type == 'password'))
124 || nodeName == 'textarea') {
125 }
126 else{
127 return false;
128 }
129 }
130 }
131 else if(e.which){ //FF
132 keycode = e.which;
133 if (116 == keycode) { // Trap F5
134 if (e.preventDefault) {
135 e.preventDefault();
136 e.stopPropagation();
137 }
138 }
139 else if (8 == keycode) { // Trap Backspace
140 var nodeName = e.target.nodeName.toLowerCase();
141 if ((nodeName == 'input' && (e.target.type == 'text' || e.target.type == 'password'))
142 || nodeName == 'textarea') {
143 }
144 else{
145 return false;
146 }
147 }
148 }
149 return true;
150 }
151
152 // Assign function to onkeydown event
153 document.onkeydown = fn;
154</script>
155
156 <form action="PaymentWindowInterface.jsp" method="POST" name="frmPayment" id="frmPayment" class="transaction-form">
157 <input type="hidden" name="TXN_LOCATION" value="1">
158<input type="hidden" name="PAYMENT_METHOD" value="1">
159<input type="hidden" name="PYMT_IND" value="">
160<input type="hidden" name="PYMT_CRITERIA" value="registration">
161<input type="hidden" name="AMOUNT" value="250">
162<input type="hidden" name="TRANSACTIONTYPE" value="1">
163<input type="hidden" name="CURRENCYCODE" value="MYR">
164<input type="hidden" name="DESCRIPTION" value="Bill">
165<input type="hidden" name="CUSTEMAIL" value="telecom@gmailco.ml">
166<input type="hidden" name="CUSTNAME" value="telecom@gmailco.ml">
167<input type="hidden" name="MERCHANTID" value="myTNB_SSP">
168<input type="hidden" name="MERCHANT_TRANID" value="R0007419045-4F63">
169<input type="hidden" name="NEWTRANSACTION" value="Y" maxlength="1">
170<input type="hidden" name="SHOPPER_IP" value="192.168.54.200">
171<input type="hidden" name="RETURN_URL" value="https://myaccount.mytnb.com.my/Payment/QuickPay/PaymentResult">
172<input type="hidden" name="BILLING_ADDRESS" value="">
173<input type="hidden" name="BILLING_ADDRESS_CITY" value="">
174<input type="hidden" name="BILLING_ADDRESS_REGION" value="">
175<input type="hidden" name="BILLING_ADDRESS_STATE" value="">
176<input type="hidden" name="BILLING_ADDRESS_POSCODE" value="">
177<input type="hidden" name="BILLING_ADDRESS_COUNTRY_CODE" value="">
178<input type="hidden" name="RECEIVER_NAME_FOR_SHIPPING" value="">
179<input type="hidden" name="SHIPPING_ADDRESS" value="">
180<input type="hidden" name="SHIPPING_ADDRESS_CITY" value="">
181<input type="hidden" name="SHIPPING_ADDRESS_REGION" value="">
182<input type="hidden" name="SHIPPING_ADDRESS_STATE" value="">
183<input type="hidden" name="SHIPPING_ADDRESS_POSCODE" value="">
184<input type="hidden" name="SHIPPING_ADDRESS_COUNTRY_CODE" value="">
185<input type="hidden" name="SHIPPINGCOST" value="">
186<input type="hidden" name="RESPONSE_TYPE" value="2">
187<input type="hidden" name="PHONE_NO" value="">
188<input type="hidden" name="MREF1" value="">
189<input type="hidden" name="MREF2" value="">
190<input type="hidden" name="MREF3" value="">
191<input type="hidden" name="MREF4" value="">
192<input type="hidden" name="MREF5" value="">
193<input type="hidden" name="MREF6" value="">
194<input type="hidden" name="MREF7" value="">
195<input type="hidden" name="MREF8" value="">
196<input type="hidden" name="MREF9" value="">
197<input type="hidden" name="MPARAM1" value="https://myaccount.mytnb.com.my//Payment/QuickPay/PayOption">
198<input type="hidden" name="MPARAM2" value="">
199<input type="hidden" name="CUSTOMER_REF" value="">
200<input type="hidden" name="FRISK1" value="">
201<input type="hidden" name="FRISK2" value="">
202<input type="hidden" name="DOMICILE_ADDRESS" value="">
203<input type="hidden" name="DOMICILE_ADDRESS_CITY" value="">
204<input type="hidden" name="DOMICILE_ADDRESS_REGION" value="">
205<input type="hidden" name="DOMICILE_ADDRESS_STATE" value="">
206<input type="hidden" name="DOMICILE_ADDRESS_POSCODE" value="">
207<input type="hidden" name="DOMICILE_ADDRESS_COUNTRY_CODE" value="">
208<input type="hidden" name="DOMICILE_PHONE_NO" value="">
209<input type="hidden" name="SIGNATURE" value="A8F940732121B27C8205D2FC34CB8133B8BC83FE">
210
211 <input type="hidden" name="_token" value="-1260129456">
212 <input type="hidden" name="_third_party" value="No">
213 <input type="hidden" name="_cancel_payment" value="No">
214
215
216
217
218 <input type="hidden" name="LANG" value="en">
219
220
221 <div id="myDiv"> </div>
222 <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
223 <tbody><tr>
224 <td valign="top">
225 <div id="PaymentMethodSelection" style="display: none;">
226 <div class="tbl_headerLarge">
227 <div class="innerPadding">
228 <span class="tbl_header">Payment method</span>
229 </div>
230 </div>
231 <br>
232 <div class="control-group">
233 <label class="control-label">Select payment method<font color="#999"></font></label>
234
235 <div class="controls">
236
237 <script type="text/javascript">
238<!--
239document.frmPayment.PAYMENT_METHOD.value='1';
240-->
241</script>
242
243
244 <input name="isSubmitBtnClicked" type="hidden" value="0">
245
246
247
248 <span id="debit_card_message" class="help-block"> <em>For Debit Card, please choose Credit Card payment method.</em></span>
249
250
251
252 </div>
253 </div>
254
255
256 </div>
257
258 <div id="FPX_B2B" style="display:none">
259
260 <div class="control-group">
261 <label class="control-label">
262 Select bank
263 <font color="#999">*</font></label>
264 <div class="controls">
265 <select name="FPX_B2B_BANK_CODE" class="input-block-level">
266 <option value="" selected="selected">--</option>
267
268 </select>
269 </div>
270
271 </div>
272
273 <div style="border-top: 1px solid #333333;"><span class="help-block">By clicking on the <b>"Next" </b>button below, you agree to FPX's <a href="https://www.mepsfpx.com.my/FPXMain/termsAndConditions.jsp" target="_blank">Terms and Conditions</a></span></div>
274 </div>
275
276 <div id="FPX_B2C" style="display:none">
277
278 <div class="control-group">
279 <label class="control-label">
280 Select bank
281 <font color="#999">*</font></label>
282 <div class="controls">
283 <select name="FPX_B2C_BANK_CODE" class="input-block-level">
284 <option value="" selected="selected">--</option>
285 <option value="ABB0233">Affin Bank</option>
286 <option value="AGRO01">AGRONet</option>
287 <option value="ABMB0212">Alliance Bank</option>
288 <option value="AMBB0209">AmBank</option>
289 <option value="BIMB0340">Bank Islam</option>
290 <option value="BMMB0341">Bank Muamalat</option>
291 <option value="BKRM0602">Bank Rakyat</option>
292 <option value="BSN0601">BSN</option>
293 <option value="BCBB0235">CIMB Clicks</option>
294 <option value="HLB0224">Hong Leong Bank</option>
295 <option value="HSBC0223">HSBC Bank</option>
296 <option value="KFH0346">KFH</option>
297 <option value="MBB0228">Maybank2E</option>
298 <option value="MB2U0227">Maybank2U</option>
299 <option value="OCBC0229">OCBC Bank</option>
300 <option value="PBB0233">Public Bank</option>
301 <option disabled="disabled" value="RHB0218">RHB Bank (Offline)</option>
302 <option disabled="disabled" value="SCB0216">Standard Chartered (Offline)</option>
303 <option value="UOB0226">UOB Bank</option>
304
305 </select>
306 </div>
307 </div>
308
309 <div style="border-top: 1px solid #333333;"><span class="help-block">By clicking on the <b>"Next" </b>button below, you agree to FPX's <a href="https://www.mepsfpx.com.my/FPXMain/termsAndConditions.jsp" target="_blank">Terms and Conditions</a></span></div>
310 </div>
311
312
313 <div id="CreditCard" style="display: block;">
314
315
316 <!-- 20150403 zahin - Result for Payment Window Timeout -->
317 <input id="paymentWindowTimeoutResult" name="paymentWindowTimeoutResult" type="hidden" value="">
318
319 <!-- 20140822 yjtan - Masterpass button -->
320
321 <!-- ************************************************************************** -->
322 <!-- START - VISA CHECKOUT-->
323
324
325
326 <!--END VISA CHECKOUT-->
327 <!-- ************************************************************************** -->
328
329 <div class="tbl_header">
330 <div class="innerPadding">
331 <span class="tbl_header">Please key in credit card information</span>
332 </div>
333 </div>
334
335
336
337
338 <div class="tbl_row" id="installmentSection" style="display:none">
339 <div class="tbl_row_caption">
340 <div class="innerPadding">
341 <label class="control-label">
342 <input name="chkInstallment" type="checkbox" onclick="SwitchInstallmentInfo(this.checked);" value="true">
343 Pay by installment scheme
344 </label>
345 </div>
346 </div>
347 <div class="tbl_row_field">
348 <div class="innerPadding">
349 <div id="installmentInfo" style="display:none">
350 <div class="tbl_row_ins" style="padding-bottom:1px">
351 <label class="control-label"></label>
352 </div>
353 <div class="tbl_row_ins" style="padding-top:1px">
354 <select id="INSTALLMENT_CODE_OPTION" name="INSTALLMENT_CODE" size="1" onchange="ShowInstallmentInfo(this);">
355 <option value="">--</option>
356
357 </select>
358 </div>
359 </div>
360 <div class="tbl_row_ins" style=" padding-top:10px">
361 <label class="control-label"></label>
362 </div>
363 </div>
364 </div>
365 </div>
366
367
368 <div class="control-group">
369 <label class="control-label" for="CC_name">Name on card
370 <font color="#999">*</font>
371 </label>
372 <div class="controls">
373 <input type="text" class="input-block-level" placeholder="" id="CARDNAME" name="CARDNAME" value="" size="30">
374 <span class="help-block">Please enter the name as it appears on the card</span>
375 </div>
376 </div>
377
378 <div class="control-group">
379 <label class="control-label" for="CC_number">Credit card number
380 <font color="#999">*</font>
381 </label>
382 <div class="controls">
383 <input type="text" class="input-block-level" placeholder="" id="CARDNO" name="CARDNO" value="" maxlength="19">
384 <span class="help-block">Please do not include spaces or dashes between the credit card numbers</span>
385 </div>
386 </div>
387
388
389 <div class="control-group">
390 <label class="control-label" for="credit_card_type">Credit card type
391 <font color="#999">*</font>
392 </label>
393
394 <div class="controls">
395 <select class="input-block-level" name="CARDTYPE" id="CARDTYPE" size="1" onchange="SwitchCardType();">
396 <option value="" selected="">--</option>
397 <option value="M">MasterCard</option>
398<option value="V">VISA</option>
399<option value="A">AMEX</option>
400
401 </select>
402 </div>
403 </div>
404 <div class="control-group">
405 <label class="control-label" for="CC_expiryDate">Expiry date
406 <font color="#999">*</font>
407 </label>
408 <div class="controls">
409 <select name="EXPIRYMONTH" size="1" id="EXPIRYMONTH">
410 <option selected="" value="">--</option>
411 <option value="01">
412 January
413 </option>
414 <option value="02">
415 February
416 </option>
417 <option value="03">
418 March
419 </option>
420 <option value="04">
421 April
422 </option>
423 <option value="05">
424 May
425 </option>
426 <option value="06">
427 June
428 </option>
429 <option value="07">
430 July
431 </option>
432 <option value="08">
433 August
434 </option>
435 <option value="09">
436 September
437 </option>
438 <option value="10">
439 October
440 </option>
441 <option value="11">
442 November
443 </option>
444 <option value="12">
445 December
446 </option>
447 </select>
448 <select name="EXPIRYYEAR" id="EXPIRYYEAR" size="1">
449 <option value="" selected="">--</option>
450 <option value="2021">2021</option>
451<option value="2022">2022</option>
452<option value="2023">2023</option>
453<option value="2024">2024</option>
454<option value="2025">2025</option>
455<option value="2026">2026</option>
456<option value="2027">2027</option>
457<option value="2028">2028</option>
458<option value="2029">2029</option>
459<option value="2030">2030</option>
460<option value="2031">2031</option>
461<option value="2032">2032</option>
462<option value="2033">2033</option>
463<option value="2034">2034</option>
464<option value="2035">2035</option>
465<option value="2036">2036</option>
466<option value="2037">2037</option>
467<option value="2038">2038</option>
468<option value="2039">2039</option>
469<option value="2040">2040</option>
470
471 </select>
472 </div>
473 </div>
474
475
476
477
478
479 <!--2014/1/8 added by linda -->
480 <!--2016/9/27 edited by lys-->
481 <div class="control-group" id="card_cvc" style="display: none;">
482 <label class="control-label" placeholder="" for="CC_cvc">Card CVV/CVC2/4DBC<font color="#999">*</font> </label>
483 <div class="controls">
484 <input name="CARDCVC" class="input-block-level" type="password" id="card_identification" size="24" maxlength="4" value="">
485 <span class="help-block"><a href="#" onclick="MM_openBrWindow('/payment/html/ccsample_en.html', '', 'scrollbars=yes,width=400,height=250')"><img src="images/help.gif" border="0" align="absmiddle"></a></span>
486 </div>
487 </div>
488
489
490 <div class="control-group">
491 <label class="control-label" for="CC_country">Card issuer country
492 <font color="#999">*</font></label>
493 <div class="controls">
494 <select class="input-block-level" placeholder="" name="CARD_ISSUER_BANK_COUNTRY_CODE"><option value="">--</option>
495 <option value="-">-</option>
496 <option value="AF">Afghanistan</option>
497 <option value="AL">Albania</option>
498 <option value="DZ">Algeria</option>
499 <option value="AS">American Samoa</option>
500 <option value="AD">Andorra</option>
501 <option value="AO">Angola</option>
502 <option value="AI">Anguilla</option>
503 <option value="AQ">Antarctica</option>
504 <option value="AG">Antigua And Barbuda</option>
505 <option value="AR">Argentina</option>
506 <option value="AM">Armenia</option>
507 <option value="AW">Aruba</option>
508 <option value="AU">Australia</option>
509 <option value="AT">Austria</option>
510 <option value="AZ">Azerbaijan</option>
511 <option value="BS">Bahamas</option>
512 <option value="BH">Bahrain</option>
513 <option value="BD">Bangladesh</option>
514 <option value="BB">Barbados</option>
515 <option value="BY">Belarus</option>
516 <option value="BE">Belgium</option>
517 <option value="BZ">Belize</option>
518 <option value="BJ">Benin</option>
519 <option value="BM">Bermuda</option>
520 <option value="BT">Bhutan</option>
521 <option value="BO">Bolivia</option>
522 <option value="BA">Bosnia and Herzegovina</option>
523 <option value="BW">Botswana</option>
524 <option value="BV">Bouvet Island</option>
525 <option value="BR">Brazil</option>
526 <option value="IO">British Indian Ocean Territory</option>
527 <option value="BN">Brunei</option>
528 <option value="BG">Bulgaria</option>
529 <option value="BF">Burkina Faso</option>
530 <option value="BI">Burundi</option>
531 <option value="KH">Cambodia</option>
532 <option value="CM">Cameroon</option>
533 <option value="CA">Canada</option>
534 <option value="CV">Cape Verde</option>
535 <option value="KY">Cayman Islands</option>
536 <option value="CF">Central African Republic</option>
537 <option value="TD">Chad</option>
538 <option value="CL">Chile</option>
539 <option value="CN">China</option>
540 <option value="CX">Christmas Island</option>
541 <option value="CC">Cocos (Keeling) Islands</option>
542 <option value="CO">Colombia</option>
543 <option value="KM">Comoros</option>
544 <option value="CG">Congo</option>
545 <option value="CD">Congo Democractic Republic of the</option>
546 <option value="CK">Cook Islands</option>
547 <option value="CR">Costa Rica</option>
548 <option value="CI">Cote D'Ivoire (Ivory Coast)</option>
549 <option value="HR">Croatia (Hrvatska)</option>
550 <option value="CU">Cuba</option>
551 <option value="CY">Cyprus</option>
552 <option value="CZ">Czech Republic</option>
553 <option value="DK">Denmark</option>
554 <option value="DJ">Djibouti</option>
555 <option value="DM">Dominica</option>
556 <option value="DO">Dominican Republic</option>
557 <option value="TP">East Timor</option>
558 <option value="EC">Ecuador</option>
559 <option value="EG">Egypt</option>
560 <option value="SV">El Salvador</option>
561 <option value="GQ">Equatorial Guinea</option>
562 <option value="ER">Eritrea</option>
563 <option value="EE">Estonia</option>
564 <option value="ET">Ethiopia</option>
565 <option value="FK">Falkland Islands (Islas Malvinas)</option>
566 <option value="FO">Faroe Islands</option>
567 <option value="FJ">Fiji Islands</option>
568 <option value="FI">Finland</option>
569 <option value="FR">France</option>
570 <option value="GF">French Guiana</option>
571 <option value="PF">French Polynesia</option>
572 <option value="TF">French Southern Territories</option>
573 <option value="GA">Gabon</option>
574 <option value="GM">Gambia</option>
575 <option value="GE">Georgia</option>
576 <option value="DE">Germany</option>
577 <option value="GH">Ghana</option>
578 <option value="GI">Gibraltar</option>
579 <option value="GR">Greece</option>
580 <option value="GL">Greenland</option>
581 <option value="GD">Grenada</option>
582 <option value="GP">Guadeloupe</option>
583 <option value="GU">Guam</option>
584 <option value="GT">Guatemala</option>
585 <option value="GN">Guinea</option>
586 <option value="GW">Guinea-Bissau</option>
587 <option value="GY">Guyana</option>
588 <option value="HT">Haiti</option>
589 <option value="HM">Heard and McDonald Islands</option>
590 <option value="HN">Honduras</option>
591 <option value="HK">Hong Kong S.A.R.</option>
592 <option value="HU">Hungary</option>
593 <option value="IS">Iceland</option>
594 <option value="IN">India</option>
595 <option value="ID">Indonesia</option>
596 <option value="IR">Iran</option>
597 <option value="IQ">Iraq</option>
598 <option value="IE">Ireland</option>
599 <option value="IL">Israel</option>
600 <option value="IT">Italy</option>
601 <option value="JM">Jamaica</option>
602 <option value="JP">Japan</option>
603 <option value="JO">Jordan</option>
604 <option value="KZ">Kazakhstan</option>
605 <option value="KE">Kenya</option>
606 <option value="KI">Kiribati</option>
607 <option value="KR">Korea</option>
608 <option value="KP">Korea North</option>
609 <option value="KW">Kuwait</option>
610 <option value="KG">Kyrgyzstan</option>
611 <option value="LA">Laos</option>
612 <option value="LV">Latvia</option>
613 <option value="LB">Lebanon</option>
614 <option value="LS">Lesotho</option>
615 <option value="LR">Liberia</option>
616 <option value="LY">Libya</option>
617 <option value="LI">Liechtenstein</option>
618 <option value="LT">Lithuania</option>
619 <option value="LU">Luxembourg</option>
620 <option value="MO">Macau S.A.R.</option>
621 <option value="MK">Macedonia - Former Yugoslav Republic of</option>
622 <option value="MG">Madagascar</option>
623 <option value="MW">Malawi</option>
624 <option value="MY">Malaysia</option>
625 <option value="MV">Maldives</option>
626 <option value="ML">Mali</option>
627 <option value="MT">Malta</option>
628 <option value="MH">Marshall Islands</option>
629 <option value="MQ">Martinique</option>
630 <option value="MR">Mauritania</option>
631 <option value="MU">Mauritius</option>
632 <option value="YT">Mayotte</option>
633 <option value="MX">Mexico</option>
634 <option value="FM">Micronesia</option>
635 <option value="MD">Moldova</option>
636 <option value="MC">Monaco</option>
637 <option value="MN">Mongolia</option>
638 <option value="MS">Montserrat</option>
639 <option value="MA">Morocco</option>
640 <option value="MZ">Mozambique</option>
641 <option value="MM">Myanmar</option>
642 <option value="NA">Namibia</option>
643 <option value="NR">Nauru</option>
644 <option value="NP">Nepal</option>
645 <option value="NL">Netherlands</option>
646 <option value="AN">Netherlands Antilles</option>
647 <option value="NC">New Caledonia</option>
648 <option value="NZ">New Zealand</option>
649 <option value="NI">Nicaragua</option>
650 <option value="NE">Niger</option>
651 <option value="NG">Nigeria</option>
652 <option value="NU">Niue</option>
653 <option value="NF">Norfolk Island</option>
654 <option value="MP">Northern Mariana Islands</option>
655 <option value="NO">Norway</option>
656 <option value="OM">Oman</option>
657 <option value="PK">Pakistan</option>
658 <option value="PW">Palau</option>
659 <option value="PA">Panama</option>
660 <option value="PG">Papua new Guinea</option>
661 <option value="PY">Paraguay</option>
662 <option value="PE">Peru</option>
663 <option value="PH">Philippines</option>
664 <option value="PN">Pitcairn Island</option>
665 <option value="PL">Poland</option>
666 <option value="PT">Portugal</option>
667 <option value="PR">Puerto Rico</option>
668 <option value="QA">Qatar</option>
669 <option value="RE">Reunion</option>
670 <option value="RO">Romania</option>
671 <option value="RU">Russia</option>
672 <option value="RW">Rwanda</option>
673 <option value="SH">Saint Helena</option>
674 <option value="KN">Saint Kitts And Nevis</option>
675 <option value="LC">Saint Lucia</option>
676 <option value="PM">Saint Pierre and Miquelon</option>
677 <option value="VC">Saint Vincent And The Grenadines</option>
678 <option value="WS">Samoa</option>
679 <option value="SM">San Marino</option>
680 <option value="ST">Sao Tome and Principe</option>
681 <option value="SA">Saudi Arabia</option>
682 <option value="SN">Senegal</option>
683 <option value="SC">Seychelles</option>
684 <option value="SL">Sierra Leone</option>
685 <option value="SG">Singapore</option>
686 <option value="SK">Slovakia</option>
687 <option value="SI">Slovenia</option>
688 <option value="SB">Solomon Islands</option>
689 <option value="SO">Somalia</option>
690 <option value="ZA">South Africa</option>
691 <option value="GS">South Georgia And The South Sandwich Islands</option>
692 <option value="ES">Spain</option>
693 <option value="LK">Sri Lanka</option>
694 <option value="SD">Sudan</option>
695 <option value="SR">Suriname</option>
696 <option value="SJ">Svalbard And Jan Mayen Islands</option>
697 <option value="SZ">Swaziland</option>
698 <option value="SE">Sweden</option>
699 <option value="CH">Switzerland</option>
700 <option value="SY">Syria</option>
701 <option value="TW">Taiwan</option>
702 <option value="TJ">Tajikistan</option>
703 <option value="TZ">Tanzania</option>
704 <option value="TH">Thailand</option>
705 <option value="TG">Togo</option>
706 <option value="TK">Tokelau</option>
707 <option value="TO">Tonga</option>
708 <option value="TT">Trinidad And Tobago</option>
709 <option value="TN">Tunisia</option>
710 <option value="TR">Turkey</option>
711 <option value="TM">Turkmenistan</option>
712 <option value="TC">Turks And Caicos Islands</option>
713 <option value="TV">Tuvalu</option>
714 <option value="UG">Uganda</option>
715 <option value="UA">Ukraine</option>
716 <option value="AE">United Arab Emirates</option>
717 <option value="GB">United Kingdom</option>
718 <option value="US">United States</option>
719 <option value="UM">United States Minor Outlying Islands</option>
720 <option value="UY">Uruguay</option>
721 <option value="UZ">Uzbekistan</option>
722 <option value="VU">Vanuatu</option>
723 <option value="VA">Vatican City State (Holy See)</option>
724 <option value="VE">Venezuela</option>
725 <option value="VN">Vietnam</option>
726 <option value="VG">Virgin Islands (British)</option>
727 <option value="VI">Virgin Islands (US)</option>
728 <option value="WF">Wallis And Futuna Islands</option>
729 <option value="YE">Yemen</option>
730 <option value="YU">Yugoslavia</option>
731 <option value="ZM">Zambia</option>
732 <option value="ZW">Zimbabwe</option>
733
734 </select>
735
736 </div>
737 </div>
738
739 <!-- additional information that's needed for 3rd Party booking as requested by MAS -->
740 <div id="3rdPartyBookingInfo" style="display:none">
741 <div class="tbl_row">
742 <div class="tbl_row_caption">
743 <div class="innerPadding">
744 Credit Card Issuer Bank<font color="#999">*</font>
745 </div>
746 </div>
747 <div class="tbl_row_field">
748 <div class="innerPadding">
749 <input name="CARD_ISSUER_BANK" size="30" value="" maxlength="200">
750 </div>
751 </div>
752 </div>
753 <br clear="all">
754 <br>
755 <div class="tbl_header">
756 <div class="innerPadding">
757 <b>Please key in card holder details</b>
758 </div>
759 </div>
760 <div class="tbl_row">
761 <div class="tbl_row_caption">
762 <div class="innerPadding">
763 Identity Reference Type
764 <font color="#999">*</font>
765 </div>
766 </div>
767 <div class="tbl_row_field">
768 <div class="innerPadding">
769 <select name="CARD_IDENTITY_REF_TYPE" size="1">
770 <option value="" selected="">--</option>
771 <option value="IC">Identity Card</option>
772 <option value="Passport">Passport</option>
773
774 </select>
775 </div>
776 </div>
777 </div>
778 <div class="tbl_row">
779 <div class="tbl_row_caption">
780 <div class="innerPadding">
781 Identity Reference Number
782 <font color="#999">*</font>
783 </div>
784 </div>
785 <div class="tbl_row_field">
786 <div class="innerPadding">
787 <input name="CARD_IDENTITY_REF" size="30" value="" maxlength="20">
788 </div>
789 </div>
790 </div>
791 <div class="tbl_row">
792 <div class="tbl_row_caption">
793 <div class="innerPadding">
794 Phone Number
795 <font color="#999">*</font>
796 </div>
797 </div>
798 <div class="tbl_row_field">
799 <div class="innerPadding">
800 <table cellspacing="0" cellpadding="0" border="0">
801 <tbody><tr>
802 <td class="cardphone_caption"><i>Country Code</i></td>
803 <td> </td>
804 <td class="cardphone_caption"><i>Area Code</i></td>
805 <td> </td>
806 <td class="cardphone_caption"><i>Local Number</i></td>
807 </tr>
808 <tr>
809 <td> + <input name="CARD_PHONE_FIELD1" size="6" value="" maxlength="5"></td>
810 <td width="8" align="center">-</td>
811 <td><input name="CARD_PHONE_FIELD2" size="6" value="" maxlength="5"></td>
812 <td width="8" align="center">-</td>
813 <td><input name="CARD_PHONE_FIELD3" size="15" value="" maxlength="12"></td>
814 </tr>
815 </tbody></table>
816 <input type="hidden" name="CARD_PHONE" value="">
817 </div>
818 </div>
819 </div>
820 <div class="tbl_row">
821 <div class="tbl_row_caption">
822 <div class="innerPadding">
823 Email Address
824 <font color="#999">*</font>
825 </div>
826 </div>
827 <div class="tbl_row_field">
828 <div class="innerPadding">
829 <input name="CARD_EMAIL" size="40" value="" maxlength="100">
830 </div>
831 </div>
832 </div>
833 </div>
834 </div>
835 </td>
836 </tr>
837 </tbody></table>
838
839 <!-- additional information bill payment as requested by OSES -->
840 <div id="oses_billpaymentinfo" style="display:none">
841 <div class="tbl_header">
842 <div class="innerPadding"> <b>Payer:</b> </div>
843 </div>
844 <div class="tbl_row"> <div class="tbl_row_caption">
845 <div class="innerPadding"> IC Number <font color="#999">*</font></div>
846 </div>
847 <div class="tbl_row_field">
848 <div class="innerPadding">
849 <input name="oses_bill_icno" size="30" maxlength="20">
850 <br>
851
852 </div>
853 </div></div><div class="tbl_row"><div class="tbl_row_caption">
854 <div class="innerPadding"> Contact Number<font color="#999">*</font></div>
855 </div>
856 <div class="tbl_row_field">
857 <div class="innerPadding">
858 <input name="oses_bill_contactno" size="30" maxlength="20">
859 </div>
860 </div>
861 </div>
862
863 <div class="tbl_header">
864 <div class="innerPadding"> <b>Address:</b> </div>
865 </div>
866
867 <div class="tbl_row"><div class="tbl_row_caption">
868 <div class="innerPadding"> Street Address <font color="#999">*</font></div>
869 </div>
870 <div class="tbl_row_field">
871 <div class="innerPadding"><input name="oses_bill_street" size="30" maxlength="100"></div>
872 </div></div>
873 <div class="tbl_row"><div class="tbl_row_caption">
874 <div class="innerPadding"> City <font color="#999">*</font> </div>
875 </div>
876 <div class="tbl_row_field">
877 <div class="innerPadding">
878 <input name="oses_bill_city" size="30" maxlength="100">
879 </div>
880 </div> </div> <div class="tbl_row"> <div class="tbl_row_caption">
881 <div class="innerPadding"> State/Province<font color="#999">*</font></div>
882 </div>
883 <div class="tbl_row_field">
884 <div class="innerPadding">
885 <select name="oses_bill_state">
886 <option value="">--Please choose one--</option>
887 <option value="Johor">Johor</option>
888 <option value="Kedah">Kedah</option>
889 <option value="Kelantan">Kelantan</option>
890 <option value="Melaka">Melaka</option>
891 <option value="Negeri Sembilan">Negeri Sembilan</option>
892 <option value="Pahang">Pahang</option>
893 <option value="Perak">Perak</option>
894 <option value="Perlis">Perlis</option>
895 <option value="Pulau Pinang">Pulau Pinang</option>
896 <option value="Sabah">Sabah</option>
897 <option value="Sarawak">Sarawak</option>
898 <option value="Selangor">Selangor</option>
899 <option value="Terengganu">Terengganu</option>
900 <option value="W.P. Kuala Lumpur">W.P. Kuala Lumpur</option>
901 <option value="W.P. Labuan">W.P. Labuan</option>
902 <option value="W.P. Putrajaya">W.P. Putrajaya</option>
903 <option value="Other">Other</option>
904 </select>
905 </div>
906 </div></div>
907 <div class="tbl_row"> <div class="tbl_row_caption">
908 <div class="innerPadding"> Postal Code <font color="#999">*</font></div>
909 </div>
910 <div class="tbl_row_field">
911 <div class="innerPadding">
912 <input name="oses_bill_postal" size="30" maxlength="20">
913 </div>
914 </div></div>
915 </div>
916 <div id="term_check" style="display:none">
917 <input type="checkbox" name="chkterm" value="chkterm">
918
919
920
921 </div>
922 <div id="btnRows" style="display: block;" align="left">
923
924 <button type="button" name="btnSubmit" id="btnSubmit" class="btn btn-primary" onclick="return ValidateForm(document.frmPayment);">
925 NEXT
926 </button>
927
928 <button type="button" name="btnCancel" id="btnCancel" class="btn btn-link" onclick="return askCancel();">
929 CANCEL
930 </button>
931
932 <button type="button" name="btnReset" id="btnReset" class="btn btn-link" onclick="resetForm();" style="display: inline;">
933 Clear
934 </button>
935 </div>
936
937
938
939
940
941
942 <div id="redirectionRow" style="display:none">
943 <table width="90%" cellspacing="0" cellpadding="3" border="0" align="center">
944 <tbody><tr>
945 <td> <table class="errorMsgBox" width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
946 <tbody><tr>
947 <td colspan="2" valign="top" align="left"> </td>
948 </tr>
949 <tr style="display:none">
950 <td colspan="2" class="errorMsgTitle" valign="top" align="left"><b><img src="/images/loader.gif" width="32" height="32" align="absmiddle">
951 You will be redirected to payment gateway
952 or bank in few seconds...</b> </td>
953 </tr>
954 <tr>
955 <td colspan="2" valign="top" align="left"> </td>
956 </tr>
957 <tr>
958 <td colspan="2" style="border-top: #CCCCCC solid 3px;" valign="top" align="left"> </td>
959 </tr>
960 <tr>
961 <td width="171" valign="top" align="center"><img src="/images/sign_wait.png" width="103" height="94"><br></td>
962 <td width="566" valign="top" height="200" align="left"> Please do
963 not click on <b>Back</b>, <b>Stop</b>, <b>Refresh</b> buttons, or
964 <b>close window</b> during the payment process.<br> <br>
965 <hr width="100%" size="1" color="#CCCCCC"> <p><b>Note:</b> <br>
966 This page requires Internet Explorer 6.0 above or compatible browser.
967 You can check your browser compatibility <a href="#" onclick="MM_openBrWindow('/payment/html/browserCheck_en.html','','scrollbars=yes,width=600,height=700')">here</a>.</p>
968 <p>Pop-up killers should also be disabled before you proceed. </p>
969 <p>Please ensure that cookies and Javascript is enabled on your
970 browser. You can find out to configure your browser settings <a href="#" onclick="MM_openBrWindow('/payment/html/howToDo_en.html','','scrollbars=yes,width=620,height=400')">here</a>.</p></td>
971 </tr>
972 <tr>
973 <td colspan="2" valign="top" align="left"> </td>
974 </tr>
975 </tbody></table></td>
976 </tr>
977 </tbody></table>
978</div>
979
980
981
982
983
984
985
986
987
988
989
990
991 <!-- <div id="moreInfoRows" style="display:none">
992 <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tbl_moreInfoRows">
993 <tr>
994 <td align="left" valign="top"><p><b>Note:</b> <br />
995 Upon clicking on submit, you will be redirected to the bank system. Please
996 do not refresh or close your browser until your transaction has completed. <br />
997 <br />
998 This page requires Internet Explorer 6.0 above or compatible browser.
999 You can check your browser compatibility <a href="#" onClick="MM_openBrWindow('/payment/html/browserCheck_en.html','','scrollbars=yes,width=600,height=400')">here</a>.<br />
1000 <br />
1001 Pop-up killers should also be disabled before you proceed. <br />
1002 <br />
1003 Please ensure that cookies and Javascript is enabled on your browser.
1004 You can find out to configure your browser settings <a href="#" onClick="MM_openBrWindow('/payment/html/howToDo_en.html','','scrollbars=yes,width=620,height=400')">here</a>.</p></td>
1005 </tr>
1006 </table>
1007</div>--> <div class="hidden-phone">
1008<div class="well">
1009 <div id="moreInfoRows" style="display: block;">
1010<table class="tbl_moreInfoRows" width="98%" cellspacing="0" cellpadding="0" border="0" align="center">
1011 <tbody><tr>
1012 <td valign="top" align="left"><p><b>Note:</b> <br>
1013 Upon clicking on submit, you will be <strong>redirected</strong> to the bank system. Please<strong> do not refresh or close</strong> your browser until your transaction has completed. <br>
1014 <br>
1015 This page requires Internet Explorer 8.0 & above <span class="hidden-phone">, Mozilla Firefox and Chrome.</span> You can check your browser compatibility <a href="#" onclick="MM_openBrWindow('/payment/html/browserCheck_en.html','','scrollbars=yes,width=600,height=400')">here</a>.<br>
1016 <br>
1017 Pop-up killers should also be disabled before you proceed. <br>
1018 <br>
1019 Please ensure that cookies and Javascript is enabled on your browser.
1020 You can find out to configure your browser settings <a href="#" onclick="MM_openBrWindow('/payment/html/howToDo_en.html','','scrollbars=yes,width=620,height=400')">here</a>.</p></td>
1021 </tr>
1022 </tbody></table>
1023</div>
1024
1025 </div></div>
1026
1027
1028
1029
1030
1031
1032 <!--
1033
1034
1035
1036
1037 <div id="moreInfoRows" style="display:none">
1038 <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tbl_moreInfoRows">
1039 <tr>
1040 <td align="left" valign="top"><p><b>Note:</b> <br />
1041 Upon clicking on submit, you will be redirected to the bank system. Please
1042 do not refresh or close your browser until your transaction has completed. <br />
1043 <br />
1044 This page requires Internet Explorer 6.0 above or compatible browser.
1045 You can check your browser compatibility <a href="#" onClick="MM_openBrWindow('/payment/html/browserCheck_en.html','','scrollbars=yes,width=600,height=400')">here</a>.<br />
1046 <br />
1047 Pop-up killers should also be disabled before you proceed. <br />
1048 <br />
1049 Please ensure that cookies and Javascript is enabled on your browser.
1050 You can find out to configure your browser settings <a href="#" onClick="MM_openBrWindow('/payment/html/howToDo_en.html','','scrollbars=yes,width=620,height=400')">here</a>.</p></td>
1051 </tr>
1052 </table>
1053</div>
1054
1055 <div id="redirectionRow" style="display:none">
1056 <table width="90%" align="center" border="0" cellspacing="0" cellpadding="3" >
1057 <tr>
1058 <td> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="errorMsgBox">
1059 <tr>
1060 <td colspan="2" align="left" valign="top"> </td>
1061 </tr>
1062 <tr style="display:none">
1063 <td colspan="2" align="left" valign="top" class="errorMsgTitle"><b><img src="/images/loader.gif" width="32" height="32" align="absmiddle" />
1064 You will be redirected to payment gateway
1065 or bank in few seconds...</b> </td>
1066 </tr>
1067 <tr>
1068 <td colspan="2" align="left" valign="top"> </td>
1069 </tr>
1070 <tr>
1071 <td colspan="2" align="left" valign="top" style="border-top: #CCCCCC solid 3px;"> </td>
1072 </tr>
1073 <tr>
1074 <td width="171" align="center" valign="top"><img src="/images/sign_wait.png" width="103" height="94" /><br /></td>
1075 <td width="566" height="200" align="left" valign="top"> Please do
1076 not click on <b>Back</b>, <b>Stop</b>, <b>Refresh</b> buttons, or
1077 <b>close window</b> during the payment process.<br /> <br />
1078 <hr width="100%" size="1" color="#CCCCCC" /> <p><b>Note:</b> <br>
1079 This page requires Internet Explorer 6.0 above or compatible browser.
1080 You can check your browser compatibility <a href="#" onClick="MM_openBrWindow('/payment/html/browserCheck_en.html','','scrollbars=yes,width=600,height=700')">here</a>.</p>
1081 <p>Pop-up killers should also be disabled before you proceed. </p>
1082 <p>Please ensure that cookies and Javascript is enabled on your
1083 browser. You can find out to configure your browser settings <a href="#" onClick="MM_openBrWindow('/payment/html/howToDo_en.html','','scrollbars=yes,width=620,height=400')">here</a>.</p></td>
1084 </tr>
1085 <tr>
1086 <td colspan="2" align="left" valign="top"> </td>
1087 </tr>
1088 </table></td>
1089 </tr>
1090 </table>
1091</div>
1092
1093
1094
1095 -->
1096
1097 </form>
1098 <!--<div id="popup-wrapper">
1099 I am a popup box. Content can be anything. <br />
1100 <a href="#" id="close-btn">Close</a>
1101 </div>-->
1102
1103 <div id="timeout" class="login-popup">
1104 <form method="post" class="signin" action="#">
1105 <div class="control-group">
1106 <label align="left" id="popupTimeout" class="control-label">Payment Window Timeout</label>
1107 </div>
1108 <div>
1109 <!-- 2015/4/24 added by linda -->
1110 <button href="#" class="btn-timeout" type="button" id="voucherbtn" onclick="redirectPageTimeOut();">OK</button>
1111 </div>
1112 </form>
1113
1114 </div>
1115
1116
1117
1118
1119<!--2015/2/9 added by linda -->
1120
1121
1122<script type="text/javascript" src="/js/common.js"></script>
1123<script type="text/javascript" src="/js/prototype.js"></script>
1124<script type="text/javascript" src="/js/default.js"></script>
1125<script type="text/javascript" src="/js/ajax-request.js"></script>
1126<!-- 24/4/2015 added by linda-->
1127<link href="css/popUp.css" rel="stylesheet" type="text/css">
1128
1129<script type="text/javascript">
1130// anton 20161027 bin filtering.
1131var allowedBINSetting = [
1132
1133 {
1134 sysGroup:'',
1135 sysName:'PREFIX_2',
1136 sysValue:'M',
1137 extValue1:'222100',
1138 extValue2:'272099'
1139 },
1140
1141 ];
1142
1143 <!--
1144 //trace user action when they click back/forward, refresh / exit the browser
1145 window.onbeforeunload = bunload;
1146
1147 function bunload()
1148 {
1149 /*
1150 if frmPayment.isSubmitBtnClicked.value == 1
1151 indicated submit button is clicked with all validation == ok, then its not necessary to
1152 call the askExit() method to log user action into request log
1153 */
1154 if (document.frmPayment.isSubmitBtnClicked.value != 1 )
1155 {
1156 /*
1157 NOTE START: please DO NOT remove this BELOW line, as it may
1158 cause the redirection of direct debit payment mode to trigger
1159 the confirm box that ask user whether or not to exit the current page.
1160 Edited by wan ping on 28/10/08
1161 */
1162
1163 if (document.frmPayment.pay_method != undefined)
1164 { document.frmPayment.pay_method.value; }
1165
1166 /*NOTE END*/
1167 var bool = askExit();
1168
1169 if (!bool)
1170 {
1171 exceptionalExit();
1172 //return null to skip confirmation message
1173 return null;
1174 }
1175 }
1176 }
1177
1178 function askExit()
1179 {
1180 if (confirm('You have choose to exit the browser, this will cancel your purchasing, are you sure?'))
1181 {
1182 //TODO - do ajax cancel payment
1183 var SuccessResponse = function(o){
1184 // empty method
1185 }
1186
1187 var FailureResponse = function(o){
1188 // empty method
1189 }
1190
1191 var callback = {
1192 success: SuccessResponse,
1193 failure: FailureResponse
1194 };
1195
1196 var session_id = '38CE69F72F58599D10CB0925CF8FD7B9';
1197 var postData = "&MERCHANTID=" + document.frmPayment.MERCHANTID.value;
1198 postData += "&CURRENCYCODE=" + document.frmPayment.CURRENCYCODE.value;
1199 postData += "&MERCHANT_TRANID=" + document.frmPayment.MERCHANT_TRANID.value;
1200 postData += "&AMOUNT=" + document.frmPayment.AMOUNT.value;
1201 postData += "&_token=" + document.frmPayment._token.value;
1202 postData += "&session_id=" + session_id;
1203 postData += "&WEB_BROWSER=" + navigator.appName;
1204 postData += "&CUSTNAME=" + document.frmPayment.CUSTNAME.value;
1205 postData += "&PAYMENT_METHOD=" + document.frmPayment.PAYMENT_METHOD.value;
1206 postData += "&TRANSACTIONTYPE=" + document.frmPayment.TRANSACTIONTYPE.value;
1207 postData += "&DESCRIPTION=" + document.frmPayment.DESCRIPTION.value;
1208 postData += "&RETURN_URL=" + document.frmPayment.RETURN_URL.value;
1209
1210 // Get card related information.
1211 if (document.frmPayment.PAYMENT_METHOD.value == '1')
1212 {
1213 postData += "&CARDNAME=" + document.frmPayment.CARDNAME.value;
1214 postData += "&CARDNO=" + document.frmPayment.CARDNO.value;
1215 postData += "&CARDTYPE=" + document.frmPayment.CARDTYPE.value;
1216 }
1217
1218 var sUrlForExit = "/ctExitBrowser.jsp?confirmExit=yes";
1219 //var exitRequest = YAHOO.util.Connect.asyncRequest('POST', sUrlForExit, callback, postData);
1220 var exitRequest = doAjax(sUrlForExit,postData,SuccessResponse,FailureResponse,10000);
1221 return true;
1222 }
1223
1224 return false;
1225 }
1226
1227 function exceptionalExit()
1228 {
1229 /*
1230 Created by yjtan on 23/05/2011
1231 Description: Trigger this function when askExit() returns false.
1232 Once askExit() returns false, browser will prompt another confirm message (browser built-in function)to exit browser.
1233 If user clicks OK, our system is unable to detect the action.
1234 Therefore, we need to do logging irregardless the user clicks OK / Cancel
1235 */
1236 var SuccessResponse = function(o)
1237 {
1238 // empty method
1239 }
1240
1241 var FailureResponse = function(o)
1242 {
1243 // empty method
1244 }
1245
1246 var callback =
1247 {
1248 success: SuccessResponse,
1249 failure: FailureResponse
1250 };
1251
1252 var session_id = '38CE69F72F58599D10CB0925CF8FD7B9';
1253 var postData = "&MERCHANTID=" + document.frmPayment.MERCHANTID.value;
1254 postData += "&CURRENCYCODE=" + document.frmPayment.CURRENCYCODE.value;
1255 postData += "&MERCHANT_TRANID=" + document.frmPayment.MERCHANT_TRANID.value;
1256 postData += "&AMOUNT=" + document.frmPayment.AMOUNT.value;
1257 postData += "&_token=" + document.frmPayment._token.value;
1258 postData += "&session_id=" + session_id;
1259 postData += "&WEB_BROWSER=" + navigator.appName;
1260 postData += "&CUSTNAME=" + document.frmPayment.CUSTNAME.value;
1261 postData += "&PAYMENT_METHOD=" + document.frmPayment.PAYMENT_METHOD.value;
1262 postData += "&TRANSACTIONTYPE=" + document.frmPayment.TRANSACTIONTYPE.value;
1263 postData += "&DESCRIPTION=" + document.frmPayment.DESCRIPTION.value;
1264 postData += "&RETURN_URL=" + document.frmPayment.RETURN_URL.value;
1265
1266 // Get card related information.
1267 if (document.frmPayment.PAYMENT_METHOD.value == '1')
1268 {
1269 postData += "&CARDNAME=" + document.frmPayment.CARDNAME.value;
1270 postData += "&CARDNO=" + document.frmPayment.CARDNO.value;
1271 postData += "&CARDTYPE=" + document.frmPayment.CARDTYPE.value;
1272 }
1273
1274 var sUrlForExit = "/ctExitBrowser.jsp";
1275 //var exitRequest = YAHOO.util.Connect.asyncRequest('POST', sUrlForExit, callback, postData);
1276 var exitRequest = doAjax(sUrlForExit,postData,SuccessResponse,FailureResponse,10000);
1277 }
1278
1279 function askCancel() {
1280
1281 if (confirm('Are you sure you want to cancel your purchase? Click ok if you are sure.')) {
1282 //King - 20110704 : Set payment selection to empty before cancel, if selected is credit card process takes long time.
1283 if (document.frmPayment.pay_method != null && document.frmPayment.pay_method != undefined)
1284 {
1285 document.frmPayment.pay_method[0].selected = "1";
1286 SwitchView('');
1287 }
1288 delay();
1289 }
1290 return false;
1291 }
1292
1293 function delay(){
1294 document.frmPayment.btnCancel.disabled = true; //added by seong 20100920
1295 document.frmPayment.btnSubmit.disabled = true;
1296 document.frmPayment.btnReset.disabled = true;
1297
1298 setTimeout('DoCheck()',3000);
1299 }
1300
1301 function DoCheck() {
1302
1303 var SuccessResponse = function(o) {
1304
1305 if (o.responseText.replace(/^\s+|\s+$/gm,'') == 'NULL') {
1306
1307 document.frmPayment._cancel_payment.value = 'Yes';
1308 document.frmPayment.isSubmitBtnClicked.value = 1;
1309 clearInterval(myVar);
1310 document.frmPayment.submit();
1311
1312 return true;
1313
1314 } else if (o.responseText.replace(/^\s+|\s+$/gm,'') == 'NOT_NULL') {
1315
1316 document.frmPayment._cancel_payment.value = 'No';
1317 document.frmPayment.isSubmitBtnClicked.value = 1;
1318
1319 if (document.getElementById('div1') == null ) {
1320 createDiv();
1321 }
1322
1323 return false;
1324 }
1325 }
1326
1327 var FailureResponse = function(o) {
1328 alert("responseText: " + o.responseText);
1329 }
1330
1331 var callback = {
1332 success: SuccessResponse,
1333 failure: FailureResponse
1334 };
1335
1336 var MERCHANTID = document.frmPayment.MERCHANTID.value;
1337 var CURRENCYCODE = document.frmPayment.CURRENCYCODE.value;
1338 var MERCHANT_TRANID = document.frmPayment.MERCHANT_TRANID.value;
1339 var AMOUNT = document.frmPayment.AMOUNT.value;
1340 var _token = document.frmPayment._token.value;
1341 var session_id= '38CE69F72F58599D10CB0925CF8FD7B9' ;
1342 var postData = "&MERCHANTID=" + MERCHANTID;
1343
1344 postData += "&CURRENCYCODE=" + CURRENCYCODE;
1345 postData += "&MERCHANT_TRANID=" + MERCHANT_TRANID;
1346 postData += "&AMOUNT=" + AMOUNT;
1347 postData += "&_token=" + _token;
1348 postData += "&session_id=" + session_id;
1349
1350 var sUrlForCancel = "/ctProcessCheckPaymentCancel.jsp";
1351 //var cancelRequest = YAHOO.util.Connect.asyncRequest('POST', sUrlForCancel, callback, postData);
1352 var cancelRequest = doAjax(sUrlForCancel,postData,SuccessResponse,FailureResponse,10000);
1353 }
1354
1355 function createDiv()
1356 {
1357 var ni = document.getElementById('myDiv');
1358 var divTag = document.createElement("div");
1359 divTag.id = "div1";
1360 divTag.setAttribute("align","left");
1361 divTag.style.margin = "1px top";
1362 divTag.className ="dynamicDiv";
1363 //divTag.className = "time";
1364 //divTag.style.position="absolute";
1365 //divTag.BEGIN="3"
1366 //divTag.DUR="8"
1367 //divTag.style.backgroundColor="red";
1368 divTag.innerHTML = "<strong>Sorry, you cannot cancel your payment right now as it is under process.</strong>";
1369 ni.appendChild(divTag);
1370 }
1371
1372 /*
1373 function initYear(mf) {
1374
1375 var t = new Date;
1376 var nyear=t.getFullYear();
1377 nyear = nyear + 10;
1378 var count = 0;
1379
1380 while (count < 10) {
1381
1382 var ooption = document.createElement("option");
1383 mf.options.add(ooption);
1384 ooption.value = nyear;
1385 ooption.text = nyear;
1386 nyear++
1387 count++;
1388 }
1389 }
1390 */
1391
1392 function loadDisplayStyle()
1393 {
1394 if ($('PaymentMethodSelection') != undefined && document.frmPayment.pay_method == undefined) {
1395 $('PaymentMethodSelection').style.display = 'none';
1396 $('btnRows').style.display = 'none';
1397 }else{
1398 document.frmPayment.pay_method.className +='input-block-level';
1399 }
1400 document.getElementById('btnReset').style.display = 'none';
1401
1402
1403 //additional information check term as requested by OSES
1404
1405
1406
1407 $('term_check').style.display = 'none';
1408
1409
1410
1411 var selectedMethod = document.frmPayment.PAYMENT_METHOD.value;
1412 if (selectedMethod == '1') {
1413
1414 $('CreditCard').style.display = 'block';
1415 $('btnRows').style.display = 'block';
1416 $('moreInfoRows').style.display = 'block';
1417 document.getElementById('btnReset').style.display = 'inline';
1418 //document.getElementById('debit_card_message').style.display = 'none';
1419
1420
1421
1422
1423 $('installmentSection').style.display = 'none';
1424 document.frmPayment.INSTALLMENT_CODE.selectedIndex = 0;
1425
1426 ;
1427 // 3rd party booking details
1428
1429
1430
1431 $('3rdPartyBookingInfo').style.display = 'none';
1432
1433 ;
1434 //additional information bill payment as requested by OSES
1435
1436
1437
1438
1439 $('oses_billpaymentinfo').style.display = 'none';
1440
1441
1442
1443 } else if(selectedMethod == '3'){
1444 //20170508 Osama : Add FPX B2C
1445 $('CreditCard').style.display = 'none';
1446 $('FPX_B2C').style.display = 'block';
1447 $('FPX_B2B').style.display = 'none';
1448 $('btnRows').style.display = 'block';
1449 $('moreInfoRows').style.display = 'block';
1450
1451 }else if(selectedMethod == '16'){
1452 $('CreditCard').style.display = 'none';
1453 $('FPX_B2C').style.display = 'none';
1454 $('FPX_B2B').style.display = 'block';
1455 $('btnRows').style.display = 'block';
1456 $('moreInfoRows').style.display = 'block';
1457
1458 }else{
1459 $('CreditCard').style.display = 'none';
1460 $('FPX_B2C').style.display = 'none';
1461 $('FPX_B2B').style.display = 'none';
1462 if (selectedMethod != '') {
1463 //King - 20110328 : Show submit button even auto redirect
1464 $('btnRows').style.display = 'block';
1465 $('moreInfoRows').style.display = 'none';
1466 $('redirectionRow').style.display = 'block';
1467
1468 //also ask immediately submit as do not require user to do any selection anymore for payment method
1469 //submitForm();
1470 //King - 20110527 : avoid checking if is from oses
1471 if(document.getElementById("term_check").style.display != "block"){
1472 //King - 20110328 : Call ValidateForm instead of submit form
1473 ValidateForm(document.frmPayment);
1474 }
1475
1476 }
1477 }
1478 }
1479
1480 /**********************************************************************************************************************************************/
1481 //20140918 yjtan - MasterPass Integration
1482 function processError()
1483 {
1484 alert("Error occured at MasterPass page. Unable to continue MasterPass process");
1485 resetForm();
1486 }
1487
1488 function resetForm() {
1489 document.frmPayment.reset();
1490
1491 /* [20160803] modified by marrup */
1492 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
1493 document.getElementById('card_cvc_visacheckout').style.display = 'none';
1494
1495 var cardTypeRadios = document.getElementsByName('CARDTYPE');
1496 for (var i = 0; i < cardTypeRadios.length; i++) {
1497 cardTypeRadios[i].disabled = false;
1498 }
1499
1500 document.frmPayment.CARD_NO1.disabled = false;
1501 document.frmPayment.CARD_NO2.disabled = false;
1502 document.frmPayment.CARD_NO3.disabled = false;
1503 document.frmPayment.CARD_NO4.disabled = false;
1504 document.frmPayment.CARDNO.value = '';
1505 }
1506
1507 document.frmPayment.CARDTYPE.disabled = false;
1508 document.frmPayment.CARDNAME.disabled = false;
1509 document.frmPayment.CARDNO.disabled = false;
1510 document.frmPayment.EXPIRYMONTH.disabled = false;
1511 document.frmPayment.EXPIRYYEAR.disabled = false;
1512 document.frmPayment.CARD_ISSUER_BANK_COUNTRY_CODE.disabled = false;
1513 document.frmPayment.CARDNAME.focus();
1514 document.getElementById('card_cvc').style.display = 'block';
1515 if(typeof document.frmPayment.visacheckout_callid != 'undefined' ){
1516 document.frmPayment.visacheckout_callid = "";
1517 }
1518 if(typeof document.frmPayment.visacheckout_cvv_responsecode != 'undefined' ){
1519 document.frmPayment.visacheckout_cvv_responsecode = "";
1520 }
1521
1522 if(document.getElementById("hide_vc_btn") != null)
1523 { document.getElementById("hide_vc_btn").style.display = "block"; }
1524 }
1525
1526 function callMasterPassPage()
1527 {
1528 collectParam();
1529 getRequestToken();
1530 }
1531
1532 function collectParam() {
1533 /* [20160804] modified by marrup */
1534 var acceptedCard = "";
1535 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
1536 var cardTypeRadios = document.getElementsByName('CARDTYPE');
1537 for (var i = 0; i < cardTypeRadios.length; i++) {
1538 if (i > 0) {
1539 acceptedCard += ";";
1540 }
1541 acceptedCard += cardTypeRadios[i].value;
1542 }
1543 } else {
1544 for (var i = 1; i < document.frmPayment.CARDTYPE.options.length; i++) {
1545 if (i > 1) {
1546 acceptedCard += ";";
1547 }
1548 acceptedCard += document.frmPayment.CARDTYPE.options[i].value;
1549 }
1550 }
1551 document.frmPayment.acceptedCards.value = acceptedCard;
1552 }
1553
1554 function getRequestToken()
1555 {
1556 var params = "acceptedCards=" + document.frmPayment.acceptedCards.value +
1557 "&merchant_identifier="+ document.frmPayment.merchant_identifier.value +
1558 "&merchant_tranid="+ document.frmPayment.MERCHANT_TRANID.value +
1559 "&txn_currency="+ document.frmPayment.CURRENCYCODE.value +
1560 "&txn_amount="+ document.frmPayment.AMOUNT.value;
1561
1562 var postbackURL = "/payment/masterpass/CallbackGetRequestToken.jsp?" + params;
1563
1564 var callback = {
1565 success : handleSuccess,
1566 failure : handleFailure,
1567 timeout : 60000//1 minute
1568 };
1569
1570 //var request = YAHOO.util.Connect.asyncRequest('POST', postbackURL, callback);
1571 var request = doAjax(postbackURL,"",handleSuccess,handleFailure,60000);
1572 }
1573
1574 var oauthToken;
1575 var reward;
1576 var cards;
1577 var handleSuccess = function(o) {
1578 var response = new String(o.responseText);
1579 response = encodeURIComponent(response);
1580 response = response.replace(/%0D%0A/g,"");
1581 response = decodeURIComponent(response);
1582 response = response.trim();
1583 if(response != "ERROR")
1584 {
1585 var b = response.split(";");
1586 oauthToken = b[0];
1587 cards = b[1];
1588 reward = b[2];
1589 updateRequestToken();
1590 //handleBuyWithMasterPass();
1591 }
1592 else
1593 {
1594 processError();
1595 }
1596 }
1597
1598 var handleFailure = function(o) {
1599 processError();
1600 }
1601
1602 function updateRequestToken()
1603 {
1604 var datetime = "";
1605 if(paymentWindowTimeOut != ""){
1606 var currentdate = new Date();
1607 currentdate.setSeconds(currentdate.getSeconds() + paymentWindowTimeOut);
1608 currentdate.setMonth(currentdate.getMonth() + 1);
1609
1610 datetime = currentdate.getDate()+"/"+currentdate.getMonth()+"/"+currentdate.getFullYear()+" "+ currentdate.getHours() + ":"
1611 + currentdate.getMinutes() + ":"
1612 + currentdate.getSeconds();
1613 }
1614
1615 var params = "oauth_token=" + oauthToken +
1616 "&MERCHANTID="+ document.frmPayment.MERCHANTID.value +
1617 "&MERCHANT_TRANID="+ document.frmPayment.MERCHANT_TRANID.value +
1618 "&sourceType=Payment Window"+
1619 "&PAYMENT_WINDOW_END_TIME="+datetime;
1620
1621 var updateTokenURL = "/payment/masterpass/UpdateRequestToken.jsp?" + params;
1622
1623 var callback = {
1624 success : updateSuccess,
1625 failure : updateFailure,
1626 timeout : 30000//30sec
1627 };
1628
1629 //var request = YAHOO.util.Connect.asyncRequest('POST', updateTokenURL, callback);
1630 var request = doAjax(updateTokenURL,"",updateSuccess,updateFailure,30000);
1631 }
1632
1633 var updateSuccess = function(o) {
1634 var response = new String(o.responseText);
1635 response = encodeURIComponent(response);
1636 response = response.replace(/%0D%0A/g,"");
1637 response = decodeURIComponent(response);
1638 response = response.trim();
1639 if(response != "ERROR")
1640 {
1641 handleBuyWithMasterPass();
1642 }
1643 else
1644 {
1645 processError();
1646 }
1647 }
1648
1649 var updateFailure = function(o) {
1650 processError();
1651 }
1652
1653 function handleBuyWithMasterPass() {
1654 document.frmPayment.isSubmitBtnClicked.value = 1;
1655 var merchant_identifier = document.frmPayment.merchant_identifier.value;
1656 MasterPass.client.checkout({
1657 "requestToken":""+oauthToken+"",
1658 "callbackUrl":"https://ppsdev.infinitium.com/OauthCallbackServlet",
1659 "merchantCheckoutId":""+merchant_identifier+"",
1660 "allowedCardTypes":""+cards+"",
1661 "cancelCallback" : "https://ppsdev.infinitium.com",
1662 "suppressShippingAddressEnable": "true",
1663 "loyaltyEnabled" : ""+reward+"",
1664 "requestBasicCheckout" : "false",
1665 "version":"v6",
1666 "failureCallback":failureCallback,
1667 "successCallback":successCallback
1668 });
1669 }
1670
1671 var successCallback = function(o) {
1672 document.frmPayment.isSubmitBtnClicked.value = 0;
1673 getCheckoutData(o);
1674 }
1675
1676 /*var failureCallback = function(o) {
1677 document.frmPayment.isSubmitBtnClicked.value = 0;
1678 processError();
1679 }*/
1680
1681 var failureCallback = function(o) {
1682 document.frmPayment.isSubmitBtnClicked.value = 0;
1683 var response = new String(o.responseText);
1684 if(response == "undefined")
1685 {
1686 resetForm();
1687 }
1688 else
1689 { processError(); }
1690 }
1691
1692 function preCheckoutData()
1693 {
1694 document.frmPayment.isSubmitBtnClicked.value = 0;
1695 if(typeof document.frmPayment.oauth_token != 'undefined' &&
1696 typeof document.frmPayment.oauth_verifier != 'undefined' &&
1697 typeof document.frmPayment.checkout_resource_url != 'undefined')
1698 {
1699 if(document.frmPayment.oauth_token.value != null &&
1700 document.frmPayment.oauth_verifier.value != null &&
1701 document.frmPayment.checkout_resource_url.value != null)
1702 {
1703 var data = new Object();
1704 data.oauth_token = document.frmPayment.oauth_token.value;
1705 data.oauth_verifier = document.frmPayment.oauth_verifier.value;
1706 data.checkout_resource_url = document.frmPayment.checkout_resource_url.value;
1707 getCheckoutData(data);
1708 }
1709 }
1710 }
1711
1712 function getCheckoutData(data)
1713 {
1714 var params = "OAUTH_TOKEN=" + data.oauth_token +
1715 "&OAUTH_VERIFIER="+ data.oauth_verifier +
1716 "&CHECKOUT_RESOURCE_URL="+ data.checkout_resource_url;
1717
1718 var postbackURL = "/payment/masterpass/CallbackGetCheckoutData.jsp?" + params;
1719
1720 var callback = {
1721 success : handleSuccessCheckout,
1722 failure : handleFailureCheckout,
1723 timeout : 60000//1 minute
1724 };
1725
1726 //var request = YAHOO.util.Connect.asyncRequest('POST', postbackURL, callback);
1727 var request = doAjax(postbackURL,"",handleSuccessCheckout,handleFailureCheckout,60000);
1728 }
1729
1730 var handleSuccessCheckout = function(o) {
1731 var response = new String(o.responseText);
1732 response = response.trim();
1733 response = encodeURIComponent(response);
1734 response = response.replace(/%0D%0A/g,"");
1735 response = decodeURIComponent(response);
1736 response = response.trim();
1737 if(response != "ERROR")
1738 {
1739 processCheckoutData(response)
1740 }
1741 else
1742 {
1743 processError();
1744 }
1745 }
1746
1747 var handleFailureCheckout = function(o) {
1748 processError();
1749 }
1750
1751 function processCheckoutData(checkoutData)
1752 {
1753 var b = checkoutData.split(";");
1754 var tranId = b[0];
1755 var cardHolderName = b[1];
1756 var accountNumber = b[2];
1757 var expiryMonth = b[3];
1758 var expiryYear = b[4];
1759 var brandId = b[5];
1760 var walletId = b[6];
1761
1762 var selCardType = "";
1763 if(brandId == "master")
1764 {
1765 selCardType = "M";
1766 }
1767 else if(brandId == "visa")
1768 {
1769 selCardType = "V";
1770 }
1771 else if(brandId == "amex")
1772 {
1773 selCardType = "A";
1774 }
1775 /* [20160805] modified by marrup */
1776 var selIndex;
1777 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
1778 document.getElementById('CARDTYPE-' +selCardType).click();
1779
1780 var maskedCardNumber = getPartialCardNo(accountNumber, 6, 4);
1781 document.frmPayment.CARD_NO1.value = maskedCardNumber.substring(0, 4);
1782 document.frmPayment.CARD_NO2.value = maskedCardNumber.substring(4, 8);
1783 document.frmPayment.CARD_NO3.value = maskedCardNumber.substring(8, 12);
1784 document.frmPayment.CARD_NO4.value = maskedCardNumber.substring(12, 16);
1785 document.frmPayment.CARD_NO1.disabled = true;
1786 document.frmPayment.CARD_NO2.disabled = true;
1787 document.frmPayment.CARD_NO3.disabled = true;
1788 document.frmPayment.CARD_NO4.disabled = true;
1789
1790 var cardTypeRadios = document.getElementsByName('CARDTYPE');
1791 for (var i = 0; i < cardTypeRadios.length; i++) {
1792 if (cardTypeRadios[i].value != 'M') {
1793 cardTypeRadios[i].disabled = true;
1794 }
1795 }
1796 } else {
1797 selIndex = getCardTypeIndex(selCardType);
1798 document.frmPayment.CARDTYPE.selectedIndex = selIndex;
1799 document.frmPayment.CARDTYPE.disabled = true;
1800 }
1801
1802 document.frmPayment.CARDNAME.value = cardHolderName;
1803 document.frmPayment.CARDNO.value = getPartialCardNo(accountNumber, 6, 4);
1804 document.frmPayment.hid_cardNo.value = accountNumber;
1805
1806 selIndex = getExpMonthIndex(expiryMonth);
1807 document.frmPayment.EXPIRYMONTH.selectedIndex = selIndex;
1808
1809 selIndex = getExpYearIndex(expiryYear);
1810 document.frmPayment.EXPIRYYEAR.selectedIndex = selIndex;
1811
1812 document.frmPayment.merchant_walletID.value=walletId;
1813 document.frmPayment.masterpass_tranid.value=tranId;
1814
1815 document.frmPayment.CARDNAME.disabled = true;
1816 document.frmPayment.CARDNO.disabled = true;
1817
1818 document.frmPayment.EXPIRYMONTH.disabled = true;
1819 document.frmPayment.EXPIRYYEAR.disabled = true;
1820 if (document.frmPayment.CARDCVC != null) {
1821 document.frmPayment.CARDCVC.focus();
1822 }
1823 //2015/1/28 added by linda (add on focus function on input field of CARD_ISSUER_BANK_COUNTRY_CODE)
1824 else {
1825 document.frmPayment.CARD_ISSUER_BANK_COUNTRY_CODE.focus();
1826 }
1827
1828
1829 //2016/10/28 added by lys
1830 if(selCardType == "V" || selCardType == "M" || selCardType == "J"){
1831 if('0' == '1' ||'0' == '2' ){
1832 document.getElementById('card_cvc').style.display = '';
1833 hide_cvc = 'No';
1834 if(isOsesResponsiveV2 == true){
1835 enableCVCV2();
1836 }
1837 }else{
1838 document.getElementById('card_cvc').style.display = 'none';
1839 hide_cvc = 'Yes';
1840 }
1841 }else if(selCardType == "A"){
1842 if('0' == '1' ||'0' == '3' ){
1843 document.getElementById('card_cvc').style.display = '';
1844 hide_cvc = 'No';
1845 if(isOsesResponsiveV2 == true){
1846 enableCVCV2();
1847 }
1848 }else{
1849 document.getElementById('card_cvc').style.display = 'none';
1850 hide_cvc = 'Yes';
1851 }
1852 }
1853 }
1854
1855 function getCardTypeIndex(cardType)
1856 {
1857 var sel = document.frmPayment.CARDTYPE;
1858 for(var i = 0, j = sel.options.length; i < j; ++i) {
1859 if(sel.options[i].value == cardType) {
1860 return i;
1861 };
1862 }
1863 return -1;
1864 }
1865
1866 function getPartialCardNo(fullCardNo, firstLen, lastLen)
1867 {
1868 var maskedLen = fullCardNo.length - firstLen - lastLen;
1869 var maskedNum = "";
1870 for(var i = 1; i <=maskedLen; i++)
1871 {
1872 maskedNum += "X";
1873 }
1874 return fullCardNo.substr(0, firstLen) + maskedNum + fullCardNo.substr(fullCardNo.length - lastLen, fullCardNo.length);
1875 }
1876
1877 function getExpMonthIndex(expMonth)
1878 {
1879 if(expMonth.length <2)
1880 { expMonth = "0"+expMonth; }
1881 var sel = document.frmPayment.EXPIRYMONTH;
1882 for(var i = 0, j = sel.options.length; i < j; ++i) {
1883 if(parseInt(sel.options[i].value) == expMonth) {
1884 return i;
1885 };
1886 }
1887 return -1;
1888 }
1889
1890 function getExpYearIndex(expYear)
1891 {
1892 var sel = document.frmPayment.EXPIRYYEAR;
1893 for(var i = 0, j = sel.options.length; i < j; ++i) {
1894 if(sel.options[i].value == expYear) {
1895 return i;
1896 };
1897 }
1898 return -1;
1899 }
1900 /**********************************************************************************************************************************************/
1901
1902
1903 var paymentWindowTimeOut = 0;
1904 if(paymentWindowTimeOut > 0)
1905 {
1906 var myVar = setInterval(function(){myTimer()}, 1000);
1907 }
1908 else
1909 {
1910 if (document.getElementById("PaymentWindowTime") != null && document.getElementById("PaymentWindowTime") != undefined)
1911 {
1912 document.getElementById("PaymentWindowTime").style.display="none";
1913 }
1914 }
1915
1916 function myTimer()
1917 {
1918 var time = formatSecondsAsTime(paymentWindowTimeOut);
1919 document.getElementById("paymentWindowTimeout").value = time;
1920 paymentWindowTimeOut = Math.floor(paymentWindowTimeOut - 1);
1921 if (paymentWindowTimeOut < 0) {
1922 clearInterval(myVar);
1923 popupTimeout();
1924 document.getElementById("paymentWindowTimeoutResult").value = 'Failed';
1925
1926 }
1927
1928 }
1929
1930 function redirectPage()
1931 {
1932 document.frmPayment._cancel_payment.value = 'Yes';
1933 document.frmPayment.submit();
1934 }
1935
1936 //2015/4/24 added by linda
1937function redirectPageTimeOut()
1938 {
1939 document.frmPayment._cancel_payment.value = 'Yes';
1940 document.frmPayment.isSubmitBtnClicked.value = 1;
1941 document.frmPayment.submit();
1942 }
1943
1944 function formatSecondsAsTime(secs, format) {
1945 var hr = Math.floor(secs / 3600);
1946 var min = Math.floor((secs - (hr * 3600))/60);
1947 var sec = Math.floor(secs - (hr * 3600) - (min * 60));
1948
1949 if (hr < 10) { hr = "0" + hr; }
1950 if (min < 10) { min = "0" + min; }
1951 if (sec < 10) { sec = "0" + sec; }
1952 if (hr) { hr = "00"; }
1953
1954 if (format != null) {
1955 var formatted_time = format.replace('hh', hr);
1956 formatted_time = formatted_time.replace('h', hr*1+""); // check for single hour formatting
1957 formatted_time = formatted_time.replace('mm', min);
1958 formatted_time = formatted_time.replace('m', min*1+""); // check for single minute formatting
1959 formatted_time = formatted_time.replace('ss', sec);
1960 formatted_time = formatted_time.replace('s', sec*1+""); // check for single second formatting
1961 return formatted_time;
1962 } else {
1963 //return hr + ':' + min + ':' + sec;
1964 return min + ':' + sec;
1965 }
1966 }
1967
1968
1969 function popupTimeout()
1970 {
1971 // Getting the variable's value from a link
1972 var loginBox = "#timeout";
1973
1974 //Fade in the Popup and add close button
1975 $(loginBox).fadeIn(100);
1976
1977 //Set the center alignment padding + border
1978 var popMargTop = ($(loginBox).height()+ 24) / 2;
1979 var popMargLeft = ($(loginBox).width()+ 24) / 2;
1980
1981 $(loginBox).css({
1982 'margin-top' : -popMargTop,
1983 'margin-left' : -popMargLeft
1984 });
1985
1986 // Add the mask to body
1987 $('body').append('<div id="mask"></div>');
1988 $('#mask').fadeIn(300);
1989
1990 return true;
1991 }
1992
1993 function closePopUpDialog()
1994 {
1995 $('#mask , .login-popup').fadeOut(100 , function() {
1996 });
1997 }
1998
1999 var hide_cvc = "No";
2000 function ValidateForm(frm)
2001 {
2002 if (frm.PAYMENT_METHOD.value == null || frm.PAYMENT_METHOD.value == "")
2003 {
2004 if (frm.PAYMENT_METHOD != undefined)
2005 {
2006 alert('Please specify which payment method you would like to use.');
2007 frm.PAYMENT_METHOD.focus();
2008 return false;
2009 }
2010 else
2011 {
2012 alert('Please specify which payment method you would like to use.');
2013 return false;
2014 }
2015 }
2016
2017 if (frm.PAYMENT_METHOD.value == '1')
2018 {
2019 if (!ValidateCreditCard(frm))
2020 { return false; }
2021 }
2022
2023 if (frm.PAYMENT_METHOD.value == '3')
2024 {
2025 if(document.getElementById('FPX_B2C')!= null){
2026 if (frm.FPX_B2C_BANK_CODE.options[frm.FPX_B2C_BANK_CODE.selectedIndex].value == "" ||
2027 frm.FPX_B2C_BANK_CODE.options[frm.FPX_B2C_BANK_CODE.selectedIndex].value == "-")
2028 {
2029 alert("Please choose the bank from FPX bank list.");
2030 frm.FPX_B2C_BANK_CODE.focus();
2031 return false;
2032 }
2033 }
2034
2035 }
2036 if (frm.PAYMENT_METHOD.value == '16')
2037 {
2038 if(document.getElementById('FPX_B2B')!= null){
2039 if (frm.FPX_B2B_BANK_CODE.options[frm.FPX_B2B_BANK_CODE.selectedIndex].value == "" ||
2040 frm.FPX_B2B_BANK_CODE.options[frm.FPX_B2B_BANK_CODE.selectedIndex].value == "-")
2041 {
2042 alert("Please choose the bank from FPX bank list.");
2043 frm.FPX_B2B_BANK_CODE.focus();
2044 return false;
2045 }
2046 }
2047
2048 }
2049 //validate check bill payment as requested by OSES
2050 if(document.getElementById("oses_billpaymentinfo").style.display == "block")
2051 {
2052 if(frm.oses_bill_icno.value == '' || (/\W/.test(frm.oses_bill_icno.value)) )
2053 {
2054 alert('');
2055 frm.oses_bill_icno.focus();
2056 return false;
2057 }
2058
2059 if(frm.oses_bill_contactno.value == '' || !(frm.oses_bill_contactno.value.match(/^[0-9]+$/)))
2060 {
2061 alert('');
2062 frm.oses_bill_contactno.focus();
2063 return false;
2064 }
2065
2066 if(frm.oses_bill_street.value == '')
2067 {
2068 alert('');
2069 frm.oses_bill_street.focus();
2070 return false;
2071 }
2072
2073 if(frm.oses_bill_city.value == '')
2074 {
2075 alert('');
2076 frm.oses_bill_city.focus();
2077 return false;
2078 }
2079
2080 if(frm.oses_bill_state.value == '')
2081 {
2082 alert('');
2083 frm.oses_bill_state.focus();
2084 return false;
2085 }
2086
2087 if(frm.oses_bill_postal.value == '')
2088 {
2089 alert('');
2090 frm.oses_bill_postal.focus();
2091 return false;
2092 }
2093 }
2094
2095 //validate check term as requested by OSES
2096 if(document.getElementById("term_check").style.display == "block")
2097 {
2098 if(!frm.chkterm.checked)
2099 {
2100
2101
2102
2103 alert('Please agree with the term and condition.');
2104
2105
2106 return false;
2107 }
2108 }
2109
2110 combineCardPhoneNo(frm); // should invoke this method here or may be have better idea ? ...
2111 process_payment_validity(frm); //using ajax
2112 }
2113
2114 function ValidateCreditCard(form) {
2115 /* [20160802] modified by marrup */
2116 var cardTypeSelectedValue;
2117 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
2118 /* new design */
2119 var cardTypeRadios = document.getElementsByName('CARDTYPE');
2120
2121 if (cardTypeRadios.length > 0) {
2122 for (var i = 0; i < cardTypeRadios.length; i++) {
2123 if (cardTypeRadios[i].type.toLowerCase() === 'radio' && cardTypeRadios[i].checked) {
2124 cardTypeSelectedValue = cardTypeRadios[i].value;
2125 }
2126 }
2127 }
2128
2129 if (form.CARD_NO1.value == "") {
2130 alert('Please enter your credit card number.');
2131 form.CARD_NO1.focus();
2132 return false;
2133 } else if (form.CARD_NO2.value == "") {
2134 alert('Please enter your credit card number.');
2135 form.CARD_NO2.focus();
2136 return false;
2137 } else if (form.CARD_NO3.value == "") {
2138 alert('Please enter your credit card number.');
2139 form.CARD_NO3.focus();
2140 return false;
2141 }
2142
2143 if (cardTypeSelectedValue == 'A' || cardTypeSelectedValue == 'D') {
2144 /* map 3 blocks to one */
2145 form.CARDNO.value = form.CARD_NO1.value +form.CARD_NO2.value +form.CARD_NO3.value;
2146 } else {
2147 if (form.CARD_NO4.value == "") {
2148 alert('Please enter your credit card number.');
2149 form.CARD_NO4.focus();
2150 return false;
2151 }
2152 /* map 4 blocks to one */
2153 form.CARDNO.value = form.CARD_NO1.value +form.CARD_NO2.value +form.CARD_NO3.value +form.CARD_NO4.value;
2154 }
2155 } else {
2156 /* old design */
2157 if (form.CARDNO.value == "") {
2158 alert('Please enter your credit card number.');
2159 form.CARDNO.focus();
2160 return false;
2161 }
2162 }
2163
2164 //20140908 yjtan - MasterPass does not allow display full PAN. Need to use hid_cardNo for validation
2165 var chkCardNo = form.CARDNO.value;
2166 if(form.hid_cardNo!= null && form.hid_cardNo.value != "")
2167 { chkCardNo = form.hid_cardNo.value; }
2168
2169 if (form.CARDNAME.value == "") {
2170
2171 alert('Please enter your name as appear on your credit card.');
2172 form.CARDNAME.focus();
2173
2174 return false;
2175 }
2176
2177 if (!isValidInteger(chkCardNo)) {
2178
2179 alert('Please enter a valid credit card number.');
2180 form.CARDNO.focus();
2181
2182 return false;
2183 }
2184
2185 /* 2015/5/6 added by linda; [20160801] modified by marrup */
2186 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
2187 /* new design */
2188 /* if merchant has no card type to select */
2189 if (cardTypeSelectedValue == undefined) {
2190 alert('Please choose your credit card type.');
2191 return false;
2192 }
2193 } else {
2194 /* old design */
2195 if (form.CARDTYPE.options[form.CARDTYPE.selectedIndex].text == "--") {
2196 alert('Please choose your credit card type.');
2197 form.CARDTYPE.focus();
2198 return false;
2199 }
2200
2201 if (form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "J" && form.CARDNO.value.length == 15) {
2202 //wanping: more info here: http://www.beachnet.com/~hstiles/cardtype.html
2203 var prefixStr = "";
2204 prefixStr = form.CARDNO.value.substring(0,4);
2205
2206 if (prefixStr != "2131" || prefixStr != "1800") {
2207 alert('Please enter a valid credit card number.');
2208 form.CARDNO.focus();
2209 return false;
2210 }
2211 } else if (form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "A" ) {
2212 //wanping: more info here: http://www.beachnet.com/~hstiles/cardtype.html
2213 var prefixStr = "";
2214 prefixStr = form.CARDNO.value.substring(0,2);
2215
2216 if ((prefixStr != "34" || prefixStr != "37") && form.CARDNO.value.length != 15) {
2217 alert('Please enter a valid credit card number.');
2218 form.CARDNO.focus();
2219 return false;
2220 }
2221 } else if ((form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "V" || form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "M" || form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "J") && form.CARDNO.value.length != 16) {
2222 alert('Please enter a valid credit card number.');
2223 form.CARDNO.focus();
2224 return false;
2225 }
2226 }
2227
2228 if (!validateCardNo(chkCardNo)) {
2229 alert('Please enter a valid credit card number.');
2230 form.CARDNO.focus();
2231 return false;
2232 }
2233
2234/**
2235 if (form.CARDTYPE.options[form.CARDTYPE.selectedIndex].text == "--") {
2236
2237 alert('Please choose your credit card type.');
2238 form.CARDTYPE.focus();
2239
2240 return false;
2241 }
2242**/
2243 if (form.EXPIRYMONTH.options[form.EXPIRYMONTH.selectedIndex].text == "--") {
2244 alert('Please choose the expiry month of your credit card.');
2245 form.EXPIRYMONTH.focus();
2246 return false;
2247 }
2248
2249 if (form.EXPIRYYEAR.options[form.EXPIRYYEAR.selectedIndex].text == "--") {
2250 alert('Please choose the expiry year of your credit card.');
2251 form.EXPIRYYEAR.focus();
2252 return false;
2253 }
2254
2255 if (checkIsCardExpired(form.EXPIRYYEAR.options[form.EXPIRYYEAR.selectedIndex].value, form.EXPIRYMONTH.options[form.EXPIRYMONTH.selectedIndex].value)) {
2256 alert('Your credit card has expired. Please use another credit card.');
2257 return false;
2258 }
2259
2260
2261 /* [20160801] modified by marrup */
2262 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
2263 /* new design */
2264 var strValue;
2265 strValue = form.CARDNO.value.substring(0,1);
2266 strValue2 = form.CARDNO.value.substring(0,2);
2267 prefixStr = form.CARDNO.value.substring(0,4);
2268
2269 if(!((strValue == "4" && cardTypeSelectedValue == "V") ||
2270 ((strValue == "5" || strValue == "2") && cardTypeSelectedValue == "M") ||
2271 ((strValue == "3" || prefixStr == "2131" || prefixStr == "1800" )&& cardTypeSelectedValue == "J") ||
2272 ((strValue2 == "34" || strValue2 == "37") && cardTypeSelectedValue == "A"))) {
2273
2274 alert('Credit Card type selected does not match card number. Please reselect card type.');
2275 return false;
2276 }
2277 } else {
2278 /* old design */
2279 if (form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value != "--" && form.CARDNO.value != "") {
2280 var strValue;
2281 strValue = form.CARDNO.value.substring(0,1);
2282 strValue2 = form.CARDNO.value.substring(0,2);
2283 prefixStr = form.CARDNO.value.substring(0,4);
2284
2285
2286 if(!((strValue == "4" && form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "V") ||
2287 ((strValue == "5" || strValue == "2") && form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "M") ||
2288 // added by linda 2015/5/6
2289 ((strValue == "3" || prefixStr == "2131" || prefixStr == "1800" )&& form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "J") ||
2290 ((strValue2 == "34" || strValue2 == "37") && form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "A"))) {
2291
2292 alert('Credit Card type selected does not match card number. Please reselect card type.');
2293 form.CARDTYPE.focus();
2294 form.CARDNO.focus();
2295
2296 return false;
2297 }
2298 }
2299 }
2300
2301 /* [20160801] modified by marrup */
2302 if (document.frmPayment.CARDCVC != null && hide_cvc == "No") {
2303 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
2304 /* new design */
2305 if (cardTypeSelectedValue == "A") {
2306 if (form.CARDCVC.value.length != 4) {
2307 alert('Please enter your credit card cvc number. \nThis card cvc number is a 4-digit number that is usually \n located on the front of your credit card.');
2308 form.CARDCVC.focus();
2309 return false;
2310 } else if (!isValidInteger(form.CARDCVC.value)) {
2311 alert('Please enter your credit card cvc number. \nThis card cvc number is a 4-digit number that is usually \n located on the front of your credit card.');
2312 form.CARDCVC.focus();
2313 return false;
2314 }
2315 } else if (cardTypeSelectedValue == "V" || cardTypeSelectedValue == "M" || cardTypeSelectedValue == "J" ) {
2316 if (typeof form.visacheckout_callid === 'undefined' || form.visacheckout_callid.value == "" || document.getElementById('card_cvc').style.display != 'none') {
2317 if (form.CARDCVC.value.length != 3) {
2318 alert('Please enter your credit card cvc number. \nThis card cvc number is a 3-digit number that is usually \n located on the back of your credit card.');
2319 form.CARDCVC.focus();
2320 return false;
2321 } else if (!isValidInteger(form.CARDCVC.value)) {
2322 alert('Please enter your credit card cvc number. \nThis card cvc number is a 3-digit number that is usually \n located on the back of your credit card.');
2323 form.CARDCVC.focus();
2324 return false;
2325 }
2326 }
2327 }
2328 } else {
2329 /* old design */
2330 if (form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "A") {
2331 if (form.CARDCVC.value.length != 4) {
2332 alert('Please enter your credit card cvc number. \nThis card cvc number is a 4-digit number that is usually \n located on the front of your credit card.');
2333 form.CARDCVC.focus();
2334 return false;
2335 } else if (!isValidInteger(form.CARDCVC.value)) {
2336 alert('Please enter your credit card cvc number. \nThis card cvc number is a 4-digit number that is usually \n located on the front of your credit card.');
2337 form.CARDCVC.focus();
2338 return false;
2339 }
2340 } else if (form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "V" || form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "M" || form.CARDTYPE.options[form.CARDTYPE.selectedIndex].value == "J" ) {
2341 if (typeof form.visacheckout_callid === 'undefined' || form.visacheckout_callid.value == "" || document.getElementById('card_cvc').style.display != 'none') {
2342 if (form.CARDCVC.value.length != 3) {
2343 alert('Please enter your credit card cvc number. \nThis card cvc number is a 3-digit number that is usually \n located on the back of your credit card.');
2344 form.CARDCVC.focus();
2345 return false;
2346 } else if (!isValidInteger(form.CARDCVC.value)) {
2347 alert('Please enter your credit card cvc number. \nThis card cvc number is a 3-digit number that is usually \n located on the back of your credit card.');
2348 form.CARDCVC.focus();
2349 return false;
2350 }
2351 }
2352 }
2353 }
2354 }
2355
2356
2357 if(form.CARD_ISSUER_BANK_COUNTRY_CODE!=undefined)
2358 {
2359 if (form.CARD_ISSUER_BANK_COUNTRY_CODE.options[form.CARD_ISSUER_BANK_COUNTRY_CODE.selectedIndex].value == "" ||
2360 form.CARD_ISSUER_BANK_COUNTRY_CODE.options[form.CARD_ISSUER_BANK_COUNTRY_CODE.selectedIndex].value == "-")
2361 {
2362 alert('Please choose the issuing country of your credit card.');
2363 form.CARD_ISSUER_BANK_COUNTRY_CODE.focus();
2364 return false;
2365 }
2366 }
2367
2368 /* [20160801] modified by marrup */
2369 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
2370 /* new design : installment for new design is not implemented yet */
2371 } else {
2372 /* old design */
2373 if (form.chkInstallment && form.chkInstallment.checked && form.INSTALLMENT_CODE) {
2374 if (form.INSTALLMENT_CODE.options[form.INSTALLMENT_CODE.selectedIndex].value == "") {
2375 if (!confirm('You have not chosen any installment plan, are you sure want to proceed as normal credit card purchase?')) {
2376 return false;
2377 }
2378 }
2379 } else {
2380 form.INSTALLMENT_CODE.selectedIndex = 0;
2381 }
2382 }
2383
2384 // if this is third party booking ...
2385 if ('No' == 'Yes') {
2386
2387 if (form.CARD_ISSUER_BANK.value == "") {
2388
2389 alert('Please enter the issuing bank of your credit card.');
2390 form.CARD_ISSUER_BANK.focus();
2391
2392 return false;
2393 }
2394
2395 if (form.CARD_IDENTITY_REF_TYPE.value == "") {
2396
2397 alert('Please choose your identity reference type.');
2398 form.CARD_IDENTITY_REF_TYPE.focus();
2399
2400 return false;
2401 }
2402
2403 if (form.CARD_IDENTITY_REF.value == "") {
2404
2405 alert('Please enter your identity reference.');
2406 form.CARD_IDENTITY_REF.focus();
2407
2408 return false;
2409 }
2410
2411 if (form.CARD_PHONE_FIELD3.value == "") {
2412
2413 alert('Please enter your phone number.');
2414 form.CARD_PHONE_FIELD3.focus();
2415
2416 return false;
2417 }
2418
2419 if (!isValidPhoneNo(form.CARD_PHONE_FIELD1.value)) {
2420
2421 alert('Please enter a valid phone number. Do not include any symbol or space.');
2422 form.CARD_PHONE_FIELD1.focus();
2423
2424 return false;
2425 }
2426
2427 if (!isValidPhoneNo(form.CARD_PHONE_FIELD2.value)) {
2428
2429 alert('Please enter a valid phone number. Do not include any symbol or space.');
2430 form.CARD_PHONE_FIELD2.focus();
2431
2432 return false;
2433 }
2434
2435 if (!isValidPhoneNo(form.CARD_PHONE_FIELD3.value)) {
2436
2437 alert('Please enter a valid phone number. Do not include any symbol or space.');
2438 form.CARD_PHONE_FIELD3.focus();
2439
2440 return false;
2441 }
2442
2443 if (form.CARD_EMAIL.value == "") {
2444
2445 alert('Please enter your email address.');
2446 form.CARD_EMAIL.focus();
2447
2448 return false;
2449 }
2450
2451 if (!isValidEmail(form.CARD_EMAIL.value)) {
2452
2453 alert('Please enter a valid email address.');
2454 form.CARD_EMAIL.focus();
2455
2456 return false;
2457 }
2458
2459 /*
2460 if (form.CARD_BILL_ADDR.value == "") {
2461
2462 alert('Please enter billing address.');
2463 form.CARD_BILL_ADDR.focus();
2464
2465 return false;
2466 }
2467
2468 if (form.CARD_BILL_ADDR_POSCODE.value == "") {
2469
2470 alert('Please enter postcode of billing address.');
2471 form.CARD_BILL_ADDR_POSCODE.focus();
2472
2473 return false;
2474 }
2475
2476 if (form.CARD_BILL_ADDR_COUNTRY_CODE.value == "") {
2477
2478 alert('Please choose the country of billing address.');
2479 form.CARD_BILL_ADDR_COUNTRY_CODE.focus();
2480
2481 return false;
2482 }
2483 */
2484
2485 if (form.CARD_PHONE_FIELD1.value == "") {
2486
2487 if (!confirm('You have not enter the country code in phone no, do you want to proceed?')) {
2488
2489 form.CARD_PHONE_FIELD1.focus();
2490
2491 return false;
2492 }
2493 }
2494
2495 if (form.CARD_PHONE_FIELD2.value == "") {
2496
2497 if (!confirm('You have not enter the area code in phone no, do you want to proceed?')) {
2498
2499 form.CARD_PHONE_FIELD2.focus();
2500
2501 return false;
2502 }
2503 }
2504 }
2505 //Anton 20161027 : bin filtering base on 20161027 yjtan
2506 if ((typeof allowedBINSetting !== 'undefined') && allowedBINSetting.length > 0) {
2507 // check card BIN based on setting in lookup table
2508 //anton 20161028: for radio box and select;
2509 //var cardType = form.CARDTYPE.options[form.CARDTYPE1.selectedIndex].value;
2510
2511 //Julius 29/03/2017. This method to get CARDTYPE value for FIREFOX AND CHROME browser
2512 var cardType = form.CARDTYPE.value;
2513 if (typeof cardType === 'undefined'){
2514 //Julius 29/03/2017. This method to get CARDTYPE value from radio button only for INTERNET EXPLORER browser
2515 for (var i=0; i < document.frmPayment.CARDTYPE.length; i++)
2516 {
2517 if (document.frmPayment.CARDTYPE[i].checked){
2518 var cardType = document.frmPayment.CARDTYPE[i].value;
2519 }
2520 }
2521 }
2522
2523 var sysName = 'PREFIX_';
2524 if (cardType.toUpperCase() == 'A') {
2525 sysName = sysName + form.CARDNO.value.substring(0, 2);
2526 } else {
2527 sysName = sysName + form.CARDNO.value.substring(0, 1);
2528 }
2529
2530 var incomingBIN = parseInt(form.CARDNO.value.substring(0, 6));
2531 for (var i = 0; i < allowedBINSetting.length; i++) {
2532 if (allowedBINSetting[i].sysName.toUpperCase() == sysName && allowedBINSetting[i].sysValue.toUpperCase() == cardType) {
2533 if (incomingBIN >= parseInt(allowedBINSetting[i].extValue1) && incomingBIN <= parseInt(allowedBINSetting[i].extValue2)) {
2534 console.log('Incoming BIN is allowed');
2535 } else {
2536 alert('Card BIN not supported by card type.');
2537 form.CARDTYPE.focus();
2538 return false;
2539 }
2540 }
2541 }
2542 }
2543 /***************************************************************************************************************************************************************************************/
2544
2545 return true;
2546 }
2547
2548 function validateCardNo(cardNumber) {
2549
2550 var clen = new Array(cardNumber.length);
2551 var n = 0,sum = 0;
2552
2553 for (n = 0; n < cardNumber.length; ++n) {
2554 clen [n] = parseInt(cardNumber.charAt(n));
2555 }
2556
2557 for (n = clen.length -2; n >= 0; n -= 2) {
2558
2559 clen [n] *= 2;
2560
2561 if (clen [n] > 9) {
2562 clen [n]-=9;
2563 }
2564 }
2565
2566 for (n = 0; n < clen.length; ++n) {
2567 sum += clen [n];
2568 }
2569
2570 return(((sum % 10) == 0) ? true : false);
2571 }
2572
2573 function SwitchInstallmentInfo(Ischeck) {
2574 if (Ischeck){
2575 document.getElementById('installmentInfo').style.display = "block";
2576 ShowInstallmentInfo();
2577 } else {
2578 document.getElementById('installmentInfo').style.display = "none";
2579 document.frmPayment.INSTALLMENT_CODE.selectedIndex = 0;
2580 var instTr = document.getElementById("instTr");
2581 instTr.style.display = "none";
2582 }
2583 }
2584
2585 //Julius - 21 March 2018
2586 //This method below is to handle installment term information. The affected JSP is txn_info_Responsive.jsp
2587 function ShowInstallmentInfo(el) {
2588 var instTerm = el.options[el.selectedIndex].innerHTML;
2589 if(instTerm.indexOf("(") > -1) {
2590 instTerm = instTerm.match(/(?:\()[^\(\)]*?(?:\))/g);
2591 instTerm = instTerm[instTerm.length-1].replace(/[()]/g,"");
2592 var instDisplay = document.getElementById("instDisplay");
2593 var instTr = document.getElementById("instTr");
2594 instTr.style.display = "table-row";
2595 console.log(instTerm);
2596 instDisplay.innerHTML = instTerm;
2597 } else {
2598 var instTr = document.getElementById("instTr");
2599 instTr.style.display = "none";
2600 }
2601 /*var e = document.getElementById("INSTALLMENT_CODE_OPTION");
2602 var dspText = e.options[e.selectedIndex].text;
2603 var union = document.frmPayment.INSTALLMENT_CODE.value +"_"+ dspText ;
2604 var instTerm;
2605 if (document.getElementById(union) != null) {
2606 instTerm = document.getElementById(union).value;
2607 }else{
2608 instTerm = "";
2609 }
2610 var instDisplay = document.getElementById("instDisplay");
2611 var instTr = document.getElementById("instTr");
2612 //if(dspText == "full payment" || dspText == "--"){
2613 if(instTerm == ""){
2614 instTr.style.display = "none";
2615
2616 }else{
2617 instTr.style.display = "table-row";
2618 }
2619 instDisplay.innerHTML = instTerm + " Month(s)";*/
2620 }
2621
2622 function trimAll(sString) {
2623
2624 while (sString.substring(0,1) == ' ') {
2625 sString = sString.substring(1, sString.length);
2626 }
2627
2628 while (sString.substring(sString.length-1, sString.length) == ' ') {
2629 sString = sString.substring(0,sString.length-1);
2630 }
2631
2632 return sString;
2633 }
2634
2635 function getParameter (queryString, parameterName)
2636 {
2637
2638 // Add "=" to the parameter name (i.e. parameterName=value)
2639 parameterName = parameterName + "=";
2640
2641 if (queryString.length > 0) {
2642
2643 // Find the beginning of the string
2644 begin = queryString.indexOf (parameterName);
2645
2646 // If the parameter name is not found, skip it, otherwise return the value
2647 if (begin != -1) {
2648
2649 // Add the length (integer) to the beginning
2650 begin += parameterName.length;
2651
2652 // Multiple parameters are separated by the "&" sign
2653 end = queryString.indexOf ( "&" , begin );
2654
2655 if (end == -1) {
2656 end = queryString.length;
2657 }
2658
2659 // Return the string
2660 return unescape(queryString.substring(begin, end));
2661 }
2662
2663 // Return "null" if no parameter has been found
2664 return "null";
2665 }
2666 }
2667
2668 var cCount = 0;
2669 function process_payment_validity(frm)
2670 {
2671 //Call to dummy before start - Required for IE6 sp2 else it will not work properly
2672 dummy();
2673 disableSubmitButton(true);
2674 var SuccessResponse = function(o) {
2675 cCount = 0;
2676 var status = getParameter(o.responseText,"status");
2677 var err_desc = getParameter(o.responseText,"error_desc");
2678 var validate_phone_result = getParameter(o.responseText,"validate_phone_result");
2679
2680 if (status == 'Yes')
2681 {
2682 var confirmSubmit;
2683 //Julius - 20 march 2018. Since INSTALLMENT_CODE_OPTION is disabled then can not send the INSTALLMENT_CODE parameter.
2684 //So we need to enabled this field to able send the INSTALLMENT_CODE parameter
2685 var myInput = document.getElementById('INSTALLMENT_CODE_OPTION');
2686 if(myInput != null)
2687 myInput.disabled = false;
2688
2689 if (document.frmPayment.PAYMENT_METHOD.value == 8)
2690 { confirmSubmit = 'Your payment information will be submitted for processing now, a pop up window will appear. Please ensure all browser pop up blocker is disabled. You will be required to login to your CIMB Clicks account in the pop up window to confirm your payment details. Please do not Press F5 or click on your browser \'Refresh / Stop / Close\' button on the existing page or during the entire payment process to avoid duplicate payment / errors.'; }
2691 else if (document.frmPayment.PAYMENT_METHOD.value == 2)
2692 { confirmSubmit = 'Your payment information will be submitted for processing. A pop-up window will appear after clicking the "OK" button. For this reason, make sure that your browser\'s pop-up blocker is disabled. In the pop-up window, please login to your M2U account and confirm your payment details.\n\nPlease do not press F5 or click \'Refresh / Stop / Close\' button on your browser during the entire process to avoid duplicate transactions.'; }
2693 else
2694 { confirmSubmit = 'Your payment information will be submitted for processing now, your browser will be redirect to the bank URL. \nPlease do not Press F5 or click on your browser Refresh / Stop / Close button during this process to avoid duplicate payment / errors.\n\n Jangan tekan F5 atau klik butang \'Refresh / Stop / Close\' ketika proses ini bagi mengelak dari pembayaran dua kali / kesilapan.\n\nPlease click OK to continue.'; }
2695
2696 //King - 20110526 : Skip confirmation is confirmSubmit is empty
2697 if(confirmSubmit == ''){
2698 document.frmPayment.isSubmitBtnClicked.value = 1; //indicated submit button is clicked with all validation passed through
2699
2700 /* [20160803] modified by marrup */
2701 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
2702 var cardTypeRadios = document.getElementsByName('CARDTYPE');
2703 for (var i = 0; i < cardTypeRadios.length; i++) {
2704 cardTypeRadios[i].disabled = false;
2705 }
2706 } else {
2707 document.frmPayment.CARDTYPE.disabled = false;
2708 }
2709
2710 document.frmPayment.CARDNAME.disabled = false;
2711 document.frmPayment.CARDNO.disabled = false;
2712 document.frmPayment.EXPIRYMONTH.disabled = false;
2713 document.frmPayment.EXPIRYYEAR.disabled = false;
2714 document.frmPayment.CARD_ISSUER_BANK_COUNTRY_CODE.disabled = false;
2715 clearInterval(myVar);
2716 document.frmPayment.submit();
2717 }
2718 else{
2719 if (confirm(confirmSubmit))
2720 {
2721 document.frmPayment.isSubmitBtnClicked.value = 1; //indicated submit button is clicked with all validation passed through
2722
2723 /* [20160803] modified by marrup */
2724 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
2725 var cardTypeRadios = document.getElementsByName('CARDTYPE');
2726 for (var i = 0; i < cardTypeRadios.length; i++) {
2727 cardTypeRadios[i].disabled = false;
2728 }
2729 } else {
2730 document.frmPayment.CARDTYPE.disabled = false;
2731 }
2732
2733 document.frmPayment.CARDNAME.disabled = false;
2734 document.frmPayment.CARDNO.disabled = false;
2735 document.frmPayment.EXPIRYMONTH.disabled = false;
2736 document.frmPayment.EXPIRYYEAR.disabled = false;
2737 document.frmPayment.CARD_ISSUER_BANK_COUNTRY_CODE.disabled = false;
2738 clearInterval(myVar);
2739 document.frmPayment.submit();
2740 //document.frmPayment.btnCancel.disabled = true //added by seong 20100920
2741 //document.frmPayment.btnSubmit.disabled = true
2742 }
2743 else
2744 {
2745 disableSubmitButton(false);
2746 }
2747 }
2748 }
2749 else
2750 {
2751 disableSubmitButton(false);
2752 if (validate_phone_result != '0')
2753 {
2754 switch (validate_phone_result)
2755 {
2756 case '1':
2757 alert('Unable to validate your phone number. \nPlease try again later.');
2758 break;
2759 case '2':
2760 alert('Unable to validate your phone number. \nPlease try again later.');
2761 break;
2762 case '3':
2763 alert('Country dialing code does not match with selected country of billing address. Please re-enter phone number.');
2764 break;
2765 }
2766 }
2767 else
2768 {
2769 if (err_desc == '')
2770 { alert('Transaction is not able to proceed with current credit card. Please use another credit card.'); }
2771 else
2772 {
2773 alert(err_desc); //how to make this message cater for multiple language?
2774 }
2775 }
2776 }
2777 }
2778
2779 var FailureResponse = function(o) {
2780 //Retry on first fail response
2781 if(cCount == 0){
2782 cCount = 1;
2783 setTimeout('process_payment_validity(document.frmPayment)',5000);
2784 }
2785 else{
2786 cCount = 0;
2787 disableSubmitButton(false);
2788 alert('Unable to validate your credit card number. \nPlease try again later or use another credit card.');
2789 }
2790 //alert('Unable to validate your credit card number. \nPlease try again later or use another credit card.');
2791 //uncomment below for debug purpose if ajax is not working
2792 //alert("status code: " + o.status + ",statusText: " + o.statusText);
2793 //alert("responseText: " + o.responseText );
2794 //alert("responseXML: " + o.responseXML );
2795 }
2796
2797 var callback = {
2798 success: SuccessResponse,
2799 failure: FailureResponse,
2800 timeout: 60000
2801 };
2802
2803 var PAYMENT_METHOD = frm.PAYMENT_METHOD.value;
2804 var MERCHANTID = frm.MERCHANTID.value;
2805 var CURRENCYCODE = frm.CURRENCYCODE.value;
2806 var INSTALLMENT_CODE = '';
2807 var PYMT_IND = '';
2808 var CURRENCYCODE = frm.CURRENCYCODE.value;
2809 var CARDNO = frm.CARDNO.value;
2810
2811 /* [20160803] modified by marrup */
2812 var CARDTYPE = '';
2813 if (typeof isOsesResponsiveV2 === 'boolean' && isOsesResponsiveV2 == true) {
2814 var cardTypeRadios = document.getElementsByName('CARDTYPE');
2815 for (var i = 0; i < cardTypeRadios.length; i++) {
2816 if (cardTypeRadios[i].type.toLowerCase() === 'radio' && cardTypeRadios[i].checked) {
2817 CARDTYPE = cardTypeRadios[i].value;
2818 }
2819 }
2820 } else {
2821 CARDTYPE = frm.CARDTYPE.value;
2822 }
2823
2824 var PYMT_CRITERIA = '';
2825 var THIRD_PARTY_FLAG = 'No';
2826 var CARD_PHONE = '';
2827 var CARD_BILL_ADDR_COUNTRY_CODE = '';
2828
2829 if (frm.INSTALLMENT_CODE != null) {
2830 INSTALLMENT_CODE = frm.INSTALLMENT_CODE.value;
2831 }
2832
2833 if (frm.PYMT_IND != null) {
2834 PYMT_IND = frm.PYMT_IND.value;
2835 }
2836
2837 if (frm.PYMT_CRITERIA != null) {
2838 PYMT_CRITERIA = frm.PYMT_CRITERIA.value;
2839 }
2840
2841 if (THIRD_PARTY_FLAG.toUpperCase() == "YES") {
2842
2843 if (frm.CARD_PHONE != null) {
2844 CARD_PHONE = frm.CARD_PHONE.value;
2845 }
2846
2847 if (frm.CARD_BILL_ADDR_COUNTRY_CODE != null) {
2848 CARD_BILL_ADDR_COUNTRY_CODE = frm.CARD_BILL_ADDR_COUNTRY_CODE.value;
2849 }
2850 }
2851
2852 var postData = "PAYMENT_METHOD=" + PAYMENT_METHOD;
2853
2854 postData += "&MERCHANTID=" + MERCHANTID;
2855 postData += "&CURRENCYCODE=" + CURRENCYCODE;
2856 postData += "&INSTALLMENT_CODE=" + INSTALLMENT_CODE;
2857 postData += "&CARDNO=" + CARDNO;
2858 postData += "&CARDTYPE=" + CARDTYPE;
2859 postData += "&PYMT_CRITERIA=" + PYMT_CRITERIA;
2860 postData += "&PYMT_IND=" + PYMT_IND;
2861 postData += "&THIRD_PARTY_FLAG=" + THIRD_PARTY_FLAG;
2862 postData += "&CARD_PHONE=" + CARD_PHONE;
2863 postData += "&CARD_BILL_ADDR_COUNTRY_CODE=" + CARD_BILL_ADDR_COUNTRY_CODE;
2864
2865 var sUrl = "/ctPaymentValidity.jsp";
2866 //var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
2867 var request = doAjax(sUrl,postData,SuccessResponse,FailureResponse,60000);
2868 }
2869
2870 function dummy(){
2871 var callback = {
2872 success: function(o){},
2873 failure: function(o){},
2874 timeout: 1000
2875 };
2876 var postData = "";
2877 var sUrl = "/ctPaymentValidity.jsp";
2878 //var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
2879 var request = doAjax(sUrl,postData,"","",1000);
2880 }
2881
2882 function disableSubmitButton(isDisable){
2883 if(isDisable){
2884 document.frmPayment.btnCancel.disabled = true;
2885 document.frmPayment.btnSubmit.disabled = true;
2886 document.frmPayment.btnReset.disabled = true;
2887 }
2888 else{
2889 document.frmPayment.btnCancel.disabled = false;
2890 document.frmPayment.btnSubmit.disabled = false;
2891 document.frmPayment.btnReset.disabled = false;
2892 }
2893
2894 }
2895
2896 function SwitchCardTypeV2(cvc){
2897 if(document.frmPayment.CARDNO.disabled == false){
2898 if(cvc == 'M' && 'Yes' == 'Yes'){
2899 enableCVCV2();
2900 }else if(cvc == 'V' && 'Yes' == 'Yes'){
2901 enableCVCV2();
2902 }else if(cvc == 'J' && 'Yes' == 'Yes'){
2903 enableCVCV2();
2904 }else if(cvc == 'A' && 'Yes' == 'Yes'){
2905 enableCVCV2();
2906 }else{
2907 disableCVCV2();
2908 }
2909 }
2910 }
2911
2912 function enableCVCV2(){
2913 document.getElementById('card_cvc').style.display = 'block';
2914 document.getElementById('card_cvc').className = 'col-lg-3 margintop';
2915 hide_cvc = "No";
2916 }
2917 function disableCVCV2(){
2918 document.getElementById('card_cvc').style.display = 'none';
2919 document.getElementById('card_cvc').className = '';
2920 hide_cvc = "Yes";
2921 }
2922
2923 function SwitchCardType() {
2924 //2016/9/22 added by lys
2925 if(document.frmPayment.CARDNO.disabled == false){
2926 var cvc = document.getElementById('CARDTYPE').value;
2927 if(cvc == 'M' && 'Yes' == 'Yes'){
2928 enableCVC();
2929 }else if(cvc == 'V' && 'Yes' == 'Yes'){
2930 enableCVC();
2931 }else if(cvc == 'J' && 'Yes' == 'Yes'){
2932 enableCVC();
2933 }else if(cvc == 'A' && 'Yes' == 'Yes'){
2934 enableCVC();
2935 }else{
2936 disableCVC();
2937 }
2938 }
2939
2940
2941 }
2942 function enableCVC(){
2943 document.getElementById('card_cvc').style.display = '';
2944 hide_cvc = "No"
2945 }
2946 function disableCVC(){
2947 document.getElementById('card_cvc').style.display = 'none';
2948 hide_cvc = "Yes";
2949 }
2950
2951 //20170508 editid by Osama
2952 function SwitchView(select_option) {
2953 document.getElementById('btnReset').style.display = 'none';
2954 document.getElementById('moreInfoRows').style.display = 'none';
2955 //document.getElementById('debit_card_message').style.display = 'block';
2956
2957 if (select_option == '1') {
2958 document.getElementById('btnReset').style.display = 'inline';
2959 document.getElementById('CreditCard').style.display = 'block';
2960 document.getElementById('moreInfoRows').style.display = 'block';
2961 //document.getElementById('debit_card_message').style.display = 'none';
2962 document.getElementById('FPX_B2B').style.display = 'none';
2963 document.getElementById('FPX_B2C').style.display = 'none';
2964
2965
2966
2967
2968
2969
2970
2971
2972 document.getElementById('installmentSection').style.display = 'none';
2973
2974
2975
2976 // 3rd party booking details
2977
2978
2979
2980 document.getElementById('3rdPartyBookingInfo').style.display = 'none';
2981
2982
2983
2984 //additional information bill payment as requested by OSES
2985
2986
2987
2988
2989 document.getElementById('oses_billpaymentinfo').style.display = 'none';
2990
2991
2992
2993 } else if(select_option == '3'){
2994 document.getElementById('FPX_B2B').style.display = 'none';
2995 document.getElementById('FPX_B2C').style.display = 'block';
2996 document.getElementById('CreditCard').style.display = 'none';
2997 document.getElementById('moreInfoRows').style.display = 'block';
2998 }else if(select_option == '16'){
2999 document.getElementById('FPX_B2B').style.display = 'block';
3000 document.getElementById('FPX_B2C').style.display = 'none';
3001 document.getElementById('CreditCard').style.display = 'none';
3002 document.getElementById('moreInfoRows').style.display = 'block';
3003 }else{
3004 document.getElementById('FPX_B2B').style.display = 'none';
3005 document.getElementById('FPX_B2C').style.display = 'none';
3006 document.getElementById('CreditCard').style.display = 'none';
3007
3008
3009
3010
3011
3012
3013
3014
3015 document.getElementById('oses_billpaymentinfo').style.display = 'none';
3016
3017
3018 }
3019 document.frmPayment.FPX_B2B_BANK_CODE.selectedIndex = 0;
3020 document.frmPayment.FPX_B2C_BANK_CODE.selectedIndex = 0;
3021 document.frmPayment.PAYMENT_METHOD.value=document.frmPayment.pay_method.options[document.frmPayment.pay_method.selectedIndex].value;
3022 }
3023
3024 function submitForm(){
3025 setTimeout('document.frmPayment.submit()',1000);
3026 }
3027
3028 function checkIsCardExpired(selectedYear, selectedMonth) {
3029
3030 var currDate = new Date();
3031 var currYr = currDate.getFullYear();
3032 var currMon = currDate.getMonth();
3033
3034 if (selectedYear != "" && selectedMonth != "") {
3035
3036 if (selectedYear < currYr) {
3037 return true;
3038 } else {
3039 if (selectedYear == currYr) {
3040
3041 if (selectedMonth < (currMon + 1)) {
3042 return true;
3043 }
3044 }
3045 }
3046 }
3047
3048 return false;
3049 }
3050
3051 function isValidInteger(InStr) {
3052
3053 var elmstr = InStr;
3054
3055 if (elmstr == "") {
3056 return false;
3057 }
3058
3059 for (var i = 0; i < elmstr.length; i++) {
3060
3061 if (elmstr.charAt(i) < "0" ||
3062 elmstr.charAt(i) > "9") {
3063
3064 return false;
3065 }
3066 }
3067
3068 return true;
3069 }
3070
3071 function isValidPhoneNo(InStr) {
3072
3073 var elmstr = InStr;
3074
3075 for (var i = 0; i < elmstr.length; i++) {
3076
3077 if (elmstr.charAt(i) < "0" || elmstr.charAt(i) > "9") {
3078 return false;
3079 }
3080 }
3081
3082 return true;
3083 }
3084
3085 function combineCardPhoneNo(form)
3086 {
3087 var field1 = trimAll(form.CARD_PHONE_FIELD1.value);;
3088 var field2 = trimAll(form.CARD_PHONE_FIELD2.value);
3089 var field3 = trimAll(form.CARD_PHONE_FIELD3.value);
3090
3091 while (field2.substring(0,1) == "0") {
3092 field2 = field2.substring(1, field2.length);
3093 }
3094
3095 if (field1 == "") {
3096
3097 if (field2 == "") {
3098 form.CARD_PHONE.value = "+" + field3;
3099 } else {
3100 form.CARD_PHONE.value = "+" + field2 + "-" + field3;
3101 }
3102 } else {
3103 if (field2 == "") {
3104 form.CARD_PHONE.value = "+" + field1 + "-" + field3;
3105 } else {
3106 form.CARD_PHONE.value = "+" + field1 + "-" + field2 + "-" + field3;
3107 }
3108 }
3109 }
3110
3111 function isValidEmail(InStr) {
3112
3113 var at = InStr.indexOf("@") + 1;
3114
3115 if (at <= 1) { // must have the symbol "@", and must have email name infront
3116 return false;
3117 }
3118
3119 if (at == InStr.length) { // must have domain name
3120 return false;
3121 }
3122
3123 if (InStr.indexOf("@", at) != -1) { // the "@" symbol cannot exist more than 1 time
3124 return false;
3125 }
3126
3127 // check whether "." after "@"
3128 // ---------------------------
3129 at2 = InStr.indexOf(".", at) + 1;
3130
3131 if (at2 <= 1) {
3132 return false;
3133 }
3134
3135 if (at2 == at + 1) { // cannot be immediately after "@", must have other chars in between
3136 return false;
3137 }
3138
3139 if (at2 == InStr.length) { // cannot be at last position
3140 return false;
3141 }
3142
3143 while ((InStr.indexOf(".", at2) != -1)) { // if have more than 1 "."
3144
3145 if (InStr.indexOf(".", at2) + 1 == at2 + 1) { // cannot be "..", must have other chars between 2 "." symbols
3146 return false;
3147 }
3148
3149 if (InStr.indexOf(".", at2) + 1 == InStr.length) {
3150 return false;
3151 }
3152
3153 at2 = InStr.indexOf(".", at2) + 1;
3154 }
3155
3156 return true;
3157 }
3158
3159 //below must initialized at last
3160 //initYear(document.frmPayment.EXPIRYYEAR);
3161 loadDisplayStyle();
3162 SwitchCardType();
3163
3164
3165 -->
3166</script>
3167<!-- added by linda 24/4/2014-->
3168<script type="text/javascript" src="js/jquery.min.js"></script>
3169
3170 <script type="text/javascript">
3171 if (self === top) {
3172 var antiClickjack = document.getElementById("antiClickjack");
3173 antiClickjack.parentNode.removeChild(antiClickjack);
3174 } else {
3175 top.location = self.location;
3176 }
3177 </script>
3178
3179
3180
3181 </div>
3182
3183 </div>
3184 <div class="container purchase-form" role="contentinfo"></div>
3185
3186 </div>
3187 </div>
3188 <div class="main" role="main">
3189 <div class="inner">
3190
3191 <div class="container intro"><img src="template/tnbResponsive/images/vlogo.png" border="0"></div>
3192
3193 </div>
3194 </div>
3195
3196
3197
3198
3199
3200
3201
3202</body></html>