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


PHP fn_create_payment_form函数代码示例

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


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

示例1: 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.            *
****************************************************************************/
if (!defined('BOOTSTRAP')) {
    die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if ($mode == 'process_embedded') {
        if (!empty($_REQUEST['data'])) {
            $data = json_decode($_REQUEST['data'], true);
            if (!empty($data)) {
                fn_create_payment_form($data['submit_url'], $data['data'], $data['payment_name'], $data['exclude_empty_values'], $data['method']);
            }
        }
        exit;
    }
}
if (!empty($_REQUEST['payment'])) {
    define('PAYMENT_NOTIFICATION', true);
    $payment = fn_basename($_REQUEST['payment']);
    if (fn_check_prosessor_status($payment)) {
        $payment_script = fn_get_processor_script_path($payment . '.php');
        if (in_array($mode, array('checkout_redirect', 'index_redirect'))) {
            fn_order_placement_routines($mode);
        } elseif (is_file($payment_script)) {
            include $payment_script;
        }
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:payment_notification.php

示例2: fn_date_format

     2 - Confirmation
     3 -Automatic Refund
     4 - Payment by Cell Phone
     5 - Recurrent Transaction
     6 - Successive Transaction
     7 - Authentication
     8 - Confirmation of Authentication
    */
    $currency = $processor_data['processor_params']['currency'];
    $merchant = $processor_data['processor_params']['merchant_id'];
    $terminal = $processor_data['processor_params']['terminal'];
    $transaction_type = 0;
    // authorization
    $clave = $processor_data['processor_params']['clave'];
    $postfix = fn_date_format(time(), '%S');
    if (strlen($order_id) > 6) {
        $order_n = $order_id . $postfix . ($order_info['repaid'] ? 'x' . $order_info['repaid'] : '');
    } else {
        $order_n = str_repeat('0', 6 - strlen($order_id)) . $order_id . $postfix . ($order_info['repaid'] ? 'x' . $order_info['repaid'] : '');
    }
    $amount = $currency == '978' ? $order_info['total'] * 100 : $order_info['total'];
    $url_merchant = fn_url("payment_notification.result?payment=servired&order_id={$order_id}{$postfix}", AREA, 'current');
    $url_ok = fn_url("payment_notification.notify?payment=servired&order_id={$order_id}{$postfix}", AREA, 'current');
    $url_nok = fn_url("payment_notification.failed?payment=servired&order_id={$order_id}{$postfix}", AREA, 'current');
    // Compute hash to sign form data
    $message = $amount . $order_n . $merchant . $currency . $transaction_type . $url_merchant . $clave;
    $signature = strtoupper(sha1($message));
    $post_data = array('Ds_Merchant_Amount' => $amount, 'Ds_Merchant_Currency' => $currency, 'Ds_Merchant_Order' => $order_n, 'Ds_Merchant_MerchantCode' => $merchant, 'Ds_Merchant_Terminal' => $terminal, 'Ds_Merchant_TransactionType' => $transaction_type, 'Ds_Merchant_MerchantURL' => $url_merchant, 'Ds_Merchant_UrlOK' => $url_ok, 'Ds_Merchant_UrlKO' => $url_nok, 'Ds_Merchant_MerchantSignature' => $signature);
    fn_create_payment_form($post_address, $post_data, 'SERMEPA');
}
exit;
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:servired.php

示例3: fn_get_state_name

    $post_data['postal_code'] = $order_info['b_zipcode'];
    $post_data['city'] = $order_info['b_city'];
    $post_data['state'] = fn_get_state_name($order_info['b_state'], $order_info['b_country']);
    if (empty($post_data['state'])) {
        $post_data['state'] = $order_info['b_state'];
    }
    if (fn_strlen($post_data['state']) > 50) {
        $post_data['state'] = fn_substr($post_data['state'], 0, 47) . '...';
    }
    $post_data['country'] = db_get_field('SELECT code_A3 FROM ?:countries WHERE code=?s', $order_info['b_country']);
    $post_data['phone_number'] = $order_info['phone'];
    if ($processor_data['processor_params']['quick_checkout'] == 'Y') {
        $post_data['payment_methods'] = !empty($processor_data['processor_params']['payment_methods']) ? '' : 'ACC';
        $post_data['hide_login'] = '1';
    } else {
        $post_data['payment_methods'] = 'WLT';
        $post_data['hide_login'] = !empty($suffix) ? '1' : '0';
    }
    // split_gateway
    if (!empty($processor_data['processor_params']['payment_methods'])) {
        $post_data['payment_methods'] .= (!empty($post_data['payment_methods']) ? ',' : '') . $processor_data['processor_params']['payment_methods'];
    }
    // /split_gateway
    // logo
    if (!(!empty($processor_data['processor_params']['do_not_pass_logo']) && $processor_data['processor_params']['do_not_pass_logo'] == 'Y')) {
        $logos = fn_get_logos();
        $post_data['logo_url'] = $logos['theme']['image']['image_path'];
    }
    fn_create_payment_form($url, $post_data, 'Skrill');
    exit;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:skrill_ewallet.php

示例4: fn_finish_payment

    fn_finish_payment($_REQUEST['order_id'], $pp_response);
    fn_order_placement_routines('route', $_REQUEST['order_id']);
    exit;
} else {
    $order_prefix = !empty($processor_data['processor_params']['order_prefix']) ? $processor_data['processor_params']['order_prefix'] : '';
    $return_url = fn_url("payment_notification.notify?payment=eway_shared&order_id={$order_id}", AREA, 'current');
    $MerchantInvoice = $order_prefix . ($order_info['repaid'] ? $order_id . '_' . $order_info['repaid'] : $order_id);
    if ($processor_data['processor_params']['gateway'] == 'payment') {
        $currency = 'GBP';
    } elseif ($processor_data['processor_params']['gateway'] == 'nz') {
        $currency = 'NZD';
    } else {
        $currency = 'AUD';
    }
    $request_url = 'https://' . $processor_data['processor_params']['gateway'] . '.ewaygateway.com/Request/?' . 'CustomerID=' . $processor_data['processor_params']['customer_id'] . '&UserName=' . $processor_data['processor_params']['username'] . '&Amount=' . fn_format_price($order_info['total'], $currency, 2, false) . '&Currency=' . $currency . '&ReturnURL=' . urlencode($return_url) . '&CancelURL=' . urlencode($return_url) . '&InvoiceDescription=' . (!empty($order_info['notice']) ? $order_info['notice'] : '') . '&CompanyName=' . urlencode(Registry::get('settings.Company.company_name')) . '&CustomerFirstName=' . urlencode($order_info['b_firstname']) . '&CustomerLastName=' . urlencode($order_info['b_lastname']) . '&CustomerAddress=' . urlencode($order_info['b_address']) . '&CustomerCity=' . urlencode($order_info['b_city']) . '&CustomerState=' . urlencode($order_info['b_state_descr']) . '&CustomerPostCode=' . urlencode($order_info['b_zipcode']) . '&CustomerCountry=' . urlencode($order_info['b_country_descr']) . '&CustomerPhone=' . urlencode($order_info['phone']) . '&CustomerEmail=' . urlencode($order_info['email']) . '&MerchantReference=' . urlencode($MerchantInvoice);
    $return = Http::get($request_url);
    $sucessfull = 'False';
    if (preg_match("/<Result>(.*)<\\/Result>/", $return, $matches)) {
        $sucessfull = $matches[1];
    }
    if ($sucessfull == 'True') {
        if (preg_match("/<URI>(.*)<\\/URI>/", $return, $matches)) {
            fn_create_payment_form($matches[1], array(), '', true, 'get');
        }
    } else {
        if (preg_match("/<Error>(.*)<\\/Error>/", $return, $matches)) {
            $pp_response['reason_text'] = $matches[1];
        }
        $pp_response['order_status'] = 'D';
    }
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:eway_shared.php

示例5: die

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);
        } else {
            Tygh::$app['session']['cmpi']['auth_error'] = true;
            fn_set_notification('E', __('authentication_failed'), __('text_authentication_failed_message'));
        }
        define('CMPI_PROCESSED', true);
        fn_start_payment(Tygh::$app['session']['cmpi']['order_id']);
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:cmpi.php

