• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getGatewayVariables函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getGatewayVariables函数的典型用法代码示例。如果您正苦于以下问题:PHP getGatewayVariables函数的具体用法?PHP getGatewayVariables怎么用?PHP getGatewayVariables使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getGatewayVariables函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: paypalexpress_link

function paypalexpress_link($params)
{
    $paypalvars = getGatewayVariables("paypal");
    $params = array_merge($params, $paypalvars);
    $params['returnurl'] = $params['systemurl'] . "/viewinvoice.php?id=" . $params['invoiceid'];
    return paypal_link($params);
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:7,代码来源:paypalexpress.php


示例2: get_invoice_status

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
function get_invoice_status($pars)
{
    $GATEWAY = getGatewayVariables("inpay");
    $calc_md5 = calc_inpay_invoice_status_md5key(array("invoice_ref" => $pars['invoice_reference'], "merchant_id" => $GATEWAY['username'], "secret_key" => $GATEWAY['secretkey']));
    $q = http_build_query(array("merchant_id" => $GATEWAY['username'], "invoice_ref" => $pars['invoice_reference'], "checksum" => $calc_md5), "", "&");
    $fsocket = false;
    $curl = false;
    $result = false;
    $fp = false;
    $server = "secure.inpay.com";
    if ($GATEWAY['testmode'] == "on") {
        $server = "test-secure.inpay.com";
    }
    if (4.3 <= PHP_VERSION && ($fp = @fsockopen("ssl://" . $server, 443, $errno, $errstr, 30))) {
        $fsocket = true;
    } else {
        if (function_exists("curl_exec")) {
            $curl = true;
        }
    }
    if ($fsocket == true) {
        $header = "POST /api/get_invoice_status HTTP/1.1" . "\r\n" . "Host: " . $server . "\r\n" . "Content-Type: application/x-www-form-urlencoded" . "\r\n" . "Content-Length: " . strlen($q) . "\r\n" . "Connection: close" . "\r\n\r\n";
        @fputs($fp, $header . $q);
        $str = "";
        while (!@feof($fp)) {
            $res = @fgets($fp, 1024);
            $str .= (bool) $res;
        }
        @fclose($fp);
        $result = $str;
        $result = preg_split('/^\\r?$/m', $result, 2);
        $result = trim($result[1]);
        $result = preg_split('/\\n/m', $result);
        if (1 < count($result)) {
            $result = trim($result[1]);
        } else {
            $result = trim($result[0]);
        }
    } else {
        if ($curl == true) {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, "https://" . $server . "/api/get_invoice_status");
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $q);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_HEADER, false);
            curl_setopt($ch, CURLOPT_TIMEOUT, 30);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            $result = curl_exec($ch);
            curl_close($ch);
        }
    }
    return (bool) $result;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:64,代码来源:inpay.php


示例3: afterSetupProductEventListener

function afterSetupProductEventListener($vars)
{
    $gateway = getGatewayVariables("paymentwall");
    if (!isset($gateway['enableDeliveryApi']) || $gateway['enableDeliveryApi'] == '') {
        return;
    }
    if ($vars['params']['packageid'] && ($product = mysql_fetch_assoc(select_query('tblproducts', '*', array('id' => $vars['params']['packageid']))))) {
        // Get hosting data
        $hosting = mysql_fetch_assoc(select_query('tblhosting', 'orderid, paymentmethod', array('username' => $vars['params']['username'])));
        if (!$hosting || $hosting['paymentmethod'] != 'paymentwall') {
            return;
        }
        handleProductAutoSetup($vars, $hosting, $gateway);
    }
}
开发者ID:fanytest,项目名称:module-whmcs,代码行数:15,代码来源:paymentwall.php


示例4: completeOrderUser

function completeOrderUser($order)
{
    $ret = array();
    $gatewaymodule = "bitshares";
    $GATEWAY = getGatewayVariables($gatewaymodule);
    # Checks invoice ID is a valid invoice number or ends processing
    $invoiceid = checkCbInvoiceID($order['order_id'], $GATEWAY["name"]);
    $transid = $order['trx_id'];
    checkCbTransID($transid);
    # Checks transaction number isn't already in the database and ends processing if it does
    # Successful
    $fee = 0;
    $amount = $order['amount'];
    // left blank, this will auto-fill as the full balance
    addInvoicePayment($invoiceid, $transid, $amount, $fee, $gatewaymodule);
    # Apply Payment to Invoice
    $ret['url'] = baseURL . 'viewinvoice.php?id=' . $order['order_id'];
    logTransaction($GATEWAY["name"], $order, $order['status']);
    return $ret;
}
开发者ID:WebKutir,项目名称:bitshares-whmcs,代码行数:20,代码来源:userfunctions.php


