Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sv_a = DALREP.SCRIPT_DATA.CPAY_CONSUMER_CD
- print sv_a
- sv_b = STRLEN(sv_a)
- if( sv_b != 16) then
- DALREP.SCRIPT_DATA.VALID="N"
- EXITSCRIPT
- endif
- sv_c = LEFT$(sv_a, 6)
- if ( sv_c != "456523" ) then
- if ( sv_c != "456524" ) then
- if ( sv_c != "434143" ) then
- if ( sv_c != "542536" ) then
- if ( sv_c != "547111" ) then
- if ( sv_c != "441195" ) then
- if ( sv_c != "441196" ) then
- if ( sv_c != "601587" ) then
- if ( sv_c != "517736" ) then
- if ( sv_c != "409770" ) then
- if ( sv_c != "432234" ) then
- if ( sv_c != "432235" ) then
- if ( sv_c != "432236" ) then
- if ( sv_c != "424160" ) then
- if ( sv_c != "433956" ) then
- DALREP.SCRIPT_DATA.VALID="N"
- EXITSCRIPT
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- sv_f = 0
- while( sv_f < sv_b )
- sv_e = CHARAT(sv_a, sv_f)
- if ( sv_e != '1' ) then
- if ( sv_e != '2' ) then
- if ( sv_e != '3' ) then
- if ( sv_e != '4' ) then
- if ( sv_e != '5' ) then
- if ( sv_e != '6' ) then
- if ( sv_e != '7' ) then
- if ( sv_e != '8' ) then
- if ( sv_e != '9' ) then
- if ( sv_e != '0' ) then
- DALREP.SCRIPT_DATA.VALID="N"
- EXITSCRIPT
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- endif
- sv_f = sv_f + 1
- do
- sv_d = sv_b
- sv_f = 0
- sv_h = 0
- while( sv_d > 0 )
- sv_e = LEFT$(sv_a, sv_d)
- sv_g = RIGHT$(sv_e, 1)
- sv_g = CINT(sv_g)
- if ( sv_f != 0 ) then
- sv_g = sv_g + sv_g
- if ( sv_g > 9 ) then
- sv_g = sv_g - 9
- endif
- sv_f = 0
- else
- sv_f = 1
- endif
- sv_h = sv_h + sv_g
- if ( sv_h > 9 ) then
- sv_h = sv_h - 10
- endif
- sv_d = sv_d - 1
- do
- if ( sv_h != 0 ) then
- print "invalid card"
- DALREP.SCRIPT_DATA.VALID="N"
- EXITSCRIPT
- else
- print "valid card"
- endif
- EXITSCRIPT
Add Comment
Please, Sign In to add comment