Here's how to install cybercash dynamically into PHP
----------------------------------------------------
1. Make sure you have the php dev tools installed, like pear and phpize.
2. Download the cybercash module:
pear download cybercash
3. Untar the module:
tar -xzf cybercash-<version>.tgz
4. Download and install my updated config.m4 file, the current one (as of version 1.18p1) doesn't work:
wget http://shupp.org/patches/cybercash.config.m4
cd cybercash-<version>
mv ../cybercash.config.m4 config.m4
5. Setup/compile module
phpize
./configure --with-cybercash=/path/to/cybercash-source/c-api
make
6. Install module. For Debian Sarge, the modules directory is /usr/lib/php4/20020429/:
cp modules/cybercash.so /usr/lib/php4/20020429/
(make install may work also)
7. Enable the module in php.ini, restart apache.
Hope this saves someone else some time.
Bill Shupp
Cybercash Payment Functions
安装
These functions are only available if the interpreter has been compiled with the --with-cybercash=[DIR].
This extension has been moved from PHP as of PHP 4.3.0 and now CyberCash lives in » PECL.
If you have questions as to the latest status of CyberCash then the following » CyberCash Faq will be helpful. In short, CyberCash was bought out by VeriSign and although the CyberCash service continues to exist, VeriSign encourages users to switch. See the above faq and PECL link for details.
Table of Contents
- cybercash_base64_decode — base64 decode data for Cybercash
- cybercash_base64_encode — base64 encode data for Cybercash
- cybercash_decr — Cybercash decrypt
- cybercash_encr — Cybercash encrypt
Cybercash
hostmaster at shupp dot org
28-May-2005 09:51
28-May-2005 09:51
chris at scootersoftware dot com
07-Jan-2005 01:15
07-Jan-2005 01:15
How to compile Cybercash support statically into PHP
-----------------------------------------
Verisign did not force migration from Cybercash to Payflow Pro. Cybercash is still alive and well for existing customers.
The Cybercash in PECL does not work at this time (see http://pecl.php.net/bugs/bug.php?id=1296 ). The work around listed in the bug report didn't work on my system.
Here's how I compiled Cybercash support into php 4.3.10:
(I used autoconf 2.13, automake 1.5, and libtool 1.4.3, but I don't know if they are required)
Download source tarballs for php 4.2.3 (the last version with Cybercash support) and php 4.3.10.
Copy the ext/cybercash directory from the 4.2.3 source tarball into the php 4.3.10 source.
From the root of the PHP 4.3.10 source run:
./buildconf --force
Configure pointing to your Cybercash MCK libraries:
./configure --with-cybercash=/opt/local/src/mck-vernum --with-your-other-options
make
make install
Restart Apache to pick up the changes.
david at azcode dot com
10-Mar-2004 10:53
10-Mar-2004 10:53
I am suprised to see recent posting for CyberCash implementation considering they haven't been a company for almost four years now. When VeriSign bought them, they force migrated everyone to Payflow Pro - which is why I switched to iBill.com (now InterCept's iPay) gateway. Either way, the below code (using cURL) should allow a transaction to post without a local COM obj to a secure payment server via SSL. check it out...
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://secure.ibill.com/cgi-win/ccard/tpcard.exe");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // this line make is work under https
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
$RECEIPT = curl_exec($ch);
$RECEIPT = preg_replace("/\n?\r?/","",$RECEIPT);
curl_close ($ch);
$receipt_fields = preg_split("/\",\"/", $RECEIPT, -1, PREG_SPLIT_NO_EMPTY);
$authorization = $receipt_fields[0];
$authorization = preg_replace("/]^a-z0-9]/i","",$authorization);
$authcode = $receipt_fields[1];
$rDate = $receipt_fields[2];
$rTime = $receipt_fields[3];
$rTran = $receipt_fields[4];
$rcRef = $receipt_fields[5];
$avscode = $receipt_fields[6];
$psdata = $receipt_fields[7];
if(!isset($receipt_fields[8])) {
$revsh = "none";
}else { $revsh = $receipt_fields[8]; }
if(!isset($receipt_fields[9])) {
$fraud = "none";
}else { $fraud = $receipt_fields[9]; }
dave at bcdei dot com
07-Jul-2000 10:54
07-Jul-2000 10:54
**Posted to the newgroup by Mike Robinson <mgrphp3@cgocable.net> **
In the php4 source, under ext/cybercash, you'll see a couple of files with
sample snippets in them, cyberlib.php and test.php. The mck comes with some
documentation as well. (Note, in the php3 source, the dir is extra/cyberlib)
Other than that, I've seen very little.
