PHP: Cybercash platebn� funkce - 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: Thu, 15 Jul 2004

XIII. Cybercash platebn� funkce

Instalace

Tyto funkce jsou dostupn� pouze pokud bylo PHP zkompilov�no s volbou --with-cybercash=[DIR].

Tyto funkce byly v PHP 4.3.0 p�esunuty do depozit��e .

Pokud m�te dotazy k posledn�mu stavu knihovny CyberCash, pom��e v�m odkaz . Ve zkratce lze ��ci, �e CyberCash byl uveden firmou VeriSign a i kdy� slu�by CyberCash nad�le existuj�, VeriSign doporu�uje u�ivatel�m p�echod. Pro bli��� informace viz FAQ a odkaz na PECL.

Obsah
cybercash_base64_decode -- base64 decode data for Cybercash
cybercash_base64_encode -- base64 encode data for Cybercash
cybercash_decr -- Cybercash de�ifrov�n�
cybercash_encr -- Cybercash za�ifrov�n�


add a note add a note User Contributed Notes
Cybercash platebn� funkce
david at azcode dot com
10-Mar-2004 02: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 01: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
01-Aug-2000 12: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 04: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 02: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: Thu, 15 Jul 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: Sun Nov 14 23:09:54 2004 Local time zone must be set--see zic manual page