If middle - start - 1 = 16 Then '15 is valide Amex card.. so check that out and add it if I accept amex
CCnumber = .FindElement(2, ";", 0, "=") ' Mid(.GetTrack(2), 2, middle - 2)
ExpMonth = Mid(.GetTrack(2), middle + 3, 2) 'then the exp month after that
ExpYear = Mid(.GetTrack(2), middle + 1, 2) 'for some reason the Year comes first
Is the location of the first/last name (track 1)
and credit card number and expdate/year (track 2)
on the same place on both visa and mastercard?
Here is my code.. and for some reason it isn't working right (?) with mastercards:
(vb6):
start = InStr(1, .GetTrack(2), ";")
middle = InStr(1, .GetTrack(2), "=")
If middle - start - 1 = 16 Then '15 is valide Amex card.. so check that out and add it if I accept amex
CCnumber = .FindElement(2, ";", 0, "=") ' Mid(.GetTrack(2), 2, middle - 2)
ExpMonth = Mid(.GetTrack(2), middle + 3, 2) 'then the exp month after that
ExpYear = Mid(.GetTrack(2), middle + 1, 2) 'for some reason the Year comes first
CCLastName = .GetLName 'added 5/18
CCFirstName = .GetFName 'added 5/18
USBHIDInsert1.ClearBuffer
'/---try to validate cc info
CreditCardAuthRetry = 0
EnableCCreader = False
ProcessCreditCard.Enabled = True
Else
CCnumber = Mid(.GetTrack(2), 2, middle - 2)
Question = "If your card is a valid Mastercard or Visa, please reswipe."
End If
I understand this might be a little OT.. but if i remember right, SS was org vb :)
thanks!
Lee