示例5: gocardless_capture

/**
 ** WHMCS method to capture payments
 ** This method is triggered by WHMCS in an attempt to capture a PreAuth payment
 **
 ** @param array $params Array of paramaters parsed by WHMCS
 **/
function gocardless_capture($params)
{
    # create GoCardless DB if it hasn't already been created
    gocardless_createdb();
    # grab the gateway information from WHMCS
    $gateway = getGatewayVariables('gocardless');
    # Send the relevant API information to the GoCardless class for future processing
    gocardless_set_account_details($params);
    # check against the database if the bill relevant to this invoice has already been created
    $existing_payment_query = select_query('mod_gocardless', 'resource_id', array('invoiceid' => $params['invoiceid']));
    $existing_payment = mysql_fetch_assoc($existing_payment_query);
    # check if any rows have been returned or if the returned result is empty.
    # If no rows were returned, the bill has not already been made for this invoice
    # If a row was returned but the resource ID is empty, the bill has not been completed
    # we have already raised a bill with GoCardless (in theory)
    if (!mysql_num_rows($existing_payment_query) || empty($existing_payment['resource_id'])) {
        #MOD-START
        #Use PreAuth table
        $userid_query = select_query('tblinvoices', 'userid', array('id' => $params['invoiceid']));
        $userid_result = mysql_fetch_array($userid_query);
        if (!empty($userid_result['userid'])) {
            $userid = $userid_result['userid'];
            $preauth_query = select_query('mod_gocardless_preauth', 'subscriptionid', array('userid' => $userid));
            $preauth_result = mysql_fetch_array($preauth_query);
            if (!empty($preauth_result['subscriptionid'])) {
                $preauthid = $preauth_result['subscriptionid'];
            }
        }
        #MOD-END
        # now we are out of the loop, check if we have been able to get the PreAuth ID
        if (isset($preauthid)) {
            # we have found the PreAuth ID, so get it from GoCardless and process a new bill
            $pre_auth = GoCardless_PreAuthorization::find($preauthid);
            # check the preauth returned something
            if ($pre_auth) {
                # Create a bill with the $pre_auth object
                try {
                    $bill = $pre_auth->create_bill(array('amount' => $params['amount'], 'name' => "Invoice #" . $params['invoiceid']));
                } catch (Exception $e) {
                    # we failed to create a new bill, lets update mod_gocardless to alert the admin why payment hasnt been received,
                    # log this in the transaction log and exit out
                    update_query('mod_gocardless', array('payment_failed' => 1), array('invoiceid' => $params['invoiceid']));
                    logTransaction($params['paymentmethod'], "Failed to create GoCardless bill against pre-authorization " . $preauthid . " for invoice " . $params['invoiceid'] . ": " . print_r($e, true) . print_r($bill, true), 'Failed');
                    return array('status' => 'error', 'rawdata' => $e);
                }
                # check that the bill has been created
                if ($bill->id) {
                    # check if the bill already exists in the database, if it does we will just update the record
                    # if not, we will create a new record and record the transaction
                    if (!mysql_num_rows($existing_payment_query)) {
                        # Add the bill ID to the table and mark the transaction as pending
                        insert_query('mod_gocardless', array('invoiceid' => $params['invoiceid'], 'billcreated' => 1, 'resource_id' => $bill->id, 'preauth_id' => $pre_auth->id));
                        if ($gateway['instantpaid'] == on) {
                            # The Instant Activation option is on, so add to the Gateway Log and log a transaction on the invoice
                            addInvoicePayment($params['invoiceid'], $bill->id, $bill->amount, $bill->gocardless_fees, $gateway['paymentmethod']);
                            logTransaction($gateway['paymentmethod'], 'Bill of ' . $bill->amount . ' raised and logged for invoice ' . $params['invoiceid'] . ' with GoCardless ID ' . $bill->id, 'Successful');
                            return array('status' => 'success', 'rawdata' => print_r($bill, true));
                        } else {
                            # Instant Activation is off, so just add to the gateway log and wait before marking as paid until web hook arrives
                            logTransaction($gateway['paymentmethod'], 'Bill of ' . $bill->amount . ' raised for invoice ' . $params['invoiceid'] . ' with GoCardless ID ' . $bill->id, 'Successful');
                            return array('status' => 'pending', 'rawdata' => print_r($bill, true));
                        }
                    } else {
                        # update the table with the bill ID
                        update_query('mod_gocardless', array('billcreated' => 1, 'resource_id' => $bill->id), array('invoiceid' => $params['invoiceid']));
                    }
                }
            } else {
                # PreAuth could not be verified
                logTransaction($gateway['paymentmethod'], 'The pre-authorization specified for invoice ' . $params['invoiceid'] . ' (' . $preauthid . ') does not seem to exist - something has gone wrong, or the customer needs to set up their Direct Debit again.', 'Incomplete');
                return array('status' => 'error', 'rawdata' => array('message' => 'The pre-authorization ID was found for invoice ' . $params['invoiceid'] . ' but it could not be fetched.'));
            }
        } else {
            # we couldn't find the PreAuthID meaning at this point all we can do is give up!
            # the client will have to setup a new preauth to begin recurring payments again
            # or pay using an alternative method
            logTransaction($gateway['paymentmethod'], 'No pre-authorization found when trying to raise payment for invoice ' . $params['invoiceid'] . ' - something has gone wrong, or the customer needs to set up their Direct Debit again.', 'Incomplete');
            return array('status' => 'error', 'rawdata' => array('message' => 'No pre-authorisation ID found in WHMCS for invoice ' . $params['invoiceid']));
        }
    } else {
        # WHMCS is trying to collect the bill but one has already been created - this happens because the bill is not mark as 'paid'
        # until a web hook is received by default, so WHMCS thinks it still needs to collect.
        # logTransaction('GoCardless', 'Bill already created - awaiting update via web hook...' . "\nBill ID: " . $existing_payment['resource_id'], 'Pending');
        # return array('status' => 'Bill already created - awaiting update via web hook...', 'rawdata' =>
        #    array('message' => 'Bill already created - awaiting update via web hook...'));
        return array('status' => 'pending', 'rawdata' => array('message' => 'The bill has already been created for invoice ' . $params['invoiceid']));
    }
}
开发者ID:stehardy,项目名称:gocardless-whmcs,代码行数:94,代码来源:gocardless.php


