当前位置: 首页>>代码示例>>PHP>>正文


PHP fn_get_processor_data函数代码示例

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


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

示例1: fn_rus_payments_change_order_status

function fn_rus_payments_change_order_status(&$status_to, &$status_from, &$order_info, &$force_notification, &$order_statuses, &$place_order)
{
    $processor_data = fn_get_processor_data($order_info['payment_id']);
    $payment_info = $order_info['payment_info'];
    if (!empty($processor_data['processor']) && $processor_data['processor'] == 'Yandex.Money' && !empty($payment_info['yandex_postponed_payment'])) {
        try {
            $cert = $processor_data['processor_params']['certificate_filename'];
            $mws_client = new MWSClient();
            $mws_client->authenticate(array('pkcs12_file' => Registry::get('config.dir.certificates') . $cert, 'pass' => $processor_data['processor_params']['p12_password'], 'is_test_mode' => $processor_data['processor_params']['mode'] == 'test'));
            if ($status_to == $processor_data['processor_params']['confirmed_order_status']) {
                $mws_client->confirmPayment($payment_info['yandex_invoice_id'], $order_info['total']);
                $payment_info['yandex_confirmed_time'] = date('c');
                $payment_info['yandex_postponed_payment'] = false;
            } elseif ($status_to == $processor_data['processor_params']['canceled_order_status']) {
                $mws_client->cancelPayment($payment_info['yandex_invoice_id']);
                $payment_info['yandex_canceled_time'] = date('c');
                $payment_info['yandex_postponed_payment'] = false;
            }
            $payment_info['order_status'] = $status_to;
            fn_update_order_payment_info($order_info['order_id'], $payment_info);
            $order_info['payment_info'] = $payment_info;
        } catch (\Exception $e) {
            fn_set_notification('E', __('error'), __('addons.rus_payments.yandex_money_mws_operation_error'));
            return $status_to = $status_from;
        }
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:27,代码来源:func.php

示例2: fn_paypal_get_checkout_payment_buttons

function fn_paypal_get_checkout_payment_buttons(&$cart, &$cart_products, &$auth, &$checkout_buttons, &$checkout_payments, &$payment_id)
{
    $processor_data = fn_get_processor_data($payment_id);
    if (!empty($processor_data) && empty($checkout_buttons[$payment_id]) && Registry::get('runtime.mode') == 'cart') {
        $checkout_buttons[$payment_id] = '
            <form name="pp_express" action="' . fn_payment_url('current', 'paypal_express.php') . '" method="post">
            <input name="payment_id" value="' . $payment_id . '" type="hidden" />
            <input src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-small.png" type="image" />
            <input name="mode" value="express" type="hidden" />
            </form>';
    }
}
开发者ID:askzap,项目名称:ultimate,代码行数:12,代码来源:func.php

示例3: smarty_block_paynl_banks

function smarty_block_paynl_banks($params, $content, &$smarty, &$repeat)
{
    $repeat = false;
    $processor_data = fn_get_processor_data($_SESSION['cart']['payment_id']);
    if ($processor_data['processor_params']['optionId'] == 10) {
        require_once DIR_ROOT . '/app/addons/paynl_addon/func.php';
        $banks = fn_get_ideal_banks($processor_data);
        $banksHtml = "<select name='paymentOptionbSubId' >";
        $banksHtml .= "<option value=''>Kies uw bank...</option>";
        foreach ($banks as $bank) {
            $banksHtml .= "<option value='" . $bank['id'] . "'>" . $bank['name'] . "</option>";
        }
        $banksHtml .= "</select><br /><br /><br /><br />";
        return $banksHtml;
    } else {
        return '';
    }
}
开发者ID:paynl,项目名称:cscart-plugin,代码行数:18,代码来源:block.paynl_banks.php

示例4: array

     if ($mode == 'validate_secret_word') {
         if (!empty($_REQUEST['email']) && !empty($_REQUEST['payment_id']) && !empty($_REQUEST['cust_id']) && !empty($_REQUEST['secret'])) {
             $processor_params['pay_to_email'] = $_REQUEST['email'];
             $get_data = array();
             $get_data['email'] = $_REQUEST['email'];
             $get_data['cust_id'] = $master_account_cust_id;
             $get_data['secret'] = md5(md5($_REQUEST['secret']) . md5($master_account_secret_word));
             $result = Http::get("https://www.skrill.com/app/secret_word_check.pl", $get_data);
             $result_array = explode(',', $result);
             if ($result_array[0] == 'OK') {
                 fn_set_notification('N', __('notice'), __('text_skrill_secret_word_is_correct'));
             } else {
                 fn_set_notification('E', __('error'), __('text_skrill_secret_word_is_incorrect', array('[date]' => date('m.d.Y'))));
             }
             $processor_params['secret_word'] = $_REQUEST['secret'];
             $old_processor_data = fn_get_processor_data($_REQUEST['payment_id']);
             $old_processor_param = empty($old_processor_data['processor_params']) ? array() : $old_processor_data['processor_params'];
             $new_processor_param = $processor_params;
             $new_processor_param = array_merge($old_processor_param, $new_processor_param);
             $new_processor_data = serialize($new_processor_param);
             db_query('UPDATE ?:payments SET processor_params = ?s WHERE payment_id = ?i', $new_processor_data, $_REQUEST['payment_id']);
             Tygh::$app['ajax']->assign('secret_word_' . $_REQUEST['payment_id'], $processor_params['secret_word']);
         }
     }
     if ($mb_exit_needed) {
         exit;
     }
 }
 $pp_response = array();
 if ($mode == 'return') {
     if (!empty($_REQUEST['iframe_mode'])) {
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:skrill_ewallet.php

示例5: die

****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
use Tygh\Http;
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if (defined('PAYMENT_NOTIFICATION')) {
    if ($mode == 'frame' && !empty(Tygh::$app['session']['cmpi']['acs_url'])) {
        fn_create_payment_form(Tygh::$app['session']['cmpi']['acs_url'], Tygh::$app['session']['cmpi']['frame_data'], 'Card Issuer', false, 'post', false);
        exit;
    } elseif ($mode == 'bank' && !empty(Tygh::$app['session']['cmpi']['order_id'])) {
        $order_info = fn_get_order_info(Tygh::$app['session']['cmpi']['order_id']);
        $processor_data = fn_get_processor_data($order_info['payment_method']['payment_id']);
        $payment_name = str_replace('.php', '', $processor_data['processor_script']);
        Tygh::$app['session']['cmpi']['pares'] = !empty($_REQUEST['PaRes']) ? $_REQUEST['PaRes'] : '';
        $sess = Tygh::$app['session']->getName() . '=' . Tygh::$app['session']->getID();
        $src = fn_url("payment_notification.auth?payment={$payment_name}&{$sess}", AREA, 'current');
        $msg = __('text_cc_processor_connection', array('[processor]' => '3-D Secure server'));
        fn_create_payment_form($src, array(), '3-D Secure', false, 'get', false, 'parent');
        exit;
    } elseif ($mode == 'auth' && !empty(Tygh::$app['session']['cmpi']['order_id'])) {
        $view = Tygh::$app['view'];
        $view->assign('order_action', __('placing_order'));
        $view->display('views/orders/components/placing_order.tpl');
        fn_flush();
        fn_cmpi_authenticate();
        if (Tygh::$app['session']['cmpi']['signature'] == 'Y' && in_array(Tygh::$app['session']['cmpi']['pares'], array('Y', 'A', 'U'))) {
            define('DO_DIRECT_PAYMENT', true);
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:cmpi.php

示例6: die

* and use this program.                                                    *
*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if (defined('PAYMENT_NOTIFICATION')) {
    $pp_response = array();
    $order_id = intval($_REQUEST['order_id']);
    if ($mode == 'accept') {
        $payment_id = db_get_field("SELECT payment_id FROM ?:orders WHERE order_id=?i", $order_id);
        $processor_data = fn_get_processor_data($payment_id);
        $amount = db_get_field("SELECT total FROM ?:orders WHERE order_id=?i", $order_id);
        $amount = str_replace('.', '', $amount);
        $_REQUEST['fee'] = !empty($_REQUEST['fee']) ? $_REQUEST['fee'] : 0;
        $amount_with_fee = $amount + $_REQUEST['fee'];
        if (!empty($_REQUEST['transact'])) {
            $key = md5($processor_data['processor_params']['key2'] . md5($processor_data['processor_params']['key1'] . 'transact=' . $_REQUEST['transact'] . '&amount=' . $amount . '&currency=' . $processor_data['processor_params']['currency']));
            $key_with_fee = md5($processor_data['processor_params']['key2'] . md5($processor_data['processor_params']['key1'] . 'transact=' . $_REQUEST['transact'] . '&amount=' . $amount_with_fee . '&currency=' . $processor_data['processor_params']['currency']));
        }
        if (!empty($_REQUEST['transact']) && ($_REQUEST['authkey'] == $key || $_REQUEST['authkey'] == $key_with_fee)) {
            $pp_response['order_status'] = 'P';
            $pp_response['reason_text'] = __('transaction_approved');
            $pp_response['transaction_id'] = $_REQUEST['transact'];
        } else {
            $pp_response['order_status'] = 'F';
            $pp_response['reason_text'] = __('transaction_declined');
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:31,代码来源:dibs.php

示例7: fn_get_checkout_payment_buttons

function fn_get_checkout_payment_buttons(&$cart, &$cart_products, &$auth)
{
    $checkout_buttons = array();
    fn_set_hook('get_checkout_payment_buttons_pre', $cart, $cart_products, $auth, $checkout_buttons);
    if (Registry::get('settings.General.disable_anonymous_checkout') == 'Y' && empty($auth['user_id'])) {
        $url = fn_url("auth.login_form?return_url=" . urlencode(fn_url('checkout.cart')));
        return array(__('payments.signin_to_checkout', array("[url]" => $url)));
    }
    $ug_condition = 'AND (' . fn_find_array_in_set($auth['usergroup_ids'], 'b.usergroup_ids', true) . ')';
    $checkout_payments = db_get_fields("SELECT b.payment_id FROM ?:payment_processors as a LEFT JOIN ?:payments as b ON a.processor_id = b.processor_id WHERE a.type != 'P' AND b.status = 'A' ?p", $ug_condition);
    if (!empty($checkout_payments)) {
        foreach ($checkout_payments as $_payment_id) {
            fn_set_hook('get_checkout_payment_buttons', $cart, $cart_products, $auth, $checkout_buttons, $checkout_payments, $_payment_id);
            $processor_data = fn_get_processor_data($_payment_id);
            if (!empty($processor_data['processor_script']) && file_exists(Registry::get('config.dir.payments') . $processor_data['processor_script'])) {
                include Registry::get('config.dir.payments') . $processor_data['processor_script'];
            }
        }
    }
    fn_set_hook('get_checkout_payment_buttons_post', $cart, $cart_products, $auth, $checkout_buttons);
    return $checkout_buttons;
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:22,代码来源:fn.cart.php

示例8: die

use Tygh\Registry;
include_once 'encdec_paytm.php';
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
// Handling response from paytm
if (defined('PAYMENT_NOTIFICATION')) {
    $joint_order_id = explode("-", $_POST['ORDERID']);
    $order_id = $joint_order_id[0];
    $res_code = $_POST['RESPCODE'];
    $res_desc = $_POST['RESPMSG'];
    $checksum_recv = $_POST['CHECKSUMHASH'];
    $paramList = $_POST;
    if (fn_check_payment_script('paytm.php', $order_id, $processor_data)) {
        if (empty($processor_data)) {
            $processor_data = fn_get_processor_data($order_info['email']);
        }
        $secret_key = $processor_data["processor_params"]['secret_key'];
        $bool = "FALSE";
        $bool = verifychecksum_e($paramList, $secret_key, $checksum_recv);
        $paytmTxnIdText = "";
        if (isset($_POST['TXNID']) && !empty($_POST['TXNID'])) {
            $paytmTxnIdText = " Paytm Transaction Id : " . $_POST['TXNID'];
        }
        if (!empty($order_id)) {
            if (fn_check_payment_script('paytm.php', $order_id, $processor_data)) {
                $pp_response = array();
                $order_info = fn_get_order_info($order_id);
                if ($bool == "TRUE") {
                    if ($_REQUEST['RESPCODE'] == 01) {
                        $pp_response['order_status'] = 'P';
开发者ID:Paytm-Payments,项目名称:Paytm_CS-Cart_v4.0_Kit,代码行数:31,代码来源:paytm.php

示例9: fn_get_checkout_payment_buttons

function fn_get_checkout_payment_buttons(&$cart, &$cart_products, &$auth)
{
    $checkout_buttons = array();
    $ug_condition = 'AND (' . fn_find_array_in_set($auth['usergroup_ids'], 'b.usergroup_ids', true) . ')';
    $checkout_payments = db_get_fields("SELECT b.payment_id FROM ?:payment_processors as a LEFT JOIN ?:payments as b ON a.processor_id = b.processor_id WHERE a.type != 'P' AND b.status = 'A' ?p", $ug_condition);
    if (!empty($checkout_payments)) {
        foreach ($checkout_payments as $_payment_id) {
            $processor_data = fn_get_processor_data($_payment_id);
            if (!empty($processor_data['processor_script']) && file_exists(DIR_PAYMENT_FILES . $processor_data['processor_script'])) {
                include DIR_PAYMENT_FILES . $processor_data['processor_script'];
            }
        }
    }
    return $checkout_buttons;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:15,代码来源:checkout.php

示例10: fn_check_processor_script

/**
 *
 * @param int $payment_id payment ID
 * @param string $action action 
 * @return array (boolean, string) 
 */
function fn_check_processor_script($payment_id, $action, $additional_params = false)
{
    if ($additional_params) {
        if ($action == 'save' || !empty($_REQUEST['skip_payment']) && AREA == 'C') {
            return array(false, '');
        }
    }
    $payment = fn_get_payment_method_data((int) $payment_id);
    if (!empty($payment['processor_id'])) {
        $processor_data = fn_get_processor_data($payment['payment_id']);
        if (!empty($processor_data['processor_script']) && file_exists(DIR_PAYMENT_FILES . $processor_data['processor_script'])) {
            return array(true, $processor_data);
        }
    }
    return array(false, '');
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:22,代码来源:fn.cart.php

示例11: fn_paypal_get_checkout_payment_buttons

function fn_paypal_get_checkout_payment_buttons(&$cart, &$cart_products, &$auth, &$checkout_buttons, &$checkout_payments, &$payment_id)
{
    $processor_data = fn_get_processor_data($payment_id);
    if ($processor_data['processor_script'] !== 'paypal_express.php') {
        return;
    }
    $form_url = fn_url('paypal_express.express');
    if (!empty($processor_data) && empty($checkout_buttons[$payment_id]) && Registry::get('runtime.mode') == 'cart') {
        $merchant_id = $processor_data['processor_params']['merchant_id'];
        if (isset($processor_data['processor_params']['in_context']) && $processor_data['processor_params']['in_context'] == 'Y' && $merchant_id && !\Tygh\Embedded::isEnabled()) {
            $environment = $processor_data['processor_params']['mode'] == 'live' ? 'production' : 'sandbox';
            if ($environment == 'sandbox') {
                fn_set_cookie('PPDEBUG', true);
            }
            $checkout_buttons[$payment_id] = '
                <form name="pp_express" id="pp_express_' . $payment_id . '" action="' . $form_url . '" method="post">
                    <input name="payment_id" value="' . $payment_id . '" type="hidden" />
                </form>
                <script type="text/javascript">
                    (function(_, $) {
                        if (window.paypalCheckoutReady) {
                            $.redirect(_.current_url);
                        } else {
                            window.paypalCheckoutReady = function() {
                                paypal.checkout.setup("' . $merchant_id . '", {
                                    environment: "' . $environment . '",
                                    container: "pp_express_' . $payment_id . '",
                                    click: function(e) {
                                        e.preventDefault();
                                        paypal.checkout.initXO();

                                        $.ceAjax("request", "' . $form_url . '", {
                                            method: "post",
                                            data: {
                                                in_context: 1,
                                                payment_id: "' . $payment_id . '"
                                            },
                                            callback: function(response) {
                                                var data = JSON.parse(response.text);
                                                if (data.token) {
                                                    var url = paypal.checkout.urlPrefix + data.token;
                                                    paypal.checkout.startFlow(url);
                                                }
                                                if (data.error) {
                                                    paypal.checkout.closeFlow();
                                                }
                                            }
                                        });
                                    }
                                });
                            };
                        }
                        $.getScript("//www.paypalobjects.com/api/checkout.js");
                    })(Tygh, Tygh.$);
                </script>
            ';
        } else {
            $checkout_buttons[$payment_id] = '
                <form name="pp_express" id="pp_express" action="' . $form_url . '" method="post">
                    <input name="payment_id" value="' . $payment_id . '" type="hidden" />
                    <input src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-small.png" type="image" />
                </form>
            ';
        }
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:66,代码来源:func.php

示例12: die

* and use this program.                                                    *
*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
use Tygh\Registry;
use Tygh\Http;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if (defined('PAYMENT_NOTIFICATION')) {
    if ($mode == 'rbx_get_currencies') {
        if (!empty($_REQUEST['merchantid'])) {
            if (!empty($_REQUEST['payment_id'])) {
                $processor_data = fn_get_processor_data((int) $_REQUEST['payment_id']);
                $url = $processor_data['processor_params']['mode'] == 'live' ? 'https://merchant.roboxchange.com/' : 'http://test.robokassa.ru/';
                Registry::get('view')->assign('processor_params', $processor_data['processor_params']);
            } else {
                $url = 'http://test.robokassa.ru/';
            }
            $url = $url . 'WebService/Service.asmx/GetCurrencies?MerchantLogin=' . $_REQUEST['merchantid'] . '&Language=' . CART_LANGUAGE;
            $data_currencies = Http::get($url);
            $xml = @simplexml_load_string($data_currencies);
            $result = array();
            if (isset($xml->Groups->Group)) {
                foreach ($xml->Groups->Group as $group) {
                    $key = strval($group->attributes()->Description);
                    foreach ($group->Items->Currency as $currency) {
                        $sub_key = strval($currency->attributes()->Label);
                        $cur_name = strval($currency->attributes()->Name);
开发者ID:askzap,项目名称:ask-zap,代码行数:31,代码来源:robokassa.php


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