Primus provides a shared COM interface allowing you to include credit card processing in your ASP applications. The latest version has been completely re-written, and includes the ability to supply your customer's Card Verification Value 2 (CVV2) data.
CaledonSSL.dll - Latest version
The new interface has the following properties that are required for all transactions.
Object Methods | ||
SSLConnection | Transmits the financial transaction to the Caledon Card Services transaction processing system. This will be invoked after the properties of the COM object are set with the various parameters of the financial transaction. | |
ResetSSL | This method resets all of the variables used for the transaction. This will be invoked after the transaction has been completed. | |
Object Properties | ||
Terminal_Id | Request | The terminal ID assigned to you by Caledon Card Services, used to ID your transactions. |
Operator_Id | Request | Set this property to the operator ID you want to use. Default value of 001. Auto-settle customers should use the default. Note that at Caledon Card Services we group transactions by a combination of terminal ID and operator ID. |
CC_Number | Request | Credit card number to be authorized. Numeric data only. |
CC_Expiry | Request | Credit card expiry date, must be in MMYY format. |
Amount | Request | The amount of the transaction in cents (100 = $1.00.) |
ReferenceNumber | Request | Alphanumeric field that you assign to track the transaction. It is highly recommended that this field be unique for each transaction. This field can be composed of an invoice number, purchase order number etc. |
Transaction_Type | Request | "V" OR "S". This is the transaction type of the transaction being sent. |
Port | Request | The port to connect to on the server. Unless requested, there is no need to specify this attribute. Defaults to 443. |
Host | Request | The server to connect to. Unless requested, there is no need to specify this attribute. Defaults to a proper Caledon host. |
CVV2 | Request | Any CVV2 information that you want to send with your transaction. |
Transaction_Results | Response | The transaction response returned from Caledon Card Services. This field will be a text representation of the response. The format of the response is as follows: TEXT=000652 $14.95&AUTH=000652&CODE=0000 The format of this response can be split on "&" to obtain various portions of the returned text. |
ErrorNumber | Response | If the transaction was declined this property will contain the error code, otherwise it will be "0000". In the case of a communications error, this field will contain -1. With the exception of the communications error condition, this is the same code that is displayed in the code field of the Transaction_Results property. This field should be interpreted by your application to determine more details about the reason for the failure of the transaction. |
Approved | Response | Will be true if your transaction was successful, or false if your transaction was declined. (Note: True = 1 and False = 0) |
ReturnedAuthNumber | Response | Will hold the authorization number returned from a successful transaction. |
Sample ASP Code:
VbScript starts here, should be used in a subroutine or function. | |
dim CCS | |
set CCS = createobject("CaledonSSL.CALSSL") | |
CCS.Terminal_Id = "TERMID01" Replace with your terminal ID | |
CCS.CC_Number = "5123456789012345" Replace with the card # you want to send | |
CCS.CC_Expiry = "1207" Expiry date(MMYY) of the card | |
CCS.Amount = "100" Dollar amount in cents ie(100 = $1.00) | |
CCS.ReferenceNumber = "2A34B67" Any reference number that you want (7 digit max A/N) | |
CCS.Transaction_Type = "S" S or V, or other codes if your setup allows | |
CCS.SSLConnection Transmits the transaction to the bank (2-4 seconds on average) | |
If CCS.Approved then | |
'Your approved code goes here' | |
else | |
'Your declined code goes here' | |
end if | |
CCS.ResetSSL This method resets all the properties of object | |
VbScript ends here |
descli32.dll (old version)
The old interface has the following properties that are required for all transactions.
Init | Performs certain initialization functions. This should be used only once per instance of the object. |
Clear | Clears all of the properties. |
TermID | The Terminal ID assigned to you by CCS. |
Cardnum | Credit card number to be sent. |
Expiry | Expiry date, must be in MMYY format. |
Amount | Dollar amount in cents (100 = $1.00). |
Refnum | Alphanumeric field that you assign to track the transaction (7 digit max). |
TranType | “sale” or “void” or other codes dependant on your setup. |
OperID | You can set the operator you wish to use. This is not necessary for Webtrans customers or customers with automated operator rotation. |
Device | The value for this property is assigned to you by Caledon. |
Server | The server that the transaction will be sent to. For Non-Webtrans customers this value will be assigned to you by Caledon. Example: CCS.Server = "A" it defaults to our web server if you leave this value empty. |
Authnum | The authorization number from the bank. This number can be recorded for reference purposes. |
Send | This is the method that sends the transaction. |
Approved | True or False. Check this value after control is returned from the Send method. |
Finish | Cleans up for termination. Call this before destroying the object. |
The DLL also has the following properties that may or may not be required for your particular use: | |
Display | Shows the same display as a swipe terminal. This is useful for providing additional information especially for declined transactions. Errors in transmission will also be reported here. |
Possible Errors:
Lantrans refers to our web server or "Webtrans"(error text returned in .display)
Error 7101 | Invalid preferred server specified. |
The value specified in the .server property was not between A and Z. This is a packet syntax error. | |
Error 7102: | Gethostbyname failed |
There is no entry in the HOSTS file for the servers you are trying to reach, or the domain name server does not contain an entry for any of the servers. (If using a DNS) If you get this error, the HOSTS file must be changed on that machine before you can communicate with Lantrans. Do not resend the transaction. | |
Error 7103: | Could not get a socket. |
There are no more sockets available on your local machine. This can be caused by trying to send more simultaneous transactions than your machine has sockets. This condition is probably a configuration or programming problem, so resending the transaction may not help. | |
Error 7104: | No server available. |
No Lantrans server is responding. This could be because the sending machine does not have a route to a Lantrans server, or because there are no Lantrans servers on the network. You should not resend if you receive this error. | |
Error 7105: | Could not set send socket non-blocking |
Mainly for debugging purposes. Should never happen. Attempt resend once if this occurs. |
Sample ASP Code:
Insert the following VbScript into your page and make the appropriate changes required for your particular Terminal ID as well as credit card information.
VbScript starts here, should be used in a subroutine or function. | |
dim CCS | |
set CCS = createobject("desvb32.descli32") | |
CCS.init | |
CCS.clear | |
CCS.termid = "6CALEDON" Replace with your terminal ID | |
CCS.cardnum = "5191111111111111" Replace with the card # you want to send | |
CCS.expiry = "1298" Expiry date(MMYY) of the card | |
CCS.amount = "100" Dollar amount in cents ie(100 = $1.00) | |
CCS.refnum = "2A34B67" Any reference number that you wish (7 digit max A/N) | |
CCS.trantype = "SALE" Sale or Void, or other codes if your setup allows | |
CCS.send Transmits the transaction to the bank (2-4 seconds on average) | |
if CCS.approved = true then | |
‘Show the approved page | |
else | |
‘Show the declined page | |
end if | |
CCS.finish | |
VbScript ends here |