Administration
  Home arrow Administration arrow Page 4 - Script-Based Credit Card Interfaces
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Script-Based Credit Card Interfaces
By: Stephen Junker
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8
    2001-03-14

    Table of Contents:
  • Script-Based Credit Card Interfaces
  • A Word About Security
  • Testing
  • PHP and CyberCash
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Dell PowerEdge Servers

    Script-Based Credit Card Interfaces - PHP and CyberCash
    (Page 4 of 5 )

    While the focus of this article is on connecting to the Authorize.net system through a request / response interface, a discussion of eCommerce connections with PHP would not be complete without discussing CyberCash, given that there is a PHP module devoted to it. However, one of the major differences between the CyberCash system and the Authorize.net system is that the latter does not require anything to be setup or installed -- it’s a completely script-based interface.

    To connect with the CyberCash system, you will have to register at their website and download and install a copy of their Merchant Connection Kit (MCK) at your web host. Then, you will have to recompile PHP with the embedded CyberCash support to be able to access PHP’s API for CyberCash. If you’re not hosting your own site, this means being dependent on your ISP for this functionality, though more and more providers are offering it in a standard package.

    After compiling PHP with the CyberCash extensions installed, you will be able to access 'CyberLib', a set of functions for use with the CyberCash system. However, research has shown these functions to be poorly documented and even less poorly understood by the PHP development community. The main method of integration with CyberCash is through the direct socket interface, and the purpose of CyberLib is to provide a convenient programming interface so you don't have to get your hands dirty with socket programming. A sample transaction using the CyberLib interface to CyberCash's CashRegister (taken straight from the PHP source code documentation) is shown below.

    <?php
    $merchant=""; /* Your merchant ID goes here. */
    $merchant_key=""; /* Your merchant key goes here. */
    $payment_url="http://cr.cybercash.com/cgi-bin/";
    $auth_type="mauthonly";
    $response=SendCC2_1Server($merchant,$merchant_key,$payment_url, $auth_type,array(
    "Order-ID" => "2342322",
    "Amount" => "usd 11.50",
    "Card-Number" => "4111111111111111",
    "Card-Address" => "1600 Pennsylvania Avenue",
    "Card-City" => "Washington",
    "Card-State" => "DC",
    "Card-Zip" => "20500",
    "Card-Country" => "USA",
    "Card-Exp" => "12/99",
    "Card-Name" => "Bill Clinton"));
    while(list($key,$val)=each($response)) {
    echo $key ."=" .$val ." ";
    }
    ?>

    As stated earlier, these built-in functions are poorly documented and difficult to use, and this sentiment is echoed in the user commentary with the online PHP manual at www.php.net. In an attempt to de-mystify the process of connecting to the CyberCash CashRegister, PHP developer Nathan Cassano has written an excellent article on connecting with his 'CyberClass', an adaptation of the standard CyberLib. The article, and other information about connecting to CyberCash, can be found at http://www.phpbuilder.com/columns/nathan20001225.php3.

    More Administration Articles
    More By Stephen Junker


     

       

    ADMINISTRATION ARTICLES

    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway