示例#1
0
            //не забываем что суммы в копейках
            $form .= '<input type="radio" name="amount" value="' . $eachprice . '" ' . $selected . '> ' . $eachprice / 100 . ' ' . $merchant_currency . '<br>';
            $i++;
        }
    } else {
        $form .= '<input type="text" name="amount"> ' . $merchant_currency;
    }
    //передаем прочие нужные параметры
    $form .= '<input type="hidden" name="desc" value="' . $customer_id . '">';
    $form .= '<input type="hidden" name="good" value="' . $good_url . '">';
    $form .= '<input type="hidden" name="bad" value="' . $bad_url . '">';
    $form .= '<input type="hidden" name="lang" value="' . $lang . '">';
    $form .= '<input type="hidden" name="id" value="' . $merchant_id . '">';
    $form .= '<br> <input type="submit">';
    $form .= '</form> </p>';
    return $form;
}
// строим форму выбора сумы платежа
$payment_form = ipay_form($customer_id, $debug, $method, $ipay_sandbox, $ipay_link, $merchant_id, $avail_prices, $lang, $good_url, $bad_url, $merchant_currency);
//если надо логаем формочку со всеми потрохами
if ($log_forms) {
    $datetime = curdatetime();
    $log_file = "config/forms.log";
    $remote_ip = $_SERVER['REMOTE_ADDR'];
    $log_data = '=======================' . $datetime . "\n";
    $log_data .= $payment_form;
    $log_data .= "\n" . '=======================' . "\n";
    file_put_contents($log_file, $log_data, FILE_APPEND);
}
//показываем все что нужно в темплейт
include $template_file;
示例#2
0
        if (!empty($conf_ipay['MTS_URL']) && !empty($conf_ipay['MTS_TITLE'])) {
            $j++;
            $form .= '<p><h3 class="title">' . $j++ . '. ' . $title . $conf_ipay['MTS_TITLE'] . "</h3>\n" . '<form action="' . $conf_ipay['MTS_URL'] . '" method="' . $conf_ipay['SEND_METHOD'] . '">' . "\n";
            $form .= $inputs;
            $inputs .= '<input type="hidden" name="srv_no" value="' . $conf_ipay['MERCHANT_ID'] . '">' . "\n";
            $form .= '</form></p>';
        }
        if (!empty($conf_ipay['LIFE_URL']) && !empty($conf_ipay['LIFE_TITLE'])) {
            $j++;
            $form .= '<p><h3 class="title">' . $j++ . '. ' . $title . $conf_ipay['LIFE_TITLE'] . "</h3>\n" . '<form action="' . $conf_ipay['LIFE_URL'] . '" method="' . $conf_ipay['SEND_METHOD'] . '">' . "\n";
            $form .= $inputs;
            $inputs .= '<input type="hidden" name="srv_no" value="' . $conf_ipay['MERCHANT_ID'] . '">' . "\n";
            $form .= '</form></p>';
        }
        if (!empty($conf_ipay['ERIP_TEXT']) && !empty($conf_ipay['ERIP_TITLE'])) {
            $j++;
            $form .= '<p><h3 class="title">' . $j++ . '. ' . $conf_ipay['ERIP_TITLE'] . "\n";
            $form .= $conf_ipay['ERIP_TEXT'] . '</p>';
        }
    }
    $strtgs = trim(strip_tags($form));
    if ($strtgs == $conf_ipay['TITLE']) {
        $form = __('Nothing found');
    }
    return $form;
}
// Выводим форму платежа
//$order_array=fn_shop_get_orderdata($customer_id);
$order_array = op_CustomersGetAll();
$payment_form = ipay_form($customer_id, $avail_prices);
include $template_file;