示例6: fn_finish_payment

            // still waiting for the response
        } else {
            $pp_response['order_status'] = 'F';
        }
        fn_finish_payment($_REQUEST['brq_invoicenumber'], $pp_response, false);
        $route = $order_info['repaid'] ? 'repay' : 'route';
        fn_order_placement_routines($route, $_REQUEST['brq_invoicenumber']);
    }
} else {
    $currency_coefficient = Registry::get('currencies.' . CART_SECONDARY_CURRENCY . '.coefficient');
    $_order_total = !empty($currency_coefficient) ? $order_info['total'] / floatval($currency_coefficient) : $order_info['total'];
    $return_url = fn_url("payment_notification.notify?payment=ideal_xml", AREA, 'current');
    $params = array('brq_websitekey' => $processor_data['processor_params']['merchant_id'], 'brq_amount' => $_order_total, 'brq_culture' => CART_LANGUAGE, 'brq_currency' => CART_SECONDARY_CURRENCY, 'brq_invoicenumber' => $order_id, 'brq_description' => $processor_data['processor_params']['description'], 'brq_return' => $return_url, 'brq_returnreject' => $return_url, 'brq_returnerror' => $return_url, 'brq_returncancel' => $return_url);
    $params['brq_signature'] = fn_buckaroo_calculate_signature($params, $processor_data['processor_params']['merchant_key']);
    $post_url = empty($processor_data['processor_params']['test']) ? "https://checkout.buckaroo.nl/html/" : "https://testcheckout.buckaroo.nl/html/";
    fn_create_payment_form($post_url, $params, 'Buckaroo server', false);
    exit;
}
function fn_buckaroo_calculate_signature($params, $secret_key)
{
    unset($params['brq_signature']);
    unset($params['dispatch']);
    unset($params['payment']);
    //sort the array
    $sortable_array = fn_buckaroo_sort($params);
    //turn into string and add the secret key to the end
    $signature_string = '';
    foreach ($sortable_array as $key => $value) {
        $value = urldecode($value);
        $signature_string .= $key . '=' . $value;
    }
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:ideal_xml.php

示例7: PxAccess

    $PxAccess_Url = "https://sec.paymentexpress.com/pxpay/pxpay.aspx";
    $PxAccess_Userid = $processor_data["processor_params"]["user_id"];
    //Change to your user ID
    $PxAccess_Key = $processor_data["processor_params"]["key"];
    //Your DES Key from DPS
    $Mac_Key = $processor_data["processor_params"]["mac_key"];
    //Your MAC key from DPS
    $pxaccess = new PxAccess($PxAccess_Url, $PxAccess_Userid, $PxAccess_Key, $Mac_Key);
    $request = new PxPayRequest();
    $script_url = fn_payment_url('current', 'dps_access.php');
    $_order_id = $order_info['repaid'] ? $order_id . '_' . $order_info['repaid'] : $order_id;
    Tygh::$app['session']['dps_access']['order_id'] = $order_id;
    //Set up PxPayRequest Object
    $request->setAmountInput($order_info['total']);
    $request->setTxnData1("");
    // whatever you want to appear
    $request->setTxnData2("");
    // whatever you want to appear
    $request->setTxnData3("");
    // whatever you want to appear
    $request->setTxnType("Purchase");
    $request->setInputCurrency($processor_data["processor_params"]["currency"]);
    $request->setMerchantReference($_order_id);
    // fill this with your order number
    $request->setEmailAddress($order_info['email']);
    $request->setUrlFail($script_url);
    $request->setUrlSuccess($script_url);
    //Call makeResponse of PxAccess object to obtain the 3-DES encrypted payment request
    $request_string = $pxaccess->makeRequest($request);
    fn_create_payment_form($request_string, array(), 'DPS server', true, 'get');
}
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:dps_access.php

