コード例 #1
0
ファイル: fn.cart.php プロジェクト: heg-arc-ne/cscart
/**
 * Check if store can use processor script
 *
 * @param string $processor name of processor script
 * @param string $area current working area
 * @return bool
 */
function fn_check_prosessor_status($processor, $area = AREA)
{
    $is_active = false;
    $processor = fn_get_processor_data_by_name($processor . '.php');
    if (!empty($processor)) {
        $payments = fn_get_payment_by_processor($processor['processor_id']);
        if (!empty($payments)) {
            foreach ($payments as $payment) {
                if ($payment['status'] == 'A' || $area == 'A') {
                    // admin can use disable payments
                    $is_active = true;
                }
            }
        }
    }
    return $is_active;
}
コード例 #2
0
ファイル: vsevcredit.php プロジェクト: ambient-lounge/site
* license  and  accept  to the terms of the  License Agreement can install *
* and use this program.                                                    *
*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
// rus_build_pack dbazhenov
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if (defined('PAYMENT_NOTIFICATION')) {
    if ($mode == 'notify') {
        if (isset($_REQUEST['hash']) && isset($_REQUEST['type'])) {
            $processor_data = fn_get_processor_data_by_name('vsevcredit.php');
            $payment_data = fn_get_payment_by_processor($processor_data['processor_id']);
            $payment_data = reset($payment_data);
            $payment_params = fn_get_payment_method_data($payment_data['payment_id']);
            $secret_word = $payment_params['processor_params']['vvc_secret'];
            if ($_REQUEST['type'] == 'user') {
                if (md5($_REQUEST['user_code'] . $_REQUEST['email'] . $secret_word) === $_REQUEST['hash']) {
                    //For the anonymous checkout
                    die(0);
                }
            } elseif ($_REQUEST['type'] == 'order_status') {
                if (isset($_REQUEST['order_id']) && isset($_REQUEST['type']) && $_REQUEST['type'] != 'user') {
                    $order_id = (int) $_REQUEST['order_id'];
                    $order_info = fn_get_order_info($order_id);
                } else {
                    die('Access denied');
                }