Guest User

Untitled

a guest
Jul 21st, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. sv_a = DALREP.SCRIPT_DATA.CPAY_CONSUMER_CD
  2. print sv_a
  3. sv_b = STRLEN(sv_a)
  4.  
  5. if( sv_b != 16) then
  6. DALREP.SCRIPT_DATA.VALID="N"
  7. EXITSCRIPT
  8. endif
  9. sv_c = LEFT$(sv_a, 6)
  10. if ( sv_c != "456523" ) then
  11. if ( sv_c != "456524" ) then
  12. if ( sv_c != "434143" ) then
  13. if ( sv_c != "542536" ) then
  14. if ( sv_c != "547111" ) then
  15. if ( sv_c != "441195" ) then
  16. if ( sv_c != "441196" ) then
  17. if ( sv_c != "601587" ) then
  18. if ( sv_c != "517736" ) then
  19. if ( sv_c != "409770" ) then
  20. if ( sv_c != "432234" ) then
  21. if ( sv_c != "432235" ) then
  22. if ( sv_c != "432236" ) then
  23. if ( sv_c != "424160" ) then
  24. if ( sv_c != "433956" ) then
  25. DALREP.SCRIPT_DATA.VALID="N"
  26. EXITSCRIPT
  27. endif
  28. endif
  29. endif
  30. endif
  31. endif
  32. endif
  33. endif
  34. endif
  35. endif
  36. endif
  37. endif
  38. endif
  39. endif
  40. endif
  41. endif
  42.  
  43. sv_f = 0
  44. while( sv_f < sv_b )
  45. sv_e = CHARAT(sv_a, sv_f)
  46. if ( sv_e != '1' ) then
  47. if ( sv_e != '2' ) then
  48. if ( sv_e != '3' ) then
  49. if ( sv_e != '4' ) then
  50. if ( sv_e != '5' ) then
  51. if ( sv_e != '6' ) then
  52. if ( sv_e != '7' ) then
  53. if ( sv_e != '8' ) then
  54. if ( sv_e != '9' ) then
  55. if ( sv_e != '0' ) then
  56. DALREP.SCRIPT_DATA.VALID="N"
  57. EXITSCRIPT
  58. endif
  59. endif
  60. endif
  61. endif
  62. endif
  63. endif
  64. endif
  65. endif
  66. endif
  67. endif
  68. sv_f = sv_f + 1
  69. do
  70.  
  71. sv_d = sv_b
  72. sv_f = 0
  73. sv_h = 0
  74. while( sv_d > 0 )
  75. sv_e = LEFT$(sv_a, sv_d)
  76. sv_g = RIGHT$(sv_e, 1)
  77. sv_g = CINT(sv_g)
  78. if ( sv_f != 0 ) then
  79. sv_g = sv_g + sv_g
  80. if ( sv_g > 9 ) then
  81. sv_g = sv_g - 9
  82. endif
  83. sv_f = 0
  84. else
  85. sv_f = 1
  86. endif
  87. sv_h = sv_h + sv_g
  88. if ( sv_h > 9 ) then
  89. sv_h = sv_h - 10
  90. endif
  91. sv_d = sv_d - 1
  92. do
  93. if ( sv_h != 0 ) then
  94. print "invalid card"
  95. DALREP.SCRIPT_DATA.VALID="N"
  96. EXITSCRIPT
  97. else
  98. print "valid card"
  99. endif
  100. EXITSCRIPT
Add Comment
Please, Sign In to add comment