Credit Card Processing Gateway - how to use

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Credit Card Processing Gateway - how to use

Post by Mike718NY » Mon Aug 11, 2008 7:50 am

I'm using a credit card processing Gateway called "Federated Payment Systems".

Is it possible to use this Gateway with AC7?

This is the only code example (in ASP) they have:

' Returns True on Success, False on Failure
Function GatewaySale(amount, ccnumber, ccexp, cvv, name, address, zip)
Set OGateway = Server.CreateObject("MSXML2.ServerXMLHTTP")
OGateway.Open "POST", "https://secure.federatedgateway.com/api/transact.php", false
OGateway.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
DataToSend = "username=" & Server.URLEncode(GatewayUsername) &_
"&password=" & Server.URLEncode(GatewayPassword) &_
"&ccnumber=" & Server.URLEncode(ccnumber) &_
"&ccexp=" & Server.URLEncode(ccexp) &_
"&cvv=" & Server.URLEncode(cvv) &_
.....
OGateway.Send DataToSend
ResponseString = OGateway.responseText
Results = Split(ResponseString, "&")
GatewaySale = False
For Each i in Results
Result = Split(i,"=")
If UBound(Result)>0 Then
If LCase(Result(0))="response" Then
If Result(1) = "1" Then
GatewaySale = True
End If
End If
End If
Next
End Function

Results = GatewaySale("10.00","4111111111111111","0109","","John Smith","123 Main St", "60123")
Response.Write("This should be true: " & Results & "<BR>")

Results = GatewaySale("10.00","4111111111111111","0101","","John Smith","123 Main St", "60123")
Response.Write("This should be false: " & Results & "<BR>")

Post Reply