-
Oct 23rd, 2012, 09:58 AM
#1
Thread Starter
New Member
VB6 - Credit Card Processing Using VBSCRIPT
I have been supporting a VB6 application for some time now. I've recently been asked about incorporating credit card processing into the app. The credit card merchant has sent me what they call their COM API that contains VBScript. How do I go about setting this up (Using the VBScript) in my application.
Thanks,
Alex
-
Oct 23rd, 2012, 11:05 AM
#2
Re: VB6 - Credit Card Processing Using VBSCRIPT
Do you have documentation and/or samples for the API. Would be hard for anyone to assist without more info. I doubt that you need to use VBScript though.
-
Oct 23rd, 2012, 11:24 AM
#3
Thread Starter
New Member
Re: VB6 - Credit Card Processing Using VBSCRIPT
<% @Language = "VBScript" %>
<% Response.buffer = true %>
<%
store_id = "monusqa002"
api_token = "qatoken"
order_id = "purch-"&Day(Date)&Month(Date)&Year(Date)&"-"&Hour(Now)&Minute(Now)&Second(Now)
amount="5.00"
pan="5454545454545454"
exp_date = "1111"
cust_id = "cust_id"
crypt_type="7"
dynamic_descriptor = "12345"
Set out = server.CreateObject("Moneris.USRequest")
out.initRequest store_id, api_token, "https://esplusqa.moneris.com/gateway_us/servlet/MpgRequest"
Set request1 = server.CreateObject("Moneris.USPurchase")
request1.setCustId cust_id
request1.setDynamicDescriptor dynamic_descriptor
out.setRequest request1.formatRequest(order_id, amount, pan, exp_date, crypt_type)
out.sendRequest
%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
</HEAD>
<BODY bgcolor=white>
<%
Response.Write "Receipt ID: " & out.getReceiptID & "<br>"
Response.Write "Response Code: " & out.getResponseCode & "<br>"
Response.Write "Transaction Type: " & out.getTransType & "<br>"
Response.Write "Message: " & out.getMessage & "<br>"
Response.Write "Amount: " & out.getTransAmount & "<br>"
Response.Write "Bank Totals: " & out.getBankTotals & "<br>"
Response.Write "Card Type: " & out.getCardType & "<br>"
Response.Write "Reference Number: " & out.getReferenceNum & "<br>"
Response.Write "Transaction ID: " & out.getTransID & "<br>"
Response.Write "ISO: " & out.getISO & "<br>"
Response.Write "Auth Code: " & out.getAuthCode & "<br>"
Response.Write "Transaction Time: " & out.getTransTime & "<br>"
Response.Write "Transaction Date: " & out.getTransDate & "<br>"
Response.Write "Complete: " & out.getCompleteStatus & "<br>"
Response.Write "Timeout: " & out.getTimedoutStatus & "<br>"
Response.Write "Ticket: " & out.getTicket & "<br>"
Response.Write "CardLevelResult: " & out.getCardLevelResult & "<br>"
%>
</BODY>
</HTML>
-
Oct 23rd, 2012, 12:03 PM
#4
Re: VB6 - Credit Card Processing Using VBSCRIPT
And what is all of that supposed to be? Please don't just dump a bunch of code in a post and expect us to figure out what it is supposed to do. What you have shown is code for a web page and no info about the API nor your app nor what problems you are having, what you have tried, if you have any documentation nor anything else. Can't help if you don't provide enough info. Blobs of code without formatting or comments don't help much either.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|