示例6: getGatewayVariables

# Required File Includes
if (file_exists("../../../init.php")) {
    // For new version
    include "../../../init.php";
    $whmcs->load_function('gateway');
    $whmcs->load_function('invoice');
} else {
    include "../../../dbconnect.php";
    include "../../../includes/functions.php";
    include "../../../includes/gatewayfunctions.php";
    include "../../../includes/invoicefunctions.php";
}
$gatewaymodule = "allpaycredit";
# Enter your gateway module name here replacing template
$InvoicePrefix = "CRE";
$GATEWAY = getGatewayVariables($gatewaymodule);
if (!$GATEWAY["type"]) {
    die("Module Not Activated");
}
# Checks gateway module is active before accepting callback
# Get Returned Variables - Adjust for Post Variable Names from your Gateway's Documentation
$MerchantID = $_POST["MerchantID"];
$PaymentDate = $_POST["PaymentDate"];
$RtnCode = $_POST["RtnCode"];
$RtnMsg = $_POST["RtnMsg"];
$PaymentNo = $_POST["MerchantTradeNo"];
$status = $_POST["RtnCode"];
$transid = $_POST["TradeNo"];
$amount = $_POST["TradeAmt"];
$fee = $_POST["PaymentTypeChargeFee"];
$invoiceid = $_POST["MerchantTradeNo"];
开发者ID:iHostUP,项目名称:WHMCS_AllPay_Mod,代码行数:31,代码来源:allpaycredit.php


示例7: getGatewayVariables

