credit card
-
- Infinite Haze
- Posts: 334
- Joined: 11 Jun 2005, 16:00
- 18
- Location: abroad
- Contact:
credit card
..
Last edited by mystikblaze on 21 Jun 2009, 08:32, edited 1 time in total.
Any fool can count the seeds in an apple. Only God can count all the apples in one seed. ~Robert H. Schuller
God is the greatest.
God is the greatest.
-
- Infinite Haze
- Posts: 334
- Joined: 11 Jun 2005, 16:00
- 18
- Location: abroad
- Contact:
..
Last edited by mystikblaze on 21 Jun 2009, 08:32, edited 1 time in total.
Any fool can count the seeds in an apple. Only God can count all the apples in one seed. ~Robert H. Schuller
God is the greatest.
God is the greatest.
I don't think you can code a webpage to verify a CC, verify it has money, and debit the account for $x. If you did, having the code exposed on the webpage might get you robbed. Most CC processing is handled by a server that has script to do all this for you, and still hide it from prying eyes. Some webhost that you can sign up for, will offer this service - and thats what I recommend. That host likely is approved by AMX, MC, and Visa -as they have rules for companies that need to access their DB.
DNR
DNR
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.
- floodhound2
- ∑lectronic counselor
- Posts: 2117
- Joined: 03 Sep 2006, 16:00
- 17
- Location: 127.0.0.1
- Contact:
- Ghostface_Killah
- forum buddy
- Posts: 22
- Joined: 10 May 2009, 16:00
- 14
- Location: my sand box
- Contact:
Depends, does your site actually have something to offer for the money?
..if so you can set up a subscription service with paypal which i would recommend, so the money goes out of their account to yours every month with a subscription fee. Like how porn sites charge people, web hosting, or other online services.
No program needed for it.. you just need something people want, that you can charge them monthly for via paypal.
If your going the other route then they will most likely notice unless they never check their bank account statements and are rich and dont care
..if so you can set up a subscription service with paypal which i would recommend, so the money goes out of their account to yours every month with a subscription fee. Like how porn sites charge people, web hosting, or other online services.
No program needed for it.. you just need something people want, that you can charge them monthly for via paypal.
If your going the other route then they will most likely notice unless they never check their bank account statements and are rich and dont care
-
- Infinite Haze
- Posts: 334
- Joined: 11 Jun 2005, 16:00
- 18
- Location: abroad
- Contact:
..
Last edited by mystikblaze on 21 Jun 2009, 08:31, edited 2 times in total.
Any fool can count the seeds in an apple. Only God can count all the apples in one seed. ~Robert H. Schuller
God is the greatest.
God is the greatest.
-
- Infinite Haze
- Posts: 334
- Joined: 11 Jun 2005, 16:00
- 18
- Location: abroad
- Contact:
..
Last edited by mystikblaze on 21 Jun 2009, 08:35, edited 1 time in total.
Any fool can count the seeds in an apple. Only God can count all the apples in one seed. ~Robert H. Schuller
God is the greatest.
God is the greatest.
- floodhound2
- ∑lectronic counselor
- Posts: 2117
- Joined: 03 Sep 2006, 16:00
- 17
- Location: 127.0.0.1
- Contact:
some code for VB
frmMain.vb
and clsCrCheck.vb
and AssemblyInfo.vb
This shoul run in VB express. Let me know if you have problems
frmMain.vb
Code: Select all
Option Strict Off
Option Explicit On
Friend Class frmMain
Inherits System.Windows.Forms.Form
Private Sub cmdCheck_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdCheck.Click
Dim blnValid As Boolean
Dim objCrCheck As clsCrCheck
If txtCardNo.Text = "" Then
MsgBox("Please insert Card Number.")
ElseIf txtCardType.Text = "" Then
MsgBox("Please insert Card Type.")
Else
objCrCheck = New clsCrCheck
blnValid = objCrCheck.fnValidateCreditCard(txtCardNo.Text, txtCardType.Text)
If blnValid Then
MsgBox("Valid Credit Card")
Else
MsgBox("Invalid Credit Card")
End If
End If
End Sub
Private Sub txtCardNo_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs) Handles txtCardNo.KeyPress
Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
If KeyAscii <> 8 And KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
End If
eventArgs.KeyChar = Chr(KeyAscii)
If KeyAscii = 0 Then
eventArgs.Handled = True
End If
End Sub
Private Sub txtCardType_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs) Handles txtCardType.KeyPress
Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
If KeyAscii <> 8 And (KeyAscii < 65 Or KeyAscii > 91) And (KeyAscii < 97 Or KeyAscii > 122) Then
KeyAscii = 0
End If
eventArgs.KeyChar = Chr(KeyAscii)
If KeyAscii = 0 Then
eventArgs.Handled = True
End If
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Code: Select all
Option Strict Off
Option Explicit On
Friend Class clsCrCheck
Dim intNumber As Short
Dim strNumberFinal As String
Dim intSum As Short
Dim validLuhn As Boolean
Public Function fnValidateCreditCard(ByVal strCCNumber As String, ByVal strCCType As String) As Boolean
Dim bValid As Boolean
strCCType = Trim(strCCType)
Select Case UCase(strCCType)
Case "VISA"
strCCType = "V"
Case "MASTER"
strCCType = "M"
Case "American"
strCCType = "A"
End Select
If fnPrefixCheck(strCCNumber, strCCType) And fnLengthCheck(strCCNumber, strCCType) And fnLuhnCheck(strCCNumber, strCCType) Then
fnValidateCreditCard = True
Else
fnValidateCreditCard = False
End If
End Function
Private Function fnPrefixCheck(ByRef strCCNumber As String, ByRef strCCType As String) As Boolean
Dim validPrefix As Boolean
Select Case UCase(strCCType)
Case "V"
If InStr(1, strCCNumber, "4") = 1 Then
validPrefix = True
End If
Case "M"
If InStr(1, strCCNumber, "51") = 1 Or InStr(1, strCCNumber, "52") = 1 Or InStr(1, strCCNumber, "53") = 1 Or InStr(1, strCCNumber, "54") = 1 Or InStr(1, strCCNumber, "55") = 1 Then
validPrefix = True
End If
Case "A"
If InStr(1, strCCNumber, "34") = 1 Or InStr(1, strCCNumber, "37") = 1 Then
validPrefix = True
End If
End Select
fnPrefixCheck = validPrefix
End Function
Private Function fnLengthCheck(ByRef strCCNumber As String, ByRef strCCType As String) As Boolean
Dim validLength As Boolean
validLength = False
Select Case UCase(strCCType)
Case "V"
If Len(strCCNumber) = 13 Or Len(strCCNumber) = 16 Then
validLength = True
End If
Case "M"
If Len(strCCNumber) = 16 Then
validLength = True
End If
Case "A"
If Len(strCCNumber) = 15 Then
validLength = True
End If
End Select
fnLengthCheck = validLength
End Function
Private Function fnLuhnCheck(ByRef strCCNumber As String, ByRef strCCType As String) As Boolean
Dim intTemp As Object
Dim strRev As String
Dim strCh As String
Dim intNumber As Short
Dim strNumberFinal As String
Dim intSum As Short
Dim validLuhn As Boolean
strRev = StrReverse(strCCNumber)
For intTemp = 1 To Len(strRev)
strCh = Mid(strRev, intTemp, 1)
intNumber = CShort(strCh)
If intTemp Mod 2 = 0 Then
intNumber = intNumber * 2
If intNumber > 9 Then
intNumber = intNumber - 9
End If
End If
strNumberFinal = strNumberFinal & intNumber
Next intTemp
For intTemp = 1 To Len(strNumberFinal)
intSum = intSum + CDbl(Mid(strNumberFinal, intTemp, 1))
Next intTemp
If intSum Mod 10 = 0 Then
validLuhn = True
Else
validLuhn = False
End If
fnLuhnCheck = validLuhn
End Function
End Class
Code: Select all
Imports System.Reflection
Imports System.Runtime.CompilerServices
Imports System.Runtime.InteropServices
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("Checks only VISA, Master Card & American Express")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Credit Card 1.0.0")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: AssemblyCulture("")>
<Assembly: AssemblyVersion("1.0.*")>