Credit Card Fraud Prevention Using VB.NET


/ Published in: VB.NET
Save to your folder(s)

Checking customer's IP address if is match with billing address is one of the simple steps in order to prevent fraud. If you are looking for sample codes to validate that the transaction is being requested by the real cardholder, see below.


Copy this code and paste it in your HTML
  1. Imports IP2Location
  2. Private Sub Query(ByVal strIPAddress As String, billingCountry As String)
  3. Dim oIPResult As New IP2Location.IPResult
  4. Try
  5. If strIPAddress <> "" Then
  6. IP2Location.Component.IPDatabasePath = "C:\\Program Files\\IP2Location\\Database\\IP-COUNTRY.SAMPLE.BIN"
  7. oIPResult = IP2Location.Component.IPQuery(strIPAddress)
  8. Select Case oIPResult.Status
  9. Case "OK"
  10. If oIPResult.CountryShort = billingCountry Then
  11. ' buyer is from the same country by IP address
  12. Else
  13. ' buyer is from the different country by IP address
  14. End If
  15. Case "EMPTY_IP_ADDRESS"
  16. Response.Write("IP Address cannot be blank.")
  17. Case "INVALID_IP_ADDRESS"
  18. Response.Write("Invalid IP Address.")
  19. Case "MISSING_FILE"
  20. Response.Write("Invalid Database Path.")
  21. End Select
  22. Else
  23. Response.Write("IP Address cannot be blank.")
  24. End If
  25. Catch ex As Exception
  26. Response.Write(ex.Message)
  27. Finally
  28. oIPResult = Nothing
  29. End Try
  30. End Sub

URL: http://www.ip2location.com/tutorials/credit-card-fraud-prevention-using-dot-net-framework-in-c-or-vb-net

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.