PHP: Cybercash Payment Functions - Manual
PHP  
downloads | documentation | faq | getting help | mailing lists | | php.net sites | links | my php.net 
search for in the  
<curl_versioncybercash_base64_decode>
view the version of this page
Last updated: Fri, 21 May 2004

XIII. Cybercash Payment Functions

�w��

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 .

If you have questions as to the latest status of CyberCash then the following 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.

���e�ؿ�
cybercash_base64_decode -- base64 decode data for Cybercash
cybercash_base64_encode -- base64 encode data for Cybercash
cybercash_decr -- Cybercash decrypt
cybercash_encr -- Cybercash encrypt


add a note add a note User Contributed Notes
Cybercash Payment Functions
david at azcode dot com
10-Mar-2004 12: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]; }
bens at dantz dot com
18-Jul-2003 12:23
Just a note, in case there is anyone out there with my situation: If anyone is stuck on Windows and is stuck with the Cybercash APIs, but wants to upgrade to PHP >= 4.3.0, I've found that an older php_cybercash.dll file will work (I copied it from an old 4.22 installation...  other versions probably work as well).
nathan at cjhunter dot com
31-Jul-2000 11:18
We use cybercash and php for all our website's financial transactions. I developed CyberClass () as a clean up and extension of CyberLib. I recommend that you use CyberClass over CybeLib.
mikebabcock at pobox dot com
17-Jul-2000 03:34
The cyberlib.php file is a library of functions for use with your Cybercash transaction php files.  The test.php file contains an example transaction that is very simple:

 $merchant=""; /* Your merchant ID goes here. */
 $merchant_key=""; /* Your merchant key goes here. */
 $payment_url="";
 $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."<br>";
  }

For all those without source; hope this helps.
dave at bcdei dot com
07-Jul-2000 01:54
**Posted to the newgroup by Mike Robinson <[email protected]> **

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.

<curl_versioncybercash_base64_decode>
 Last updated: Fri, 21 May 2004
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2004 The PHP Group
All rights reserved.
This unofficial mirror is operated at: /
Last updated: Thu Jun 10 10:22:01 2004 CEST