本文整理汇总了PHP中cc_core_get_url函数的典型用法代码示例。如果您正苦于以下问题:PHP cc_core_get_url函数的具体用法?PHP cc_core_get_url怎么用?PHP cc_core_get_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cc_core_get_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://pay1.plugnpay.com/payment/pnpremote.cgi", $vars1);
parse_str($ret, $res);
global $db;
$db->log_error("PlugNPay RESPONSE:<br />" . plugnpay_get_dump($res));
switch ($res['FinalStatus']) {
case 'success':
$return['RESULT'] = 'Approved';
break;
case 'fraud':
case 'badcard':
$return['RESULT'] = 'Declined';
break;
case 'problem':
$return['RESULT'] = 'Problem';
break;
}
$return['RESPMSG'] = $res['MErrMsg'] ? $res['MErrMsg'] : $res['auth-msg'];
// There is no 'auth-msg' returned
$return['RESPMSG'] = join("<br />\n", preg_split('/\\|/', $return['RESPMSG']));
$return['AVS'] = $res['avs-code'];
$return['PNREF'] = $res['auth-code'];
$return['CVV_VALID'] = $res['cvvresp'];
$return['ORDERID'] = $res['orderID'];
// Unique numeric order id used to identify transaction for any future activity including voids and returns.
return $return;
}
示例2: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
if ($this->config['testing']) {
$url = "https://test.safecharge.com/processtrans.asp";
} else {
$url = "https://process.safecharge.com/processtrans.asp";
}
$ret = cc_core_get_url($url, $vars1);
$res = $this->parse_response($ret);
global $db;
$db->log_error("SafeCharge RESPONSE:<br />" . safecharge_get_dump($res));
$return['RESULT'] = $res['Status'];
// Approved, Success, Declined, Error, Pending
$return['RESPMSG'] = preg_match("/Error/i", $res['Status']) ? "[" . $res['ErrCode'] . "][" . $res['ExErrCode'] . "] " . $res['Reason'] : '';
$return['AVS'] = $res['AVSCode'];
$return['PNREF'] = $res['AuthCode'];
$return['CVV_VALID'] = $res['CVV2Reply'];
$return['TRANSID'] = $res['TransactionID'];
// A 64-bit unique integer generated by the Gateway in order to identify each transaction.
return $return;
}
示例3: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://4tknox.au.com/cgi-bin/themerchant.au.com/ecom/external2.pl", $vars1);
$delim = "\n";
$arr = preg_split("({$delim})", $ret);
$res["RESULT_CODE"] = strtolower($arr[0]);
if (@strpos($ret, "{$delim}.{$delim}") === false) {
$res["RESPONSE_TEXT"] = $arr[1];
} else {
$ret = substr($ret, @strpos($ret, "{$delim}.{$delim}"));
$ret = str_replace($delim, "&", $ret);
parse_str($ret, $ret);
$res["RESPONSE_TEXT"] = $ret["response_text"];
$res["TXN_REF"] = $ret["txn_ref"];
$res["RESPONSE_CODE"] = $ret["response_code"];
$res["RESULT"] = $ret["result"];
}
//var_dump($res);
return $res;
}
示例4: run_transaction
function run_transaction($vars)
{
$request = "<request timestamp=\"" . $vars['timestamp'] . "\" type=\"" . $vars['auth_type'] . "\">\n <merchantid>" . $vars['merchantid'] . "</merchantid>\n ";
if ($vars['account']) {
$request .= "<account>" . $vars['account'] . "</account>";
}
$request .= "\n <orderid>" . $vars['orderid'] . "</orderid>\n <amount currency=\"" . $vars['currency'] . "\">" . $vars['amount'] . "</amount>\n <card>\n <number>" . $vars['number'] . "</number>\n <expdate>" . $vars['expdate'] . "</expdate>\n <chname>" . $vars['chname'] . "</chname>\n <type>" . $vars['type'] . "</type>\n ";
if ($vars['issueno'] && $vars['type'] == 'SWITCH') {
$request .= "<issueno>" . $vars['issueno'] . "</issueno>";
}
if ($vars['cvn']) {
$request .= "\n <cvn>\n <number>" . $vars['cvn'] . "</number>\n <presind>1</presind>\n </cvn>\n ";
}
$request .= "\n </card>\n <autosettle flag=\"1\" />\n <comments>\n <comment id=\"1\">" . $vars['comment'] . "</comment>\n </comments>\n <tssinfo>\n <custnum>" . $vars['member_id'] . "</custnum>\n <prodid>" . $vars['product_id'] . "</prodid>\n <varref>" . $vars['payment_id'] . "</varref>\n <custipaddress>" . $vars['ip'] . "</custipaddress>\n <address type=\"billing\">\n <code>" . $vars['zip'] . "</code>\n <country>" . $vars['country'] . "</country>\n </address>\n <address type=\"shipping\">\n <code>" . $vars['zip'] . "</code>\n <country>" . $vars['country'] . "</country>\n </address>\n <country>" . $vars['country'] . "</country>\n </tssinfo>\n ";
if ($vars['md5hash']) {
$request .= "<md5hash>" . $vars['md5hash'] . "</md5hash>";
} else {
$request .= "<sha1hash>" . $vars['sha1hash'] . "</sha1hash>";
}
$request .= "\n </request>\n ";
$url = "https://epage.payandshop.com/epage-remote.cgi";
$ret = cc_core_get_url($url, $request);
$res = $this->parse_response($ret);
global $db;
$db->log_error("RealEx RESPONSE:<br />" . realex_get_dump($res));
$hash = $res['timestamp'] . "." . $res['merchantid'] . "." . $res['orderid'] . "." . $res['result'] . "." . $res['message'] . "." . $res['pasref'] . "." . $res['authcode'];
$response_valid = false;
if ($res['md5hash']) {
$hash = md5($hash);
$hash = $hash . "." . $this_config['secret'];
$hash = md5($hash);
if ($res['md5hash'] == $hash) {
$response_valid = true;
}
} else {
$hash = sha1($hash);
$hash = $hash . "." . $this_config['secret'];
$hash = sha1($hash);
if ($res['sha1hash'] == $hash) {
$response_valid = true;
}
}
if ($response_valid) {
if ($res['result'] == '00') {
$return['RESULT'] = 'Approved';
} else {
$return['RESULT'] = 'Declined';
}
} else {
$return['RESULT'] = 'Invalid';
}
$return['RESPMSG'] = $res['message'];
$return['PNREF'] = $res['pasref'];
$return['CVV_VALID'] = $res['cvnresult'];
$return['TRANSID'] = $res['authcode'];
return $return;
}
示例5: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://webservice.paymentxp.com/wh/WebHost.aspx", $vars1);
parse_str($ret, $res);
return $res;
}
示例6: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://test.merchante-solutions.com/mes-api/tridentApi", $vars1);
parse_str($ret, $arr);
return $arr;
}
示例7: run_transaction
function run_transaction($vars)
{
global $db;
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://migs.mastercard.com.au/vpcdps", $vars1);
parse_str($ret, $arr);
$result = -1;
// undefined
$response = "";
switch ($arr['vpc_TxnResponseCode']) {
case '0':
$result = 1;
$response = "Transaction approved";
break;
case '1':
$response = "Transaction could not be processed";
break;
case '2':
$result = 2;
$response = "Transaction declined - contact issuing bank";
break;
case '3':
$response = "No reply from Processing Host";
break;
case '4':
$response = "Card has expired";
break;
case '5':
$response = "Insufficient credit";
break;
case '6':
$response = "Error Communicating with Bank";
break;
case '7':
$response = "Message Detail Error Invalid PAN, Invalid Expiry Date";
break;
case '8':
$response = "Transaction declined – transaction type not supported";
break;
case '9':
$response = "Bank Declined Transaction – Do Not Contact Bank";
}
if ($arr['vpc_TxnResponseCode'] != '0') {
$db->log_error("MIGS CC Error: payment_id=" . $arr['vpc_OrderInfo'] . ", code=" . $arr['vpc_TxnResponseCode'] . " (" . $response . "), message='" . $arr['vpc_Message'] . "'");
}
$res = array('RESULT' => $result, 'RESPMSG' => $response, 'AMOUNT' => $arr['vpc_Amount'], 'INVOICE' => $arr['vpc_OrderInfo'], 'PNREF' => $arr['vpc_TransactionNo']);
return $res;
}
示例8: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://www.sagepayments.net/cgi-bin/eftBankcard.dll?transaction", $vars1);
$res = array('ApprovalIndicator' => @substr($ret, 1, 1), 'Code' => @substr($ret, 2, 6), 'Message' => @substr($ret, 8, 32), 'CVVIndicator' => @substr($ret, 42, 1), 'AVSIndicator' => @substr($ret, 43, 1), 'RiskIndicator' => @substr($ret, 44, 2), 'Reference' => @substr($ret, 46, 10));
return $res;
}
示例9: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://secure.epx.com/", $vars1);
// $ret = cc_core_get_url("https://secure.epxuap.com/", $vars1);
$res = array('AUTH_RESP' => $this->from_res("AUTH_RESP", $ret), 'AUTH_GUID' => $this->from_res("AUTH_GUID", $ret), 'AUTH_CODE' => $this->from_res("AUTH_CODE", $ret), 'AUTH_AVS' => $this->from_res("AUTH_AVS", $ret), 'AUTH_CVV2' => $this->from_res("AUTH_CVV2", $ret), 'AUTH_RESP_TEXT' => $this->from_res("AUTH_RESP_TEXT", $ret), 'AUTH_CARD_TYPE' => $this->from_res("AUTH_CARD_TYPE", $ret), 'TRAN_TYPE' => $this->from_res("TRAN_TYPE", $ret));
return $res;
}
示例10: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("http://trans.atsbank.com/cgi-bin/trans.cgi", $vars1);
$arr = preg_split('/\\|/', $ret);
$res = array('RESULT' => $arr[0], 'RESULT_SUB' => $arr[1], 'REASON_CODE' => $arr[2], 'RESPMSG' => $arr[3], 'AVS' => $arr[5], 'PNREF' => $arr[6], 'CVV_VALID' => $arr[48]);
return $res;
}
示例11: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://secure.authorize.net/gateway/transact.dll", $vars1);
$ret = str_replace("\"", "", $ret);
$arr = preg_split('/\\|/', $ret);
$res = array('RESULT' => $arr[0], 'RESULT_SUB' => $arr[1], 'REASON_CODE' => $arr[2], 'RESPMSG' => $arr[3], 'AVS' => $arr[5], 'PNREF' => $arr[6], 'CVV_VALID' => $arr[48]);
return $res;
}
示例12: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://authorize.mscsecure.com/gateway/authorize.asp", $vars1);
$ret = str_replace("\"", "", $ret);
$arr = preg_split('/\\|/', $ret);
$res = array('IsError' => $arr[0], 'ErrorText' => $arr[1], 'ResponseCode' => $arr[2], 'ResponseText' => $arr[3], 'AuthCode' => $arr[4], 'AVSCode' => $arr[5], 'TransactionID' => $arr[6]);
return $res;
}
示例13: cc_bill
function cc_bill($cc_info, $member, $amount, $currency, $product_description, $charge_type, $invoice, $payment)
{
global $config;
$log = array();
//////////////////////// cc_bill /////////////////////////
if ($charge_type == CC_CHARGE_TYPE_TEST) {
return array(CC_RESULT_SUCCESS, "", "", array('test transaction' => 'no validation'));
}
$vars = array("vendor_id" => $this->config['user'], "vendor_password" => $this->config['pass'], 'first_name' => $cc_info['cc_name_f'], 'last_name' => $cc_info['cc_name_l'], 'ccnum' => $cc_info['cc_number'], 'ccmo' => substr($cc_info['cc-expire'], 0, 2), 'ccyr' => '20' . substr($cc_info['cc-expire'], 2, 2), 'email' => $member['email'], 'phone' => $cc_info['cc_phone'], 'address' => $cc_info['cc_street'], 'city' => $cc_info['cc_city'], 'state' => $cc_info['cc_state'], 'zip' => $cc_info['cc_zip'], 'country' => $cc_info['cc_country']);
if ($cc_info['cc_code']) {
$vars['cccode'] = $cc_info['cc_code'];
}
////// fill-in products list
if ($payment['data'][0]['BASKET_PRODUCTS']) {
$product_ids = (array) $payment['data'][0]['BASKET_PRODUCTS'];
$prices = $payment['data'][0]['BASKET_PRICES'];
} else {
$product_ids = array($payment['product_id']);
$prices = array($payment['product_id'] => $payment['amount']);
}
$products = array();
foreach ($product_ids as $pid) {
global $db;
$pr = $db->get_product($pid);
$pr['price'] = $prices[$pid];
$products[] = $pr;
}
$vars1 = $this->makeXMLRequest($vars, $products);
$vars_l = str_replace($cc_info['cc_number'], $cc_info['cc'], $vars1);
$vars_l = preg_replace("|<CCNum>(.+?)</CCNum>|", "<CCNum>{$cc_info['cc']}</CCNum>", $vars_l);
$vars_l = str_replace("<CVV2Number>" . $cc_info['cc_code'], '<CVV2Number>***', $vars_l);
$vars_l = preg_replace("|<VendorPassword>(.+?)</VendorPassword>|", "<VendorPassword>***</VendorPassword>", $vars_l);
$log[] = array('xml' => nl2br(str_replace('<', '<', $vars_l)));
$vars1 = urlencode($vars1);
$ret = cc_core_get_url("https://secure.paymentclearing.com/cgi-bin/rc/xmltrans.cgi", 'xml=' . $vars1);
$ret = str_replace(" standalone=\"yes\"", "", $ret);
$res = $this->xml_ParseXML($ret);
$ret = str_replace('<', '<', $ret);
$ret = preg_replace('/(<\\/\\w+>)/', "\\1<br />\n", $ret);
$log[] = array('ret' => $ret);
$r = $res['SaleResponse'][0]['TransactionData'][0];
if ($r['Status'][0] == 'OK') {
return array(CC_RESULT_SUCCESS, "", $r['XID'][0], $log);
} elseif ($r['Status'][0] == 'FAILED') {
return array(CC_RESULT_DECLINE_TEMP, $r['ErrorMessage'][0], "", $log);
} else {
return array(CC_RESULT_DECLINE_PERM, $r['ErrorMessage'][0], "", $log);
}
}
示例14: run_transaction
function run_transaction($vars)
{
global $db;
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://www.merchantplanb.com:444/proc/zproc_planb.asp", $vars1);
$arr = preg_split('/\\|/', $ret);
$res = array("RESULT" => $arr[0], "RESULT_TEXT" => $arr[1], "PNREF" => $arr[2], "RESPMSG" => $arr[3]);
$db->log_error("MerchantPlanb RESPONSE:<br />\n" . merchantplanb_get_dump($res));
return $res;
}
示例15: run_transaction
function run_transaction($vars)
{
foreach ($vars as $kk => $vv) {
$v = urlencode($vv);
$k = urlencode($kk);
$vars1[] = "{$k}={$v}";
}
$vars1 = join('&', $vars1);
$ret = cc_core_get_url("https://secure.quickpay.dk/api", $vars1);
$res = array("msgtype", "ordernumber", "amount", "time", "state", "chstat", "qpstat", "qpstatmsg", "merchantemail", "merchant", "transaction", "cardtype", "md5check");
foreach ($res as $one) {
$result[$one] = $this->from_res($one, $ret);
}
return $result;
}