note 40621 added to ref.cybercash
| From: | david at azcode dot com | Date: | Tue, 09 Mar 2004 23:54:52 +0000 |
| Subject: | note 40621 added to ref.cybercash | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66518@lists.php.net to get a copy of this message | ||
$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); // I don't know yet
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+40621
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40621&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40621&report=yes
Search -- http://master.php.net/manage/user-notes.php