示例8: strpos

****************************************************************************/
if (!defined('BOOTSTRAP')) {
    require './init_payment.php';
    $order_id = strpos($_REQUEST['strCartID'], '_') ? substr($_REQUEST['strCartID'], 0, strpos($_REQUEST['strCartID'], '_')) : $_REQUEST['strCartID'];
    if (!isset($_REQUEST['intAccountID'])) {
        fn_order_placement_routines('route', $order_id);
    } else {
        $pp_response = array();
        if (empty($_REQUEST['intStatus'])) {
            $pp_response['order_status'] = 'F';
            $pp_response['reason_text'] = __('failed');
        } elseif ($_REQUEST['intStatus'] == 1) {
            $pp_response['order_status'] = 'P';
            $pp_response['reason_text'] = __('order_id') . '-' . $order_id;
        } else {
            $pp_response['order_status'] = 'N';
            $pp_response['reason_text'] = __('cancelled');
        }
        $pp_response['transaction_id'] = $_REQUEST['intTransID'];
        if (fn_check_payment_script('mcpe.php', $order_id)) {
            fn_finish_payment($order_id, $pp_response);
        }
    }
} else {
    $test = $processor_data['processor_params']['mode'];
    $_order_id = $order_info['repaid'] ? $order_id . '_' . $order_info['repaid'] : $order_id;
    $submit_url = 'https://secure.metacharge.com/mcpe/purser';
    $post_data = array('intTestMode' => $test, 'intInstID' => $processor_data['processor_params']['merchant_id'], 'strCartID' => $_order_id, 'fltAmount' => $order_info['total'], 'strCurrency' => $processor_data['processor_params']['currency'], 'strDesc' => "Payment for Order {$order_id}");
    fn_create_payment_form($submit_url, $post_data, 'metacharge.com server');
}
exit;
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:mcpe.php

