Friday, February 01, 2008

Installing CyberSource on ASPDNSF ML 6.0

A few years ago, I purchased the VB.NET version of the ASPDotNetStorefront ML 6.0. We had done some work on it, then put it on the back burner. Very recently, we picked it up again, and wanted to integrate CyberSource as the payment gateway. Unfortunately, support for ML 6.0 is not longer available, as ASPDotNetStorefront is up to version ML 7.0.

I had stumbled through how to integrate CyberSource into ML 6.0, but eventually figured it out. Considering ASPDNSF is a popular product, I thought I would document the steps to integrate.

Again, this is how to integrate CyberSource into ASPDotNetStoreFront ML 6.0

Step 1 - Install SDK

Install the CyberSrouce SDK onto the PC. Note: This install's dll's into the .Net Frameworks GAC, so this needs to be installed on every server that will host the application.
You can get the SDK here - http://apps.cybersource.com/cgi-bin/pages/dev_kits.cgi?kit=_.NET/_.NET2.0

Step 2 - Update Cybersource.vb
If you haven't already done so, open up your project with Visual Studio 2005.

  • Within the Gateways Project (AspDotNetStorefrontGateways) add a reference to Cybersource.Clients.dll
  • Within Cybersource.vb, uncomment top line
    VB .NET does not have a #define statement
    Rewrite top line to #CONST CYBERSOURCE = True
  • Comment out the existing section:
    #If CYBERSOURCE Then
    Imports CyberSource.Soap
    Imports CyberSource.Soap.CyberSourceWS
    #End If
  • Replace the commented section with:
    #If CYBERSOURCE Then
    Imports CyberSource.Clients.SoapWebReference
    Imports CyberSource.Clients.SoapClient
    #End If

    This is because the SDK has been updated since ML 6.0 came out, so the libraries are different.
  • Update the methods "ProcessCard" Input Parms.
    Change the types for UseBillingAddress and UseShippingAddress to use 'AspDotNetStorefrontCommon.Address'

Step 3 - Use WSE 3.0

Step 4 - Generate CyberSource Gateway Key:

Labels: , , ,