Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cybercash DLL

Posted on 2001-08-10
9
Medium Priority
?
562 Views
Last Modified: 2008-02-20
I need to incorporate Cybercash DLL in my Web application to use their payment services. Does somebody have an experience using Cybercash DLL? I am having problems sending credit card info to them. Help!!
0
Comment
Question by:Alexsasha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 15

Expert Comment

by:ozymandias
ID: 6375233
What problems are you having ?
Please be more specific.
What type of operation are you trying to peform ?
Is it an mauthcapture ?
0
 

Author Comment

by:Alexsasha
ID: 6377855
The DLL I am trying to work with is CyberCashMCK.DLL

This piece of codes I am having probles with:
___________________________________________________________
Set CPI = Server.CreateObject("CyberCashMCK.MessageBlock")
               Set MO = Server.CreateObject("CyberCashMCK.MessageBlock")
               Set mbInput = Server.CreateObject("CyberCashMCK.MessageBlock")
               Set POP = Server.CreateObject("CyberCashMCK.MessageBlock")
               Set Output = CreateObject("Scripting.Dictionary")

'Response.Write (" line 173")

               'Specify merchant configuration file location
               sConfigLoc = Application("MerchantFile")
         
               'Do not change this URL
               sPaymentURL = "http://cr.cybercash.com/cgi-bin/directcardpayment.cgi"     

               'Provide the input parameters required for the CyberCash message
               CPI.Add "cpi.card-number", sCCNumber
               CPI.Add "cpi.card-exp", sCCExpDate
               CPI.Add "cpi.card-name", sCCName

               MO.Add "mo.cybercash-id", sCCID  
               MO.Add "mo.order-id", iKey
               MO.Add "mo.price", ("usd " & iTotal )
               MO.Add "mo.version", sCC_Version

               mbInput.Add "CPI", CPI.Write
               mbInput.Add "MO", MO.Write
           
'Response.Write (" line 190")
       
               'Send transaction to CyberCash
               Set SockObj = Server.CreateObject("CyberCashMCK.socket.1")
               Set oResult = SockObj.SendCCServer(sPaymentURL, sConfigLoc, mbInput)    

               oResult.WriteDictionary(Output)
               'Dump output to the browser in name/value format
               b = Output.Items
               a = Output.Keys
__________________________________________________________
1  First error occured on Server.CreateObject("CyberCashMCK.MessageBlock"). I know that CyberCashMCK.MessageBlock needs Item/iKey pair which I is not supplied. Can I hard code them somehow?

2. Second error occured on Set oResult = SockObj.SendCCServer(sPaymentURL, sConfigLoc, mbInput).
 "Cannot create object SockObj" message or something like that.

Could you please help?    
Thanks a lot

0
 
LVL 15

Expert Comment

by:ozymandias
ID: 6378082
OK. I'm not sure what the problem is.
Has this ever worked ?
What error are you getting on Server.CreateObject("CyberCashMCK.MessageBlock") ?

Here is a basic breakdown of the code I use :

Set in = Server.CreateObject("CyberCashMCK.MessageBlock")
Set out = CreateObject("Scripting.Dictionary")

config = "merchant_conf"
operation = "mauthcapture"
ccURL = "http://cr.cybercash.com/cgi-bin/cr21api.cgi/" & operation

in.Add "order-id",TransactionID
in.Add "amount",Amount
in.Add "card-number",CardNumber
in.Add "card-exp",ExpiryMonth & "/" & ExpiryYear
in.Add "card-cid",IssueNo
in.Add "card-name",CardHolderName
in.Add "card-address",CardHolderAddress
in.Add "card-zip",CardHolderPostcode

Set socket = Server.CreateObject("CyberCashMCK.socket.1")
Set result = SockObj.SendCCServer(ccURL, config, in)
result.WriteDictionary(out)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Alexsasha
ID: 6380558
It works just fine with existing application.
I modified my codes according with yours and now it looks like this:
___________________________________________________________
Set mbInput = Server.CreateObject("CyberCashMCK.MessageBlock")              
               Set Output = CreateObject("Scripting.Dictionary")
                             
               'Specify merchant configuration file location
               sConfigLoc = Application("MerchantFile")
         
               'Do not change this URL
               sPaymentURL = "http://cr.cybercash.com/cgi-bin/directcardpayment.cgi"         
                                   
               'Provide the input parameters required for the CyberCash message
               mbInput.Add "order-id", Request.Cookies("OrderID")              
               mbInput.Add "amount", iTotal              
               mbInput.Add "card-number", sCCNumber              
               mbInput.Add "card-exp", sCCExpDate
               mbInput.Add "cybercash-id", sCCID                
               mbInput.Add "card-name", sCCName
               mbInput.Add "card-address", sCCAddress
               mbInput.Add "card-zip", sCCZip                                        
               mbInput.Add "version", sCC_Version        
                              Set SockObj = Server.CreateObject("CyberCashMCK.socket.1")                        
               Set oResult = SockObj.SendCCServer(sPaymentURL, sConfigLoc, mbInput)              
               oResult.WriteDictionary(Output)
__________________________________________________________

I'm having an error: "CybercashMCK.Socket.1 error 800400e0
MCK_E_FILE_NOT_FOUND (oX800400EO) right at
"Set oResult = SockObj.SendCCServer(sPaymentURL, sConfigLoc, mbInput)"
It's reading OK sPaymentURL and sConfigLoc values, BUT NOT mbInput.
Where do you get order-id (TransactionID) and card-cid (IssueNo) values?
Thanks.
Alexsasha
               

 
0
 
LVL 15

Expert Comment

by:ozymandias
ID: 6380698
It looks like it might be having trouble finding your merchant_conf file.

All these values :

  TransactionID
  Amount
  CardNumber
  ExpiryMonth & "/" & ExpiryYear
  IssueNo
  CardHolderName
  CardHolderAddress
  CardHolderPostcode

are from user input or from our customer database, except TransactionID which unique id generated by database code.

0
 

Author Comment

by:Alexsasha
ID: 6380865
I am OK with all my variables from the database.
You may be right about the merchant_conf file.
In global.asa I have Application("MerchantFile") = "c:\\inetpub\\wwwroot\\spotus-15\\mck-cgi\\conf\\LIVE_merchant_conf". How this directory/file gets created on C drive?
What should I do next? Thanks a lot
Alexsasha



0
 
LVL 15

Accepted Solution

by:
ozymandias earned 600 total points
ID: 6381575
The merchant_conf file should be provided to you by Cybercash.

It contains :

your MCK_TYPE - e.g. merchant
the cybercash normal host and SSL host URLs
your cybercash id (provided by cybercash)
your secret key (provided by cybercash)
your merchant hey (provided by cybercash)
debugging and logging options
a list of the credit card types accepted
transaction timout values
default currency settings
etc

All these settings are used by the cybercash DLL on your machine to carry out the secure transaction with the cybercash server.

Have you :

a) made sure that this file exists in the specifed location.
b) checked that it has the correct values
c) made sure that the account used to run the web server service has read privildges on this file

?
0
 

Author Comment

by:Alexsasha
ID: 6384543
Looks I have everything setup OK.  Now it redirects me to the next page with a message: "Error occurred while processing your credit card". Looks like my Output.Item("MStatus") = "success" does not succeed.
Thanks
Alexsasha
0
 

Author Comment

by:Alexsasha
ID: 6393411
I had enough information for my question, thank you.
Alexsasha
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question