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

PHP fn_get_payment_method_data函数代码示例

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

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



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

示例1: fn_payment_dependencies_checkout_select_default_payment_method

function fn_payment_dependencies_checkout_select_default_payment_method(&$cart, &$payment_methods, &$completed_steps)
{
    $available_payment_ids = array();
    foreach ($payment_methods as $group) {
        foreach ($group as $method) {
            $available_payment_ids[] = $method['payment_id'];
        }
    }
    // Change default payment if it doesn't exists
    if (floatval($cart['total']) != 0 && !in_array($cart['payment_id'], $available_payment_ids)) {
        $cart['payment_id'] = reset($available_payment_ids);
        $cart['payment_method_data'] = fn_get_payment_method_data($cart['payment_id']);
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:14,代码来源:func.php


示例2: index

 public function index($id = 0, $params = array())
 {
     $lang_code = $this->safeGet($params, 'lang_code', DEFAULT_LANGUAGE);
     if (!empty($id)) {
         $data = fn_get_payment_method_data($id, $lang_code);
         if (empty($data)) {
             $status = Response::STATUS_NOT_FOUND;
         } else {
             $status = Response::STATUS_OK;
         }
     } else {
         $items_per_page = $this->safeGet($params, 'items_per_page', Registry::get('settings.Appearance.admin_elements_per_page'));
         $page = $this->safeGet($params, 'page', 1);
         $data = fn_get_payments($lang_code);
         if ($items_per_page) {
             $data = array_slice($data, ($page - 1) * $items_per_page, $items_per_page);
         }
         $data = array('payments' => $data, 'params' => array('items_per_page' => $items_per_page, 'page' => $page, 'total_items' => count($data)));
         $status = Response::STATUS_OK;
     }
     return array('status' => $status, 'data' => $data);
 }
开发者ID:askzap,项目名称:ultimate,代码行数:22,代码来源:Payments.php


示例3: die

* 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.            *
****************************************************************************/
use Tygh\Http;
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if (defined('PAYMENT_NOTIFICATION')) {
    if ($mode == 'notify') {
        $order_id = strpos($_REQUEST['MerchantReference'], '_') ? substr($_REQUEST['MerchantReference'], 0, strpos($_REQUEST['MerchantReference'], '_')) : $_REQUEST['MerchantReference'];
        $order_info = fn_get_order_info($order_id);
        $processor_data = fn_get_payment_method_data($order_info['payment_id']);
        $pp_response = array();
        $pp_response['transaction_id'] = $_REQUEST['TransactionId'];
        $pp_response['transaction_datetime'] = $_REQUEST['TransactionDateTime'];
        $pp_response['reason_text'] = $_REQUEST['ResponseDescription'];
        if ($_REQUEST['ResultCode'] == 0) {
            if ($_REQUEST['StatusFlag'] == 'Success' && in_array($_REQUEST['ResponseCode'], array('00', '08', '10', '11', '16'))) {
                $tran_ticket = db_get_field("SELECT data FROM ?:order_data WHERE type = 'E' AND order_id = ?i", $order_id);
                $cart_hashkey_str = $tran_ticket . $processor_data['processor_params']['posid'] . $processor_data['processor_params']['acquirerid'] . $_REQUEST['MerchantReference'] . $_REQUEST['ApprovalCode'] . $_REQUEST['Parameters'] . $_REQUEST['ResponseCode'] . $_REQUEST['SupportReferenceID'] . $_REQUEST['AuthStatus'] . $_REQUEST['PackageNo'] . $_REQUEST['StatusFlag'];
                $cart_hashkey = strtoupper(hash('sha256', $cart_hashkey_str));
                if ($cart_hashkey == $_REQUEST['HashKey']) {
                    $pp_response['order_status'] = 'P';
                    db_query("DELETE FROM ?:order_data WHERE type = 'E' AND order_id = ?i", $order_id);
                    if (!empty($_REQUEST['SupportReferenceID'])) {
                        $pp_response['reason_text'] .= '; SupportReferenceID: ' . $_REQUEST['SupportReferenceID'];
                    }
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:piraeus.php


示例4: fn_paypal_set_express_checkout

function fn_paypal_set_express_checkout($payment_id, $order_id = 0, $order_info = array(), $cart = array(), $area = AREA)
{
    $processor_data = fn_get_payment_method_data($payment_id);
    if (!empty($order_id)) {
        $return_url = fn_url("payment_notification.notify?payment=paypal_express&order_id={$order_id}", $area, 'current');
        $cancel_url = fn_url("payment_notification.cancel?payment=paypal_express&order_id={$order_id}", $area, 'current');
    } else {
        $return_url = fn_payment_url('current', "paypal_express.php?mode=express_return&payment_id={$payment_id}");
        $cancel_url = fn_url("checkout.cart", $area, 'current');
    }
    $request = array('PAYMENTREQUEST_0_PAYMENTACTION' => 'SALE', 'PAYMENTREQUEST_0_CURRENCYCODE' => $processor_data['processor_params']['currency'], 'LOCALECODE' => CART_LANGUAGE, 'RETURNURL' => $return_url, 'CANCELURL' => $cancel_url, 'METHOD' => 'SetExpressCheckout', 'SOLUTIONTYPE' => 'Sole');
    if (isset($_SESSION['paypal_token'])) {
        $request['IDENTITYACCESSTOKEN'] = $_SESSION['paypal_token'];
    }
    $paypal_settings = fn_get_paypal_settings();
    if (!empty($paypal_settings) && !empty($paypal_settings['main_pair']['detailed'])) {
        $request['LOGOIMG'] = !empty($paypal_settings['main_pair']['detailed']['http_image_path']) ? $paypal_settings['main_pair']['detailed']['http_image_path'] : $paypal_settings['main_pair']['detailed']['image_path'];
        $exploded_logo = explode('?', $request['LOGOIMG']);
        $request['LOGOIMG'] = $exploded_logo[0];
    }
    fn_paypal_build_request($processor_data, $request, $post_url, $cert_file);
    $order_details = !empty($order_info) ? fn_paypal_build_details($order_info, $processor_data, false) : fn_paypal_build_details($cart, $processor_data);
    $request = array_merge($request, $order_details);
    if (!empty($order_info)) {
        //We need to minus taxes when it based on unit price because product subtotal already include this tax.
        if (Registry::get('settings.General.tax_calculation') == 'unit_price') {
            $sum_taxes = fn_paypal_sum_taxes($order_info);
            $request['PAYMENTREQUEST_0_ITEMAMT'] -= $sum_taxes['P'];
            $request['PAYMENTREQUEST_0_SHIPPINGAMT'] -= $sum_taxes['S'];
        }
    }
    $result = fn_paypal_request($request, $post_url, $cert_file);
    return $result;
}
开发者ID:askzap,项目名称:ultimate,代码行数:34,代码来源:paypal_express.functions.php


示例5: processPaymentCertificates

 public static function processPaymentCertificates($store_data)
 {
     $payment_methods = db_get_array('SELECT p.payment_id, pp.* FROM ?:payments p, ?:payment_processors pp WHERE pp.processor_id = p.processor_id AND p.processor_id != 0');
     $certificates_dir = Registry::get('config.dir.certificates');
     foreach ($payment_methods as $payment_method) {
         if (in_array($payment_method['processor_script'], array('paypal_express.php', 'paypal_pro.php', 'qbms.php'))) {
             $payment_data = fn_get_payment_method_data($payment_method['payment_id']);
             $certificate_filename = '';
             if (isset($payment_data['processor_params']['certificate_filename'])) {
                 $certificate_filename = $payment_data['processor_params']['certificate_filename'];
             } elseif (isset($payment_data['processor_params']['certificate'])) {
                 $certificate_filename = $payment_data['processor_params']['certificate'];
             }
             if ($certificate_filename) {
                 $filename = $payment_method['payment_id'] . '/' . $certificate_filename;
                 $old_certificate_file = $store_data['path'] . '/payments/certificates/' . $certificate_filename;
                 if (file_exists($old_certificate_file)) {
                     fn_mkdir($certificates_dir . $payment_method['payment_id']);
                     fn_copy($old_certificate_file, $certificates_dir . $filename);
                 } else {
                     $filename = '';
                 }
                 $payment_data['processor_params']['certificate_filename'] = $filename;
                 fn_update_payment($payment_data, $payment_method['payment_id']);
             }
         }
     }
 }
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:28,代码来源:General.php


示例6: fn_checkout_place_order

/**
 * Place order handler
 *
 * @param  array $cart   Cart
 * @param  array $auth   Auth
 * @param  array $params Params
 * @return str
 */
function fn_checkout_place_order(&$cart, &$auth, $params)
{
    // Prevent unauthorized access
    if (empty($cart['user_data']['email'])) {
        return PLACE_ORDER_STATUS_DENIED;
    }
    // Prevent using disabled payment method by challenging HTTP data
    if (!empty($params['payment_id'])) {
        $cart['payment_id'] = $params['payment_id'];
    }
    if (isset($cart['payment_id'])) {
        $payment_method_data = fn_get_payment_method_data($cart['payment_id']);
        if (!empty($payment_method_data['status']) && $payment_method_data['status'] != 'A') {
            return PLACE_ORDER_STATUS_DENIED;
        }
    }
    // Remove previous failed order
    if (!empty($cart['failed_order_id']) || !empty($cart['processed_order_id'])) {
        $_order_ids = !empty($cart['failed_order_id']) ? $cart['failed_order_id'] : $cart['processed_order_id'];
        foreach ($_order_ids as $_order_id) {
            fn_delete_order($_order_id);
        }
        $cart['rewrite_order_id'] = $_order_ids;
        unset($cart['failed_order_id'], $cart['processed_order_id']);
    }
    if (!empty($params['payment_info'])) {
        $cart['payment_info'] = $params['payment_info'];
    } else {
        $cart['payment_info'] = array();
    }
    if (empty($params['payment_info']) && !empty($cart['extra_payment_info'])) {
        $cart['payment_info'] = empty($cart['payment_info']) ? array() : $cart['payment_info'];
        $cart['payment_info'] = array_merge($cart['extra_payment_info'], $cart['payment_info']);
    }
    unset($cart['payment_info']['secure_card_number']);
    if (!empty($cart['products'])) {
        foreach ($cart['products'] as $cart_id => $product) {
            $_is_edp = db_get_field("SELECT is_edp FROM ?:products WHERE product_id = ?i", $product['product_id']);
            if (fn_check_amount_in_stock($product['product_id'], $product['amount'], empty($product['product_options']) ? array() : $product['product_options'], $cart_id, $_is_edp, 0, $cart) == false) {
                fn_delete_cart_product($cart, $cart_id);
                return PLACE_ORDER_STATUS_TO_CART;
            }
            if (!fn_allowed_for('ULTIMATE:FREE')) {
                $exceptions = fn_get_product_exceptions($product['product_id'], true);
                if (!isset($product['options_type']) || !isset($product['exceptions_type'])) {
                    $product = array_merge($product, db_get_row('SELECT options_type, exceptions_type FROM ?:products WHERE product_id = ?i', $product['product_id']));
                }
                if (!fn_is_allowed_options_exceptions($exceptions, $product['product_options'], $product['options_type'], $product['exceptions_type'])) {
                    fn_set_notification('E', __('notice'), __('product_options_forbidden_combination', array('[product]' => $product['product'])));
                    fn_delete_cart_product($cart, $cart_id);
                    return PLACE_ORDER_STATUS_TO_CART;
                }
                if (!fn_is_allowed_options($product)) {
                    fn_set_notification('E', __('notice'), __('product_disabled_options', array('[product]' => $product['product'])));
                    fn_delete_cart_product($cart, $cart_id);
                    return PLACE_ORDER_STATUS_TO_CART;
                }
            }
        }
    }
    list($order_id, $process_payment) = fn_place_order($cart, $auth);
    // Clean up saved shipping rates
    unset($_SESSION['product_groups']);
    if (!empty($order_id)) {
        if (empty($params['skip_payment']) && $process_payment == true || !empty($params['skip_payment']) && empty($auth['act_as_user'])) {
            // administrator, logged in as customer can skip payment
            $payment_info = !empty($cart['payment_info']) ? $cart['payment_info'] : array();
            fn_start_payment($order_id, array(), $payment_info);
        }
        fn_order_placement_routines('route', $order_id);
        return PLACE_ORDER_STATUS_OK;
    } else {
        return PLACE_ORDER_STATUS_TO_CART;
    }
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:83,代码来源:fn.cart.php


示例7: fn_prepare_repay_data

function fn_prepare_repay_data($payment_id, $order_info, $auth)
{
    if (empty($payment_id)) {
        $payment_id = $order_info['payment_id'];
    }
    //Get payment methods
    $payment_methods = fn_get_payments(array('usergroup_ids' => $auth['usergroup_ids']));
    fn_set_hook('prepare_repay_data', $payment_id, $order_info, $auth, $payment_methods);
    if (!empty($payment_methods)) {
        // Get payment method info
        $payment_groups = fn_prepare_checkout_payment_methods($order_info, $auth);
        if (!empty($payment_id)) {
            $order_payment_id = $payment_id;
        } else {
            $first = reset($payment_methods);
            $order_payment_id = $first['payment_id'];
        }
        $payment_data = fn_get_payment_method_data($order_payment_id);
        $payment_data['surcharge_value'] = 0;
        if (floatval($payment_data['a_surcharge'])) {
            $payment_data['surcharge_value'] += $payment_data['a_surcharge'];
        }
        if (floatval($payment_data['p_surcharge'])) {
            if (fn_allowed_for('MULTIVENDOR') && fn_take_payment_surcharge_from_vendor($order_info['products'])) {
                $payment_data['surcharge_value'] += fn_format_price($order_info['total']);
            } else {
                $payment_data['surcharge_value'] += fn_format_price(($order_info['total'] - $order_info['payment_surcharge']) * $payment_data['p_surcharge'] / 100);
            }
        }
        Registry::get('view')->assign('payment_methods', $payment_groups);
        Registry::get('view')->assign('order_payment_id', $order_payment_id);
        Registry::get('view')->assign('payment_method', $payment_data);
    }
}
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:34,代码来源:orders.php


示例8: fn_prepare_repay_data

function fn_prepare_repay_data($payment_id, $order_info, $auth, &$templater)
{
    //Get payment methods
    $payment_methods = fn_get_payment_methods($auth);
    if (!empty($payment_methods)) {
        // Get payment method info
        if (!empty($payment_id)) {
            $order_payment_id = $payment_id;
        } else {
            $first = reset($payment_methods);
            $order_payment_id = $first['payment_id'];
        }
        $payment_data = fn_get_payment_method_data($order_payment_id);
        $payment_data['surcharge_value'] = 0;
        if (floatval($payment_data['a_surcharge'])) {
            $payment_data['surcharge_value'] += $payment_data['a_surcharge'];
        }
        if (floatval($payment_data['p_surcharge'])) {
            $payment_data['surcharge_value'] += fn_format_price(($order_info['total'] - $order_info['payment_surcharge']) * $payment_data['p_surcharge'] / 100);
        }
        $templater->assign('payment_methods', $payment_methods);
        $templater->assign('credit_cards', fn_get_static_data_section('C', true));
        $templater->assign('order_payment_id', $order_payment_id);
        $templater->assign('payment_method', $payment_data);
    }
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:26,代码来源:orders.php


示例9: foreach

        $addons = Registry::get('addons');
        foreach ($addons as $addon_id => $addon) {
            if ($view->templateExists('addons/' . $addon_id . '/views/payments/components/cc_processors/' . $processor_template)) {
                $view->assign('processor_template', 'addons/' . $addon_id . '/views/payments/components/cc_processors/' . $processor_template);
                break;
            }
        }
    }
    $view->assign('processor_params', $processor_data['processor_params']);
    $view->assign('processor_name', $processor_data['processor']);
    $view->assign('callback', $processor_data['callback']);
    $view->assign('payment_id', $_REQUEST['payment_id']);
    // Show methods list
} elseif ($mode == 'manage') {
    $payments = fn_get_payments(DESCR_SL);
    Tygh::$app['view']->assign('usergroups', fn_get_usergroups(array('type' => 'C', 'status' => array('A', 'H')), DESCR_SL));
    Tygh::$app['view']->assign('payments', $payments);
    Tygh::$app['view']->assign('templates', fn_get_payment_templates());
    Tygh::$app['view']->assign('payment_processors', fn_get_payment_processors());
} elseif ($mode == 'update') {
    $payment = fn_get_payment_method_data($_REQUEST['payment_id'], DESCR_SL);
    $payment['icon'] = fn_get_image_pairs($payment['payment_id'], 'payment', 'M', true, true, DESCR_SL);
    Tygh::$app['view']->assign('usergroups', fn_get_usergroups(array('type' => 'C', 'status' => array('A', 'H')), DESCR_SL));
    Tygh::$app['view']->assign('payment', $payment);
    Tygh::$app['view']->assign('templates', fn_get_payment_templates($payment));
    Tygh::$app['view']->assign('payment_processors', fn_get_payment_processors());
    Tygh::$app['view']->assign('taxes', fn_get_taxes());
    if (Registry::get('runtime.company_id') && Registry::get('runtime.company_id') != $payment['company_id']) {
        Tygh::$app['view']->assign('hide_for_vendor', true);
    }
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:payments.php


示例10: fn_rus_edost_calculate_cart_taxes_pre

function fn_rus_edost_calculate_cart_taxes_pre(&$cart, $cart_products, &$product_groups)
{
    if (!empty($cart['shippings_extra'])) {
        if (!empty($cart['select_office'])) {
            $select_office = $cart['select_office'];
        } elseif (!empty($_REQUEST['select_office'])) {
            $select_office = $cart['select_office'] = $_REQUEST['select_office'];
        }
        if (!empty($select_office)) {
            foreach ($product_groups as $group_key => $group) {
                if (!empty($group['chosen_shippings'])) {
                    foreach ($group['chosen_shippings'] as $shipping_key => $shipping) {
                        $shipping_id = $shipping['shipping_id'];
                        if ($shipping['module'] != 'edost') {
                            continue;
                        }
                        if (!empty($cart['shippings_extra']['data'][$group_key][$shipping_id])) {
                            $shippings_extra = $cart['shippings_extra']['data'][$group_key][$shipping_id];
                            $product_groups[$group_key]['chosen_shippings'][$shipping_key]['data'] = $shippings_extra;
                            if (!empty($select_office[$group_key][$shipping_id])) {
                                $office_id = $select_office[$group_key][$shipping_id];
                                $product_groups[$group_key]['chosen_shippings'][$shipping_key]['office_id'] = $office_id;
                                if (!empty($shippings_extra['office'][$office_id])) {
                                    $office_data = $shippings_extra['office'][$office_id];
                                    $product_groups[$group_key]['chosen_shippings'][$shipping_key]['office_data'] = $office_data;
                                }
                            }
                        }
                    }
                }
            }
        }
        if (!empty($cart['shippings_extra']['data'])) {
            foreach ($cart['shippings_extra']['data'] as $group_key => $shippings) {
                foreach ($shippings as $shipping_id => $shipping_data) {
                    if (!empty($product_groups[$group_key]['shippings'][$shipping_id]['module'])) {
                        $module = $product_groups[$group_key]['shippings'][$shipping_id]['module'];
                        if (!empty($shipping_data) && $module == 'edost') {
                            $product_groups[$group_key]['shippings'][$shipping_id]['data'] = $shipping_data;
                        }
                    }
                }
            }
        }
        if (!empty($cart['shippings_extra']['rates'])) {
            foreach ($cart['shippings_extra']['rates'] as $group_key => $shippings) {
                foreach ($shippings as $shipping_id => $shipping) {
                    if (!empty($shipping['day']) && !empty($product_groups[$group_key]['shippings'][$shipping_id])) {
                        $product_groups[$group_key]['shippings'][$shipping_id]['delivery_time'] = $shipping['day'];
                    }
                }
            }
        }
    }
    if (!empty($cart['payment_id'])) {
        $payment_info = fn_get_payment_method_data($cart['payment_id']);
        if (strpos($payment_info['template'], 'edost_cod.tpl')) {
            $cart['shippings_extra']['sum'] = array('pricediff' => 0, 'transfer' => 0, 'total' => 0);
            foreach ($product_groups as $group_key => $group) {
                foreach ($group['shippings'] as $shipping_id => $shipping) {
                    if (!empty($cart['shippings_extra']['rates'][$group_key][$shipping_id]['pricecash'])) {
                        $cart['product_groups'][$group_key]['shippings'][$shipping_id]['rate'] = $cart['shippings_extra']['rates'][$group_key][$shipping_id]['pricecash'];
                        $product_groups[$group_key]['shippings'][$shipping_id]['rate'] = $cart['shippings_extra']['rates'][$group_key][$shipping_id]['pricecash'];
                    }
                    if (!empty($cart['shipping'][$shipping_id])) {
                        $cart['shipping'][$shipping_id]['rate'] = $cart['shippings_extra']['rates'][$group_key][$shipping_id]['pricecash'];
                        $cart['shipping'][$shipping_id]['rates'] = 1;
                    }
                }
                if (!empty($group['chosen_shippings'])) {
                    foreach ($group['chosen_shippings'] as $shipping_key => $shipping) {
                        $shipping_id = $shipping['shipping_id'];
                        if (!empty($cart['shippings_extra']['rates'][$group_key][$shipping_id]['pricecash'])) {
                            $cart['product_groups'][$group_key]['shippings'][$shipping_id]['rate'] = $cart['shippings_extra']['rates'][$group_key][$shipping_id]['pricecash'];
                            $cart['shippings_extra']['sum']['pricediff'] += $cart['shippings_extra']['rates'][$group_key][$shipping_id]['pricediff'];
                        }
                        $cart['shippings_extra']['sum']['transfer'] += $cart['shippings_extra']['rates'][$group_key][$shipping_id]['transfer'];
                        if (!empty($cart['shippings_extra']['rates'][$group_key][$shipping['shipping_id']]['pricecash'])) {
                            $product_groups[$group_key]['chosen_shippings'][$shipping_key]['rate'] = $cart['shippings_extra']['rates'][$group_key][$shipping['shipping_id']]['pricecash'];
                            $cart['shipping_cost'] = $cart['shippings_extra']['rates'][$group_key][$shipping['shipping_id']]['pricecash'];
                            $cart['display_shipping_cost'] = $cart['shipping_cost'];
                        }
                    }
                    $cart['shippings_extra']['sum']['total'] = $cart['shippings_extra']['sum']['transfer'] + $cart['shippings_extra']['sum']['pricediff'];
                }
            }
        }
        $_SESSION['shipping_hash'] = fn_get_shipping_hash($cart['product_groups']);
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:90,代码来源:func.php


示例11: die

*                                                                          *
****************************************************************************
* 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');
                }
                if (md5($_REQUEST['user_id'] . $order_id . $_REQUEST['vvc_order_id'] . $_REQUEST['vvc_status'] . $secret_word) === $_REQUEST['hash'] && $order_info['payment_info']['awaiting_callback'] == true) {
                    if ($_REQUEST['vvc_status'] == 'OK') {
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:vsevcredit.php


示例12: fn_associate_order_id

function fn_associate_order_id($order_id, $transaction_id, $schema_url)
{
    $payment_id = db_get_field("SELECT payment_id FROM ?:orders WHERE order_id = ?i", $order_id);
    $processor_data = fn_get_payment_method_data($payment_id);
    $base_url = 'https://' . ($processor_data['params']['test'] == 'N' ? 'checkout.google.com' : 'sandbox.google.com/checkout') . '/cws/v2/Merchant/' . $processor_data['params']['merchant_id'];
    $request_url = $base_url . '/request';
    $post = array();
    $post[] = "<add-merchant-order-number xmlns='" . $schema_url . "' google-order-number='" . $transaction_id . "'>";
    $post[] = "<merchant-order-number>" . $order_id . "</merchant-order-number>";
    $post[] = "</add-merchant-order-number>";
    $_id = base64_encode($processor_data['params']['merchant_id'] . ":" . $processor_data['params']['merchant_key']);
    $headers[] = "Authorization: Basic {$_id}";
    $headers[] = "Accept: application/xml ";
    list($a, $return) = fn_https_request("POST", $request_url, $post, '', '', 'application/xml', '', '', '', $headers);
    return true;
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:16,代码来源:google_checkout_response.php


示例13: DEFINE

//
// $Id: proxypay3_validation.php 7502 2009-05-19 14:54:59Z zeke $
//
DEFINE('AREA', 'C');
DEFINE('AREA_NAME', 'customer');
require './../prepare.php';
require './../init.php';
#$Ref=88;
#$Amount=4.50;
#$Shop=500;
#$Currency=978;
$totals_100 = array('EUR', 'USD', 'GBP', 'CHF', 'NLG', 'DEM', 'FRF', 'ATS');
if (!empty($_REQUEST['Ref'])) {
    $order_id = strpos($_REQUEST['Ref'], '_') ? substr($_REQUEST['Ref'], 0, strpos($_REQUEST['Ref'], '_')) : $_REQUEST['Ref'];
    $result = db_get_row("SELECT * FROM ?:orders WHERE order_id = ?i", $order_id);
    $processor_data = fn_get_payment_method_data($result['payment_id']);
    if (!in_array($processor_data['params']['currency'], $_REQUEST['totals_100'])) {
        $total_cost = $result['total'];
    } else {
        $total_cost = $result['total'] * 100;
    }
    $amount = !empty($_REQUEST['Amount']) ? $_REQUEST['Amount'] + 0 : 0;
    // what is zero for?
    $currency = !empty($_REQUEST['Currency']) ? $_REQUEST['Currency'] + 0 : 0;
    if (0 + $result['total'] == $amount && $processor_data['params']['merchantid'] == $_REQUEST['Shop'] && 0 + $processor_data['params']['currency'] == $currency && !empty($order_id) && !empty($amount) && !empty($currency)) {
        fn_change_order_status($order_id, 'O');
        print "[OK]";
    } else {
        fn_change_order_status($order_id, 'D', '', true);
        print "[ERROR]";
    }
开发者ID:diedsmiling,项目名称:busenika,代码行数:31,代码来源:proxypay3_validation.php


示例14: 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


示例15: fn_paypal_set_bml_checkout

function fn_paypal_set_bml_checkout($payment_id, $order_id = 0, $order_info = array(), $cart = array(), $area = AREA)
{
    $processor_data = fn_get_payment_method_data($payment_id);
    if (!empty($order_id)) {
        $return_url = fn_url("payment_notification.notify?payment=paypal_bml&order_id={$order_id}", $area, 'current');
        $cancel_url = fn_url("payment_notification.cancel?payment=paypal_bml&order_id={$order_id}", $area, 'current');
    } else {
        $return_url = fn_payment_url('current', "paypal_bml.php?mode=express_return&payment_id={$payment_id}");
        $cancel_url = fn_url("checkout.cart", $area, 'current');
    }
    $request = array('PAYMENTREQUEST_0_PAYMENTACTION' => 'SALE', 'PAYMENTREQUEST_0_SOLUTIONTYPE' => 'SOLE', 'PAYMENTREQUEST_0_CURRENCYCODE' => $processor_data['processor_params']['currency'], 'LOCALECODE' => CART_LANGUAGE, 'RETURNURL' => $return_url, 'CANCELURL' => $cancel_url, 'METHOD' => 'SetExpressCheckout', 'LANDINGPAGE' => 'Billing', 'UserSelectedFundingSource' => 'BML');
    fn_paypal_build_request($processor_data, $request, $post_url, $cert_file);
    $order_details = !empty($order_info) ? fn_paypal_build_details($order_info, $processor_data, false) : fn_paypal_build_details($cart, $processor_data);
    $request = array_merge($request, $order_details);
    return fn_paypal_request($request, $post_url, $cert_file);
}
开发者ID:ambient-lounge,项目名称:site,代码行数:16,代码来源:paypal_bml.php


示例16: fn_checkout_summary

function fn_checkout_summary(&$cart)
{
    if (fn_cart_is_empty($cart) == true) {
        return false;
    }
    fn_set_hook('checkout_summary', $cart);
    //Get payment methods
    $payment_data = fn_get_payment_method_data($cart['payment_id']);
    Registry::get('view')->assign('payment_method', $payment_data);
    Registry::get('view')->assign('credit_cards', fn_get_static_data_section('C', true, 'credit_card'));
    // Downlodable files agreements
    $agreements = array();
    foreach ($cart['products'] as $item) {
        if ($item['is_edp'] == 'Y') {
            if ($_agreement = fn_get_edp_agreements($item['product_id'], true)) {
                $agreements[$item['product_id']] = $_agreement;
            }
        }
    }
    if (!empty($agreements)) {
        Registry::get('view')->assign('cart_agreements', $agreements);
    }
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:23,代码来源:checkout.php


示例17: fn_get_shipping_hash

 $shipping_hash = fn_get_shipping_hash($cart['product_groups']);
 if (!empty($_SESSION['shipping_hash']) && $_SESSION['shipping_hash'] != $shipping_hash && $completed_steps['step_three'] && $cart['shipping_required']) {
     $_SESSION['chosen_shipping'] = array();
     fn_set_notification('W', __('important'), __('text_shipping_rates_changed'));
     if ($cart['edit_step'] == 'step_four') {
         return array(CONTROLLER_STATUS_REDIRECT, 'checkout.checkout?edit_step=step_three');
     }
 }
 $_SESSION['shipping_hash'] = $shipping_hash;
 fn_gather_additional_products_data($cart_products, array('get_icon' => true, 'get_detailed' => true, 'get_options' => true, 'get_discounts' => false));
 if (floatval($cart['total']) == 0) {
     $cart['payment_id'] = 0;
 }
 fn_set_hook('checkout_select_default_payment_method', $cart, $payment_methods, $completed_steps);
 if (!empty($cart['payment_id'])) {
     $payment_info = fn_get_payment_method_data($cart['payment_id']);
     Tygh::$app['view']->assign('payment_info', $payment_info);
     if (!empty($payment_info['processor_params']['iframe_mode']) && $payment_info['processor_params']['iframe_mode'] == 'Y') {
         Tygh::$app['view']->assign('iframe_mode', true);
     }
 }
 Tygh::$app['view']->assign('payment_methods', $payment_methods);
 $cart['payment_surcharge'] = 0;
 if (!empty($cart['payment_id']) && !empty($payment_info)) {
     fn_update_payment_surcharge($cart, $auth);
 }
 if (fn_allowed_for('MULTIVENDOR')) {
     Tygh::$app['view']->assign('take_surcharge_from_vendor', fn_take_payment_surcharge_from_vendor($cart['products']));
 }
 Tygh::$app['view']->assign('usergroups', fn_get_usergroups(array('type' => 'C', 'status' => 'A'), CART_LANGUAGE));
 Tygh::$app['view']->assign('countries', fn_get_simple_countries(true, CART_LANGUAGE));
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:checkout.php


示例18: content_55d312504e2e18_94467538


//.........这里部分代码省略.........
                foreach ($_from as $_smarty_tpl->tpl_vars["tax"]->key => $_smarty_tpl->tpl_vars["tax"]->value) {
                    $_smarty_tpl->tpl_vars["tax"]->_loop = true;
                    ?>
    <li class="ty-cart-statistic__item ty-statistic-list-tax">
        <span class="ty-cart-statistic__title"><?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['tax']->value['description'], ENT_QUOTES, 'UTF-8');
                    ?>
&nbsp;(<?php 
                    echo $_smarty_tpl->getSubTemplate("common/modifier.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('mod_value' => $_smarty_tpl->tpl_vars['tax']->value['rate_value'], 'mod_type' => $_smarty_tpl->tpl_vars['tax']->value['rate_type']), 0);
                    if ($_smarty_tpl->tpl_vars['tax']->value['price_includes_tax'] == "Y" && ($_smarty_tpl->tpl_vars['settings']->value['Appearance']['cart_prices_w_taxes'] != "Y" || $_smarty_tpl->tpl_vars['settings']->value['General']['tax_calculation'] == "subtotal")) {
                        ?>
&nbsp;<?php 
                        echo $_smarty_tpl->__("included");
                    }
                    ?>
)</span>
        <span class="ty-cart-statistic__value"><?php 
                    echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['tax']->value['tax_subtotal']), 0);
                    ?>
</span>
    </li>
    <?php 
                }
                ?>
    <?php 
            }
            ?>

    <?php 
            if ($_smarty_tpl->tpl_vars['cart']->value['payment_surcharge'] && !$_smarty_tpl->tpl_vars['take_surcharge_from_vendor']->value) {
                ?>
    <li class="ty-cart-statistic__item ty-statistic-list-payment-surcharge" id="payment_surcharge_line">
        <?php 
                $_smarty_tpl->tpl_vars["payment_data"] = new Smarty_variable(fn_get_payment_method_data($_smarty_tpl->tpl_vars['cart']->value['payment_id']), null, 0);
                ?>
        <span class="ty-cart-statistic__title"><?php 
                echo htmlspecialchars(($tmp = @$_smarty_tpl->tpl_vars['cart']->value['payment_surcharge_title']) === null || $tmp === '' ? $_smarty_tpl->__("payment_surcharge") : $tmp, ENT_QUOTES, 'UTF-8');
                if ($_smarty_tpl->tpl_vars['payment_data']->value['payment']) {
                    ?>
&nbsp;(<?php 
                    echo htmlspecialchars($_smarty_tpl->tpl_vars['payment_data']->value['payment'], ENT_QUOTES, 'UTF-8');
                    ?>
)<?php 
                }
                ?>
:</span>
        <span class="ty-cart-statistic__value"><?php 
                echo $_smarty_tpl->getSubTemplate("common/price.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('value' => $_smarty_tpl->tpl_vars['cart']->value['payment_surcharge'], 'span_id' => "payment_surcharge_value"), 0);
                ?>
</span>
    </li>
    <?php 
                echo smarty_function_math(array('equation' => "x+y", 'x' => $_smarty_tpl->tpl_vars['cart']->value['total'], 'y' => $_smarty_tpl->tpl_vars['cart']->value['payment_surcharge'], 'assign' => "_total"), $_smarty_tpl);
                ?>

    <?php 
                $_smarty_tpl->_capture_stack[0][] = array("_total", null, null);
                ob_start();
                echo htmlspecialchars($_smarty_tpl->tpl_vars['_total']->value, ENT_QUOTES, 'UTF-8');
                list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]);
                if (!empty($_capture_buffer)) {
                    if (isset($_capture_assign)) {
                        $_smarty_tpl->assign($_capture_assign, ob_get_contents());
                    }
                    if (isset($_capture_append)) {
                        $_smarty_tpl->append($_capture_append, ob_get_contents());
开发者ID:OneataBogdan,项目名称:lead_coriolan,代码行数:67,代码来源:6232f92883629ffbf83a992956fb59b0635c6154.tygh.checkout_totals_info.tpl.php


示例19: db_query

    db_query("REPLACE INTO ?:order_data ?e", $data);
    fn_update_order_payment_info($order_id, $pp_response);
    fn_order_placement_routines('route', $order_id);
} elseif ($message_recognizer == 'OrderCancell 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP fn_get_processor_data函数代码示例发布时间:2022-05-15
下一篇:
PHP fn_get_page_data函数代码示例发布时间: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