示例9: substr

                $pp_response['order_status'] = 'P';
                $pp_response['reason_text'] = $_REQUEST['msg'];
                $pp_response['transaction_id'] = $_REQUEST['TxnGUID'];
                $pp_response['card_number'] = $_REQUEST['mPAN'];
                $pp_response['card'] = $_REQUEST['type'];
                $pp_response['cardholder_name'] = $_REQUEST['name'];
                $pp_response['expiry_month'] = substr($_REQUEST['exp'], 0, 2);
                $pp_response['expiry_year'] = substr($_REQUEST['exp'], -2);
            } elseif (!empty($_REQUEST['error'])) {
                $pp_response['order_status'] = 'F';
                $pp_response['reason_text'] = !empty($_REQUEST['msg']) ? $_REQUEST['msg'] : __('error');
            } else {
                $pp_response['order_status'] = 'N';
                $pp_response['reason_text'] = __('transaction_cancelled');
            }
            if (fn_check_payment_script('cresecure.php', $order_id)) {
                fn_finish_payment($order_id, $pp_response);
                fn_order_placement_routines('route', $order_id);
            }
        }
    } else {
        if ($processor_data['processor_params']['test'] == 'live') {
            $post_address = "https://safe.cresecure.net/securepayments/a1/cc_collection.php";
        } else {
            $post_address = "https://sandbox-cresecure.net/securepayments/a1/cc_collection.php";
        }
        $post_data = array('CRESecureID' => $processor_data['processor_params']['cresecureid'], 'total_amt' => sprintf('%.2f', $order_info['total']), 'return_url' => fn_url("payment_notification.return?payment=cresecure&order_id={$order_id}", AREA, 'https'), 'content_template_url' => fn_payment_url('https', "cresecure.php?order_id={$order_id}&display_full_path=Y"), 'b_country' => db_get_field('SELECT a.code_A3 FROM ?:countries as a WHERE a.code = ?s', $order_info['b_country']), 's_country' => db_get_field('SELECT a.code_A3 FROM ?:countries as a WHERE a.code = ?s', $order_info['s_country']), 'customer_address' => $order_info['b_address'] . (!empty($order_info['b_address_2']) ? ' ' . $order_info['b_address_2'] : ''), 'delivery_address' => $order_info['s_address'] . (!empty($order_info['s_address_2']) ? ' ' . $order_info['s_address_2'] : ''), 'customer_phone' => !empty($order_info['b_phone']) ? $order_info['b_phone'] : '', 'delivery_phone' => !empty($order_info['s_phone']) ? $order_info['s_phone'] : '', 'allowed_types' => !empty($processor_data['processor_params']['allowed_types']) ? join('|', $processor_data['processor_params']['allowed_types']) : 'Visa|MasterCard', 'sess_id' => Tygh::$app['session']->getID(), 'sess_name' => Tygh::$app['session']->getName(), 'order_id' => $order_info['order_id'], 'currency' => $processor_data['processor_params']['currency'], 'CRESecureAPIToken' => $processor_data['processor_params']['cresecureapitoken'], 'customer_id' => $order_info['user_id'], 'customer_company' => $order_info['company'], 'customer_firstname' => $order_info['b_firstname'], 'customer_lastname' => $order_info['b_lastname'], 'customer_email' => $order_info['email'], 'customer_city' => $order_info['b_city'], 'customer_state' => $order_info['b_state'], 'customer_postal_code' => $order_info['b_zipcode'], 'customer_country' => $order_info['b_country'], 'delivery_firstname' => $order_info['s_firstname'], 'delivery_lastname' => $order_info['s_lastname'], 'delivery_city' => $order_info['s_city'], 'delivery_state' => $order_info['s_state'], 'delivery_postal_code' => $order_info['s_zipcode'], 'ip_address' => $_SERVER['REMOTE_ADDR']);
        fn_create_payment_form($post_address, $post_data, 'CRE secure', false);
    }
    exit;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:cresecure.php

