CyberCash™ Payment


Home 'Secure payment' Contents

Please email any bug reports, comments or suggestions to ExperLog's Online Support


Overview

ExperShop supports CyberCash™ MCK 3.2 and later, but has not been tested against previous versions.

Currently, only the credit-card payment is supported.

Quick Start

You can test the CyberCash integration against our CyberCash test account :
  • In the shop configuration file, position the pay.cych.Url property to "http ://dyade.inrialpes.fr/membres/gibello/CyberCash/test-mck/mck-cgi/"
    Example :
    pay.cych.Url : http ://dyade.inrialpes.fr/membres/gibello/CyberCash/test-mck/mck-cgi/
  • In the sample "lite" shop that comes with ExperShop, issue a CyberCash™ payment, and see what happens.

Setup

There are different steps to integrate a merchant server with CyberCash™ :
  • Connect to the CyberCash™ web site, to get the CyberCash™ MCK software.
  • Install the CyberCash™ MCK on your server (in test mode).
  • Install the ExperShop CyberCash files : they are located in the ExperShop/etc/cych directory.
    See the next chapter for installation instructions.
  • When this is done, position the pay.cych.Url property in the shop configuration file to the base URL for your CyberCash™ MCK; example :
    pay.cych.Url : http ://yourhost.yourdomain.com/cgi-bin/CyberCash/test-mck/mck-cgi/
  • ExperShop can now deal with your CyberCash account : for example, you can place an order using CyberCash™ from the ExperShop templates using the com.expershop.pay.cych.ESOrderAct action (see the sample ExperShop templates in the ESRootDir/ESTemplates/Shop/CyberCash directory).
  • When you successfully place an order with the test account, contact CyberCash™ to make your account go live!

Installing the ExperShop CyberCash™ files

In the ExperShop/etc/cych directory, you will find :
  • a perl-scripts directory : it contains PERL files that you will need to install to make ExperShop work along with the CyberCash™ PERL interface.
  • a c-scripts directory : it contains C files that you will need to compile and install to make ExperShop work along with the CyberCash™ C interface.
  • an expershop_templates directory : it contains templates for the CyberCash™ MCK, that you will have to install to interface it with ExperShop.
Installing the CGI scripts

For PERL users : Installing the PERL scripts

Go in the perl-scripts directory, then copy the CCMerchantCustom.pm and CCMerchantTest.pm files in the directory that contains the CyberCash™ MCK CGI scripts (depends on your MCK installation).

For C users : Installing the C scripts

Go in the c-scripts directory, then copy the CCMerchantCustom.c, CCMerchantCustom.h, CCMerchantTest.c and CCMerchantTest.h files in the c-scripts directory under your CyberCash™ MCK installation.

Before doing that, you may wish to save the previous version of the files : if so, temporarily copy them somewhere else.

Go in the c-scripts/browser directory under your CyberCash™ MCK installation, then compile with the makefile : make

Copy the generated .cgi files in the directory that contains the CyberCash™ MCK CGI scripts (depends on your MCK installation).

Installing the templates

Go in the MCK CGI directory (if you installed the MCK for testing, there's a test-mck/mck-cgi directory somewhere).

Create an expershop_templates directory there, and copy the files from expershop_csk/expershop_templates in the new directory.

Edit the conf/merchant_conf file, and change the "TEMPLATE_DIR=./templates" line to "TEMPLATE_DIR=./expershop_templates".

Invoking CyberCash™ from ExperShop templates

CyberCash™ is invoked from ExperShop by invoking the com.expershop.pay.cych.ESOrderAct action.

The action invokes the CyberCash™ services for payment : if the payment is successful, the shopping cart content is ordered.

Action : com.expershop.pay.cych.ESOrderAct

Place Order, with CyberCash™ secure payment : a new order is created upon payment success, the shopping cart is emptied.
If the payment fails, no order is placed, and the shopping cart remains unchanged.

We recommend that the page that triggers this action be invoked through SSL (for credit-card info encryption).

Input parameters :

  • CcNum : The credit card number (MANDATORY)
  • CcExpDate : The credit card expiration date (format : mm/yy) (MANDATORY)
  • cpi.card-name : The credit card holder name (optional)
Output parameters :
  • OrdId - The ExperSHOP-generated Order ID, in case of success only
  • CYBERCASH_STATUS - The payment status ("SUCCESS", or some other value that gives information about the transaction failure status)
  • CYBERCASH_ERRMSG - The CyberCash™-generated error message, in case of failure only