VB6 Code to VBA

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

This is a piece of VB6 code that I have for Credit Card processing. What
does this mean in Access VBA? Is there an equivalent? What is WinHttp?

Dim WinHttpReq As WinHttp.WinHttpRequest

Here is more code further down the ladder, maybe there is a clue here?

Private Function Process()
Dim i As Integer

WinHttpReq.Open "POST", "https://payjunction.com/quick_link", False

WinHttpReq.SetRequestHeader "Content-Type",
"application/x-www-form-urlencoded"

WinHttpReq.Send postVars

Dim results() As String
results = Split(WinHttpReq.ResponseText, Chr(28))

lstResults.Clear

' create a new collection
Set cResults = New Collection

' parse the result string to get the key/data pairs
For i = 0 To UBound(results)
Dim tmp() As String
tmp = Split(results(i), "=")

If tmp(1) <> "" Then
lstResults.AddItem results(i)

cResults.Add tmp(1), tmp(0)
End If
Next i
End Function

Thanks
DS
 
I got the code to work. I'll just clean it up and post it for someone who
wants to use credit cards with Access. This is one way at leat. I know of
a second that I am working on.
DS
 
Back
Top