示例10: md5

    $status = $_REQUEST['Status'];
    $amount = $_REQUEST['Amount'];
    $crypt = $_REQUEST['Crypt'];
    // need to verify the integrity of the parameters to ensure they are not spoofed
    $cryptcheck = md5($status . $transid . $amount . $processor_data['processor_params']['password']);
    if ($status == 'Success' && $crypt == $cryptcheck) {
        $pp_response['order_status'] = $processor_data['processor_params']['transaction_type'] == 'PAYMENT' ? 'P' : 'O';
        $pp_response['reason_text'] = 'Payment Approved';
        $pp_response['transaction_id'] = $transid;
    } else {
        if ($status == 'Fail') {
            $pp_response['order_status'] = 'D';
            $pp_response['reason_text'] = 'Status: Declined';
        } elseif ($crypt != $cryptcheck) {
            $pp_response['order_status'] = 'F';
            $pp_response['reason_text'] = "Status: Password Check Failed {$crypt} {$cryptcheck} ";
        } else {
            $pp_response['order_status'] = 'F';
            $pp_response['reason_text'] = 'Status: Problem with confirming payment';
        }
    }
    fn_finish_payment($_REQUEST['order_id'], $pp_response, false);
    fn_order_placement_routines('route', $_REQUEST['order_id']);
} else {
    $post_address = $processor_data['processor_params']['testmode'] != "N" ? "https://testsecure.totalwebsecure.com/paypage/clear.asp" : "https://secure.totalwebsecure.com/paypage/clear.asp";
    $failed_url = fn_url("payment_notification.notify?payment=totalwebpp&order_id={$order_id}", AREA, 'current');
    $success_url = fn_url("payment_notification.notify?payment=totalwebpp&order_id={$order_id}", AREA, 'current');
    $post_data = array('CustomerID' => $processor_data['processor_params']['vendor'], 'Notes' => $processor_data['processor_params']['order_prefix'] . $order_id, 'TransactionAmount' => $order_info['total'], 'Amount' => $order_info['total'], 'TransactionCurrency' => $processor_data['processor_params']['currency'], 'redirectorfailed' => $failed_url, 'PayPageType' => '4', 'redirectorsuccess' => $success_url, 'CustomerEmail' => $order_info['email']);
    fn_create_payment_form($post_address, $post_data, 'Total Web Solutions Pay Page');
}
exit;
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:totalwebpp.php