<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("payoffline");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
if (!$_REQUEST['code'] && !$_REQUEST['callbackvars']) {
    header("Status: 404 Not Found");
    exit;
} else {
    header("Status: 200 OK");
}
$amount = $_REQUEST['amt'];
$callbackvars2 = explode("&amp;", $callbackvars);
foreach ($callbackvars2 as $value) {
    $values[] = explode("=", $value);
}
if ($code == "5") {
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:payoffline.php


示例8: getGatewayVariables

<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("paymex");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
$invoiceid = checkCbInvoiceID($_GET['xinv'], "Paymex");
if ($_GET['xresp'] == "1") {
    $result = select_query("tblinvoices", "total", array("id" => $invoiceid));
    $data = mysql_fetch_array($result);
    $total = $data['total'];
    $fee = $total * 0.0295 + 0.55;
    $pos = strpos($fee, ".");
    $pos = $pos + 3;
    $fee = substr($fee, 0, $pos);
    addInvoicePayment($invoiceid, $invoiceid, "", $fee, "paymex");
    logTransaction("Paymex", $_REQUEST, "Successful");
    redirSystemURL("id=" . $invoiceid . "&paymentsuccess=true", "viewinvoice.php");
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:paymex.php


示例9: simplexml_load_string

    $checkout_parsed = simplexml_load_string($retorno_curl);
    if ($checkout_parsed->code) {
        $result = '<form action="https://pagseguro.uol.com.br/v2/checkout/payment.html" method="get">' . "\n";
        $result .= '    <input type="hidden" name="code" value="' . $checkout_parsed->code . '">' . "\n";
        $result .= '    <input type="submit" value="Pagar Agora">' . "\n";
        $result .= '</form>' . "\n";
    } else {
        $result = '<font style="color:red">Ocorreu um erro na comunicação com o PagSeguro</font>';
        logTransaction($params['name'], $retorno_curl . print_r($params, true) . ($checkout_parsed ? " / " . $checkout_parsed : ""), 'Unsuccessful');
    }
    return $result;
}
if (basename(__FILE__) == basename($_SERVER['SCRIPT_NAME'])) {
    if (!array_key_exists('notificationCode', $_POST) || !array_key_exists('notificationType', $_POST)) {
        header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
        die;
    }
    require '../../init.php';
    require '../../includes/invoicefunctions.php';
    require '../../includes/gatewayfunctions.php';
    $GATEWAY = getGatewayVariables('pagseguroapilite');
    $curl = curl_init('https://ws.pagseguro.uol.com.br/v3/transactions/notifications/' . $_POST['notificationCode'] . '?email=' . $GATEWAY['email'] . '&token=' . $GATEWAY['token']);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $xml = simplexml_load_string(curl_exec($curl));
    logTransaction($GATEWAY['name'], print_r($_POST, true) . print_r($xml, true), 'Successful');
    $invoiceid = checkCbInvoiceID($xml->reference, $GATEWAY["name"]);
    checkCbTransID($xml->code);
    if ($xml->status == 3 || $xml->status == 4) {
        addInvoicePayment($invoiceid, $xml->code, (double) $xml->grossAmount, 0, 'pagseguroapilite');
    }
}
开发者ID:andrebellafronte,项目名称:whmcs-pagseguro-api-lite,代码行数:31,代码来源:pagseguroapilite.php


示例10: getGatewayVariables

<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("egold");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
$invoiceid = checkCbInvoiceID($invoiceid, "E-Gold");
checkCbTransID($_POST['PAYMENT_BATCH_NUM']);
addInvoicePayment($invoiceid, $_POST['PAYMENT_BATCH_NUM'], $_POST['PAYMENT_AMOUNT'], "", "egold");
logTransaction("E-Gold", $_REQUEST, "Successful");
header("HTTP/1.1 200 OK");
header("Status: 200 OK");
开发者ID:billyprice1,项目名称:whmcs,代码行数:25,代码来源:egold.php


示例11: paypal_email_trim

 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
function paypal_email_trim($value)
{
    $value = trim($value);
}
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("paypal");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
$postipn = "cmd=_notify-validate";
$orgipn = "";
foreach ($_POST as $key => $value) {
    $orgipn .= "" . $key . " => " . $value . "\r\n";
    $postipn .= "&" . $key . "=" . urlencode(html_entity_decode($value, ENT_QUOTES));
}
$reply = curlCall("https://www.paypal.com/cgi-bin/webscr", $postipn);
if (!strcmp($reply, "VERIFIED")) {
} else {
    if (!strcmp($reply, "INVALID")) {
        logTransaction("PayPal", $orgipn, "IPN Handshake Invalid");
        header("HTTP/1.0 406 Not Acceptable");
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:paypal.php


示例12: getGatewayVariables

<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("payza");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
if ($GATEWAY['type'] == "on") {
    $ipnv2handlerurl = "https://sandbox.payza.com/sandbox/ipn2.ashx";
} else {
    $ipnv2handlerurl = "https://secure.payza.com/ipn2.ashx";
}
$token = "token=" . urlencode($_POST['token']);
$response = "";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $ipnv2handlerurl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $token);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:payza.php


示例13: addInvoicePayment

        addInvoicePayment($invoiceid, $resultsarray["Transaction ID"], "", "", "authorizeecheck");
        logTransaction("Authorize.net Echeck", $debugreport, "Successful");
        echo "<p align=\"center\"><a href=\"#\" onclick=\"window.opener.refresh();window.close();\">Click here to close the window</a></p>\n<script language=\"javascript\">\nwindow.opener.refresh();\nwindow.close();\n</script>";
        return null;
    }
    $errormessage .= "<li>The echeck payment attempt was declined. Please check the supplied details";
    logTransaction("Authorize.net Echeck", $debugreport, "Failed");
}
$GATEWAYMODULE['authorizeecheckname'] = "authorizeecheck";
$GATEWAYMODULE['authorizeecheckvisiblename'] = "Authorize.net Echeck";
$GATEWAYMODULE['authorizeechecktype'] = "Invoices";
if (isset($_GET['invoiceid'])) {
    require "../../init.php";
    $whmcs->load_function("gateway");
    $whmcs->load_function("invoice");
    $GATEWAY = getGatewayVariables("authorizeecheck");
    if (!$GATEWAY['type']) {
        exit("Module Not Activated");
    }
    $where = array("id" => (int) $_GET['invoiceid'], "paymentmethod" => "authorizeecheck");
    if (!isset($_SESSION['adminid'])) {
        $where['userid'] = $_SESSION['uid'];
    }
    $invoiceid = get_query_val("tblinvoices", "id", $where);
    if (!$invoiceid) {
        exit("Access Denied");
    }
    echo "<html>\n<head>\n<title>Echeck Payment</title>\n";
    echo "<s";
    echo "tyle>\nbody,td,input {\n    font-family: Tahoma;\n    font-size: 11px;\n}\nh1 {\n    font-family: Tahoma;\n    font-weight: normal;\n    font-size: 18px;\n    color: #000066;\n}\n</style>\n</head>\n<body>\n\n<h1>Echeck Payment</h1>\n\n";
    if ($submit) {
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:authorizeecheck.php


示例14: getGatewayVariables

<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("paypalexpress");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
$token = "";
if (isset($_REQUEST['token'])) {
    $token = $_REQUEST['token'];
}
if (!$token) {
    logTransaction("PayPal Express Callback", $_REQUEST, "Missing Token");
    exit;
}
$postfields = array();
$postfields['TOKEN'] = $token;
$results = paypalexpress_api_call($GATEWAY, "GetExpressCheckoutDetails", $postfields);
$ack = strtoupper($results['ACK']);
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:paypalexpress.php


示例15: getGatewayVariables

<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("nochex");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
if (!isset($_POST)) {
    $_POST =& $HTTP_POST_VARS;
}
foreach ($_POST as $key => $value) {
    $values[] = $key . "=" . urlencode($value);
}
$work_string = @implode("&", $values);
$url = "https://www.nochex.com/nochex.dll/apc/apc";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDSIZE, 0);
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:nochex.php


示例16: define_var

 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
function define_var($params)
{
    $url_retorno = $params['url_retorno'];
    return $url_retorno;
}
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("moipapi");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
if (!function_exists("log_var")) {
    function log_var($var, $name = "", $to_file = false)
    {
        if ($to_file == true) {
            $txt = @fopen("debug.txt", "a");
            if ($txt) {
                fwrite($txt, "-----------------------------------\r\n");
                fwrite($txt, $name . "\r\n");
                fwrite($txt, print_r($var, true) . "\r\n");
                fclose($txt);
                return null;
            }
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:moipapi.php


示例17: dirname

/**
 * GoCardless WHMCS module
 *
 * @author WHMCS <[email protected]>
 * @version 1.0.4
 */
# load all required files
$whmcsdir = dirname(__FILE__) . '/../../../';
require_once $whmcsdir . 'dbconnect.php';
require_once $whmcsdir . '/includes/functions.php';
require_once $whmcsdir . '/includes/gatewayfunctions.php';
require_once $whmcsdir . '/includes/invoicefunctions.php';
require_once $whmcsdir . '/modules/gateways/gocardless.php';
# get gateway params using WHMCS getGatewayVariables method
$gateway = getGatewayVariables('gocardless');
# sanity check to ensure module is active
if (!$gateway['type']) {
    die("Module Not Activated");
}
# set relevant API information for GoCardless module
gocardless_set_account_details($gateway);
# get the raw contents of the callback and decode JSON
$webhook = file_get_contents('php://input');
$webhook_array = json_decode($webhook, true);
# validate the webhook by verifying the integrity of the payload with GoCardless
if (GoCardless::validate_webhook($webhook_array['payload']) !== true) {
    # we could not validate the web hook
    header('HTTP/1.1 400 Bad Request');
    exit(__LINE__ . ': Payload could not be verified');
}
开发者ID:carriercomm,项目名称:gocardless-whmcs,代码行数:30,代码来源:callback.php


示例18: getGatewayVariables

<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("quantumvault");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
$invoiceid = checkCbInvoiceID($_REQUEST['ID'], "Quantum Vault");
$transid = $_REQUEST['transID'];
$transresult = $_REQUEST['trans_result'];
$amount = $_REQUEST['amount'];
$md5_hash = $_REQUEST['md5_hash'];
$vaultid = $_REQUEST['cust_id'];
checkCbTransID($transid);
$ourhash = md5($GATEWAY['md5hash'] . $GATEWAY['loginid'] . $transid . $amount);
if ($ourhash != $md5_hash) {
    logTransaction("Quantum Vault", $_REQUEST, "MD5 Hash Failure");
    echo "Hash Failure. Please Contact Support.";
    exit;
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:quantumvault.php


示例19: getGatewayVariables

<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$GATEWAY = getGatewayVariables("quantumgateway");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
$invoiceid = $_REQUEST['ID'];
$transid = $_REQUEST['transID'];
$transresult = $_REQUEST['trans_result'];
$amount = $_REQUEST['amount'];
$md5_hash = $_REQUEST['md5_hash'];
checkCbTransID($transid);
$ourhash = md5($GATEWAY['md5hash'] . $GATEWAY['loginid'] . $transid . $amount);
if ($ourhash != $md5_hash) {
    logTransaction("Quantum Gateway", $_REQUEST, "MD5 Hash Failure");
    echo "Hash Failure. Please Contact Support.";
    exit;
}
开发者ID:billyprice1,项目名称:whmcs,代码行数:31,代码来源:quantumthreedsecure.php


示例20: define

<?php

# Required File Includes
include "../../../init.php";
$whmcs->load_function('gateway');
$whmcs->load_function('invoice');
define('PW_WHMCS_ITEM_TYPE_HOSTING', 'Hosting');
require_once ROOTDIR . "/includes/api/paymentwall_api/lib/paymentwall.php";
$gateway = getGatewayVariables("paymentwall");
if (!$gateway["type"]) {
    die("Module Not Activated");
}
Paymentwall_Config::getInstance()->set(array('api_type' => Paymentwall_Config::API_GOODS, 'public_key' => $gateway['appKey'], 'private_key' => $gateway['secretKey']));
$pingback = new Paymentwall_Pingback($_GET, $_SERVER['REMOTE_ADDR']);
$invoiceid = checkCbInvoiceID($pingback->getProductId(), $gateway["name"]);
if ($invoiceid && $pingback->validate()) {
    $orderData = mysql_fetch_assoc(select_query('tblorders', 'userid,id', array("invoiceid" => $invoiceid)));
    $userData = mysql_fetch_assoc(select_query('tblclients', 'email, firstname, lastname, country, address1, state, phonenumber, postcode, city, id', array("id" => $orderData['userid'])));
    if ($pingback->isDeliverable()) {
        processDeliverable($invoiceid, $pingback, $gateway, $userData, $orderData);
    } elseif ($pingback->isCancelable()) {
        // WHMCS not supported
        logTransaction($gateway["name"], $_GET, "Not Supported");
        die("Not Supported");
    } else {
        switch ($pingback->getType()) {
            /*
            case Paymentwall_Pingback::PINGBACK_TYPE_SUBSCRIPTION_EXPIRED:
            case Paymentwall_Pingback::PINGBACK_TYPE_SUBSCRIPTION_PAYMENT_FAILED:
                // Do not process transaction
                break;
开发者ID:fanytest,项目名称:module-whmcs,代码行数:31,代码来源:paymentwall.php



注:本文中的getGatewayVariables函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getGet函数代码示例发布时间:2022-05-15
下一篇:
PHP getGalleryTitle函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap