Exemplo n.º 1
0
$transInfo['td_site_ID'] = $companyInfo['cs_ID'];
$transInfo['payment_schedule'] = '';
$transInfo['nextDateInfo'] = '';
$transInfo['td_one_time_subscription'] = '';
$transInfo['billing_descriptor'] = '';
//$transInfo['td_ca_ID'] = $_SESSION['ca_ID'];
$transInfo['td_is_affiliate'] = '0';
$transInfo['td_is_pending_check'] = '0';
$transInfo['td_is_chargeback'] = '0';
$transInfo['td_recur_processed'] = '0';
//$transInfo['td_recur_next_date']=$td_recur_next_date;
//$transInfo['td_username']=$td_username;
//$transInfo['td_password']=$td_password;
$transInfo['td_product_id'] = $queryInfo['mt_product_id'];
$transInfo['td_customer_fee'] = $companyInfo['cc_customer_fee'];
$bank_ids = merchant_getTransTypes($transInfo['en_ID'], &$transInfo);
foreach ($bank_ids as $bank) {
    if (strtolower($bank['bank_description']) == $transInfo['cardtype']) {
        $transInfo['bank_id'] = $bank['bank_id'];
    }
}
$responseInfo['mode'] = $queryInfo['mt_live_mode'];
$response = execute_transaction(&$transInfo, $queryInfo['mt_live_mode']);
$responseInfo['td_reference_id'] = $response['reference_number'];
if ($response['status'] == 'A') {
    $responseInfo['error'] = 0;
    $responseInfo['approved'] = 1;
    $responseInfo['amount'] = $transInfo['amount'];
} else {
    $responseInfo['error'] = 1;
    if ($response['success']) {
Exemplo n.º 2
0
$str_additional_funds = quote_smart($_SESSION['additional_funds']);
$ProcessingMode = quote_smart($_SESSION['ProcessingMode']);
$totalAmt = $order->amount;
$crossit = !isset($order->row['websiteTable']['cs_crosssale_niche']) || $order->row['websiteTable']['cs_crosssale_niche'] == 0 ? FALSE : TRUE;
if ($crossit) {
    $xSaleArr = isset($_SESSION['xSaleArr']) ? $_SESSION['xSaleArr'] : $order->getXSales($order->row['websiteTable']['cs_crosssale_niche']);
    $_SESSION['xSaleArr'] = $xSaleArr;
    $xSaleDesc = 'For an additional $' . $xSaleArr['rd_initial_amount'] . ' get access to <a href="' . $xSaleArr['cs_URL'] . '" target="_blank">' . $xSaleArr['cs_URL'] . '</a> by checking this box';
    $smarty->assign("flt_xsaleamt", $xSaleArr['rd_initial_amount']);
}
if ($order->customerfee) {
    $am = isset($_POST['crosssales']) ? $order->amount - $order->customerfee + $xSaleArr['rd_initial_amount'] : $order->amount - $order->customerfee;
    $smarty->assign("str_customerfee", "(\$<span id=\"tot3\">" . number_format($am, 2, '.', '') . "</span> charge + \$" . formatMoney($order->customerfee) . " processing fee)");
}
$bank_ids = array();
$bank_ids = merchant_getTransTypes($_SESSION['orderArr']['en_ID'], $_SESSION['orderArr']);
$bank_id = "";
$availWallets = array();
$cnt = 1;
$hasCredit = FALSE;
$paytype['types']['visa'] = array('key' => '1', 'text' => 'Visa', 'bdesc' => 'Visa', 'type' => 'visa', 'disabled' => 'disabled');
$paytype['types']['mastercard'] = array('key' => '1', 'text' => 'MasterCard', 'bdesc' => 'MasterCard', 'type' => 'mastercard', 'disabled' => 'disabled');
foreach ($bank_ids as $key => $val) {
    if (!$_SESSION['bank_id']) {
        $_SESSION['bank_id'] = $val['bank_id'];
    }
    if (!$paytype['selected'] && !$val['bank_disabled']) {
        $paytype['selected'] = $val['bank_id'];
        $paytype['bdesc'] = $val['bank_billing_desc'];
    }
    if ($_SESSION['bank_id'] == $val['bank_id'] && !$val['bank_disabled']) {
Exemplo n.º 3
0
function merchant_getBanksForTransType($en_ID, $transtype)
{
    if (strcasecmp($transtype, "master") == 0) {
        $transtype = "mastercard";
    }
    $transtypes = merchant_getTransTypes($en_ID);
    $bank_ids = $transtypes[strtolower($transtype)];
    return $bank_ids;
}