示例11: db_get_field

    $pp_response['order_status'] = $_REQUEST['transStatus'] == 'Y' && (!empty($processor_data['processor_params']['callback_password']) ? !empty($_REQUEST['callbackPW']) && $_REQUEST['callbackPW'] == $processor_data['processor_params']['callback_password'] : true) ? 'P' : 'F';
    if ($_REQUEST['transStatus'] == 'Y') {
        $pp_response['reason_text'] = $_REQUEST['rawAuthMessage'];
        $pp_response['transaction_id'] = $_REQUEST['transId'];
        $pp_response['descr_avs'] = 'CVV (Security Code): ' . $avs_res[substr($_REQUEST['AVS'], 0, 1)] . '; Postcode: ' . $avs_res[substr($_REQUEST['AVS'], 1, 1)] . '; Address: ' . $avs_res[substr($_REQUEST['AVS'], 2, 1)] . '; Country: ' . $avs_res[substr($_REQUEST['AVS'], 3)];
    }
    if (!empty($_REQUEST['testMode'])) {
        $pp_response['reason_text'] .= '; This a TEST Transaction';
    }
    $area = db_get_field("SELECT data FROM ?:order_data WHERE order_id = ?i AND type = 'E'", $order_id);
    $override = $area == 'A' ? true : false;
    fn_finish_payment($order_id, $pp_response, false);
    echo "<head><meta http-equiv='refresh' content='0; url=" . fn_url("payment_notification.notify?payment=worldpay&order_id={$order_id}", $area, 'current', CART_LANGUAGE, $override) . "'></head><body><wpdisplay item=banner></body>";
    exit;
} else {
    if (!defined('BOOTSTRAP')) {
        die('Access denied');
    }
    $_order_id = $order_info['repaid'] ? $order_id . '_' . $order_info['repaid'] : $order_id;
    $s_id = Tygh::$app['session']->getID();
    $sess_name = Tygh::$app['session']->getName();
    $card_holder = $processor_data['processor_params']['test'] == $mode_test_declined ? $card_holder_for_declined_test : $order_info['b_firstname'] . ' ' . $order_info['b_lastname'];
    $test_mode_id = $processor_data['processor_params']['test'] == $mode_test_declined ? $mode_test : $processor_data['processor_params']['test'];
    $signature = md5($processor_data['processor_params']['md5_secret'] . ':' . $processor_data['processor_params']['account_id'] . ':' . $order_info['total'] . ':' . $processor_data['processor_params']['currency'] . ':' . $_order_id);
    $data = array('signatureFields' => 'instId:amount:currency:cartId', 'signature' => $signature, 'instId' => $processor_data['processor_params']['account_id'], 'cartId' => $_order_id, 'amount' => $order_info['total'], 'currency' => $processor_data['processor_params']['currency'], 'testMode' => $test_mode_id, 'authMode' => $processor_data['processor_params']['authmode'], 'name' => $card_holder, 'tel' => $order_info['phone'], 'email' => $order_info['email'], 'address' => $order_info['b_address'] . ' ' . $order_info['b_city'] . ' ' . $order_info['b_state'] . ' ' . $order_info['b_country'], 'postcode' => $order_info['b_zipcode'], 'country' => $order_info['b_country'], "MC_{$sess_name}" => $s_id);
    $order_data = array('order_id' => $order_id, 'type' => 'E', 'data' => AREA);
    db_query("REPLACE INTO ?:order_data ?e", $order_data);
    $submit_url = $processor_data['processor_params']['test'] == $mode_test_declined || $processor_data['processor_params']['test'] == $mode_test ? 'https://secure-test.worldpay.com/wcc/purchase' : 'https://secure.worldpay.com/wcc/purchase';
    fn_create_payment_form($submit_url, $data, 'World Pay server', false);
    exit;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:worldpay.php

示例12: elseif

            } elseif ($response['orderStatus'] == 2) {
                if ($response['amount'] == $order_info['total'] * 100) {
                    $pp_response = array('order_status' => 'P', 'card_number' => $response['cardAuthInfo']['pan'], 'cardholder_name' => $response['cardAuthInfo']['cardholderName'], 'expiry_month' => substr($response['cardAuthInfo']['expiration'], 0, 4), 'expiry_year' => substr($response['cardAuthInfo']['expiration'], 0, -2), 'bank' => $response['bankInfo']['bankName'], 'ip_address' => $response['ip']);
                } else {
                    $pp_response['reason_text'] = __("addons.rus_sberbank.wrong_amount");
                }
            } else {
                $pp_response = array('order_status' => 'F', 'reason_text' => $response['actionCodeDescription'], 'ip_address' => $response['ip']);
            }
        }
        fn_finish_payment($order_id, $pp_response);
        fn_order_placement_routines('route', $order_id, false);
    }
    exit;
} else {
    $sberbank = new Sberbank($processor_data);
    $response = $sberbank->register($order_info);
    if (!empty($processor_data['processor_params']['logging']) && $processor_data['processor_params']['logging'] == 'Y') {
        Sberbank::writeLog($response, 'sberbank.log');
    }
    if (!$sberbank->isError()) {
        $pp_response = array('transaction_id' => $response['orderId']);
        fn_update_order_payment_info($order_id, $pp_response);
        fn_create_payment_form($response['formUrl'], array(), 'SberBank Online', true, 'GET');
    } else {
        $pp_response['order_status'] = 'F';
        $pp_response['reason_text'] = $sberbank->getErrorText();
        fn_finish_payment($order_id, $pp_response);
        fn_order_placement_routines('route', $order_id, false);
    }
}
开发者ID:ambient-lounge,项目名称:site,代码行数:31,代码来源:sberbank.php

示例13: array

        $post_data_values = array('mid', 'orderid', 'status', 'orderAmount', 'currency', 'paymentTotal', 'riskScore', 'payMethod', 'txId', 'paymentRef');
        foreach ($post_data_values as $post_data_value) {
            if (isset($_REQUEST[$post_data_value])) {
                $post_data[] = $_REQUEST[$post_data_value];
            }
        }
        $digest = base64_encode(sha1(implode('', $post_data) . $processor_data['processor_params']['shared_secret'], true));
        if ($_REQUEST['status'] == 'CAPTURED') {
            $pp_response['order_status'] = 'P';
            $pp_response['reason_text'] = __('transaction_approved');
            $pp_response['transaction_id'] = $_REQUEST['paymentRef'];
        }
    }
    if (fn_check_payment_script('alpha_bank.php', $order_id)) {
        fn_finish_payment($order_id, $pp_response);
        fn_order_placement_routines('route', $order_id);
    }
} else {
    if ($processor_data['processor_params']['mode'] == 'test') {
        $payment_url = 'https://alpha.test.modirum.com/vpos/shophandlermpi';
    } else {
        $payment_url = 'https://www.alphaecommerce.gr/vpos/shophandlermpi';
    }
    $amount = fn_format_price($order_info['total'], $processor_data['processor_params']['currency']);
    $confirm_url = fn_url("payment_notification.success?payment=alpha_bank&order_id={$order_id}", AREA, 'current');
    $cancel_url = fn_url("payment_notification.fail?payment=alpha_bank&order_id={$order_id}", AREA, 'current');
    $post_data = array('mid' => $processor_data['processor_params']['merchant_id'], 'lang' => $processor_data['processor_params']['language'], 'orderid' => time() . $order_id, 'orderDesc' => '#' . $order_id, 'orderAmount' => $amount, 'currency' => $processor_data['processor_params']['currency'], 'payerEmail' => $order_info['email'], 'payerPhone' => $order_info['b_phone'], 'trType' => '1', 'confirmUrl' => $confirm_url, 'cancelUrl' => $cancel_url);
    $post_data['digest'] = base64_encode(sha1(implode('', $post_data) . $processor_data['processor_params']['shared_secret'], true));
    fn_create_payment_form($payment_url, $post_data, 'Alpha Bank', false);
}
exit;
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:alpha_bank.php

示例14: elseif

        } else {
            $pp_response["order_status"] = 'F';
            $pp_response["reason_text"] = "Response code: ";
            if (!empty($processor_error[$_REQUEST['erreur']])) {
                $pp_response["reason_text"] .= $processor_error[$_REQUEST['erreur']];
            } elseif (strstr($_REQUEST['erreur'], '001') == true) {
                $pp_response["reason_text"] .= $processor_error["001xx"];
            } else {
                $pp_response["reason_text"] .= $_REQUEST['erreur'];
            }
        }
        $pp_response['transaction_id'] = $_REQUEST['transac'];
        if (fn_check_payment_script('paybox.php', $order_id)) {
            fn_finish_payment($order_id, $pp_response);
        }
        exit;
    }
} else {
    $paybox_script = fn_payment_url('http', 'paybox_files/modulev2.cgi');
    $pbx_devise = $processor_data['processor_params']['currency'];
    $r_url = fn_url("payment_notification.process?payment=paybox&order_id={$order_id}&sl=" . CART_LANGUAGE, AREA, 'current');
    $pbx_annule = $r_url;
    $pbx_effectue = $r_url;
    $pbx_refuse = $r_url;
    $pbx_retour = "montant:M;ref:R;numauto:A;transac:T;erreur:E;maref:R;";
    $pbx_total = $order_info['total'] * 100;
    $pbx_cmd = $order_info['repaid'] ? $order_id . '_' . $order_info['repaid'] : $order_id;
    $post_data = array('PBX_MODE' => '1', 'PBX_SITE' => $processor_data['processor_params']['site_num'], 'PBX_RANG' => $processor_data['processor_params']['rank_num'], 'PBX_IDENTIFIANT' => $processor_data['processor_params']['identifier'], 'PBX_TOTAL' => $pbx_total, 'PBX_DEVISE' => $pbx_devise, 'PBX_CMD' => $pbx_cmd, 'PBX_PORTEUR' => $order_info['email'], 'PBX_RETOUR' => $pbx_retour, 'PBX_LANGUE' => $processor_data['processor_params']['language'], 'PBX_EFFECTUE' => $pbx_effectue, 'PBX_REFUSE' => $pbx_refuse, 'PBX_ANNULE' => $pbx_annule, 'PBX_BOUTPI' => 'nul', 'PBX_RUF1' => 'POST', 'PBX_TXT' => '<b>Proceeding to Payment Page ...</b>');
    fn_create_payment_form($paybox_script, $post_data, 'PayBox');
    exit;
}
开发者ID:askzap,项目名称:ultimate,代码行数:31,代码来源:paybox.php

示例15: fn_paypal_payment_form

function fn_paypal_payment_form($processor_data, $token)
{
    if ($processor_data['processor_params']['mode'] == 'live') {
        $host = 'https://www.paypal.com';
    } else {
        $host = 'https://www.sandbox.paypal.com';
    }
    $post_data = array('cmd' => '_express-checkout', 'token' => $token);
    $submit_url = "{$host}/webscr";
    fn_create_payment_form($submit_url, $post_data, 'Paypal Express');
}
开发者ID:askzap,项目名称:ultimate,代码行数:11,代码来源:paypal_express.functions.php


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