note 40619 added to ref.cybercash

From: Date: Tue, 09 Mar 2004 23:53:29 +0000
Subject: note 40619 added to ref.cybercash
Groups: php.notes 
Request: Send a blank email to php-notes+get-66516@lists.php.net to get a copy of this message
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]; } ---- Manual Page -- http://www.php.net/manual/en/ref.cybercash.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40619 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40619&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40619&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#66516) next »