本文整理汇总了PHP中osc_route_url函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_route_url函数的具体用法?PHP osc_route_url怎么用?PHP osc_route_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_route_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: minify_scripts
/**
* Gets a minify url with all the scripts in the queue
* @return string Url
*/
function minify_scripts()
{
$scripts = minify_filter_external_js();
osc_register_script('minify_scripts', osc_route_url('minify_scripts', array('minify_files' => implode(',', minify_clean_url($scripts)))));
osc_enqueue_script('minify_scripts');
return;
}
示例2: processData
private function processData($products)
{
if (!empty($products)) {
$total = 0;
foreach ($products as $aRow) {
$row = array();
$row['id'] = $aRow['id'];
$row['description'] = $aRow['description'];
$row['amount'] = osc_format_price(1000000 * $aRow['amount'], osc_get_preference('currency', 'payment_pro'));
$row['quantity'] = $aRow['quantity'];
$row['total'] = osc_format_price(1000000 * $aRow['amount'] * $aRow['quantity'], osc_get_preference('currency', 'payment_pro'));
$row['delete'] = '<a href="' . osc_route_url('payment-pro-cart-delete', array('id' => $aRow['id'])) . '" >' . __('Delete', 'payment_pro') . '</a>';
$row = osc_apply_filter('payment_pro_processing_row', $row, $aRow);
$this->addRow($row);
$this->rawRows[] = $aRow;
$total += $aRow['amount'] * $aRow['quantity'];
}
$row = array();
$row['id'] = '';
$row['description'] = '';
$row['amount'] = '';
$row['quantity'] = '<b>' . __('Total', 'payment_pro') . '</b>';
$row['total'] = '<b>' . osc_format_price(1000000 * $total, osc_get_preference('currency', 'payment_pro')) . '</b>';
$row['delete'] = '';
$this->addRow($row);
//$this->rawRows[] = $row;
}
}
示例3: button
public static function button($products, $extra = null)
{
$Amount = 0;
foreach ($products as $p) {
$Amount += $p['amount'] * $p['quantity'];
}
$r = rand(0, 1000);
$extra['random'] = $r;
$extra['items'] = $products;
$extra['amount'] = $Amount;
$extra = payment_pro_set_custom($extra);
$tx_id = ModelPaymentPro::newInstance()->pendingInvoice($products);
$Merchant_Id = osc_get_preference('ccavenue_merchant_id', 'payment_pro');
$Order_Id = $tx_id;
// use order id/invoice id instead of product_id
$WorkingKey = osc_get_preference('ccavenue_working_key', 'payment_pro');
$Redirect_Url = osc_route_url('ccavenue-redirect');
$Checksum = self::_getCheckSum($Merchant_Id, $Amount, $Order_Id, $Redirect_Url, $WorkingKey);
?>
<li class="payment ccavenue-btn">
<form id="ccavenue_<?php
echo $r;
?>
" name="paymentform" method="post" action="https://www.ccavenue.com/shopzone/cc_details.jsp">
<input type="hidden" name="Merchant_Id" value="<?php
echo $Merchant_Id;
?>
">
<input type="hidden" name="Amount" value="<?php
echo $Amount;
?>
">
<input type="hidden" name="Order_Id" value="<?php
echo $Order_Id;
?>
">
<input type="hidden" name="Redirect_Url" value="<?php
echo $Redirect_Url;
?>
">
<input type="hidden" name="Checksum" value="<?php
echo $Checksum;
?>
">
<input type="hidden" name="Merchant_Param" value="<?php
echo $extra;
?>
">
</form>
<a id="button-confirm" class="button" onclick="$('#ccavenue_<?php
echo $r;
?>
').submit();"><span><img style="cursor:pointer;cursor:hand" src='<?php
echo PAYMENT_PRO_URL;
?>
payments/ccavenue/ccavenue.gif' border='0' /></span></a>
</li>
<?php
}
示例4: createOrder
public static function createOrder()
{
if (osc_get_preference('coinjar_sandbox', 'payment') != 1) {
$coinjar = new CoinJar(payment_decrypt(osc_get_preference('coinjar_merchant_user', 'payment')), payment_decrypt(osc_get_preference('coinjar_merchant_password', 'payment')), payment_decrypt(osc_get_preference('coinjar_api_key', 'payment')));
} else {
$coinjar = new CoinJar(payment_decrypt(osc_get_preference('coinjar_sb_merchant_user', 'payment')), payment_decrypt(osc_get_preference('coinjar_sb_merchant_password', 'payment')), payment_decrypt(osc_get_preference('coinjar_sb_api_key', 'payment')), true);
}
$items[0]['name'] = Params::getParam('description');
$items[0]['quantity'] = 1;
$items[0]['amount'] = payment_get_amount(Params::getParam('itemnumber'));
$order_json = $coinjar->createOrder($items, osc_get_preference('currency', 'payment'), Params::getParam('itemnumber'), osc_get_preference('coinjar_merchant_reference', 'payment'), osc_route_url('coinjar-notify', array('extra' => Params::getParam('extra'))), osc_route_url('coinjar-return', array('extra' => Params::getParam('extra'))), osc_route_url('coinjar-cancel', array('extra' => Params::getParam('extra'))));
$order = json_decode($order_json);
if (isset($order->order->uuid)) {
echo json_encode(array('url' => $coinjar->orderPage($order->order->uuid), 'error' => 0));
} else {
echo json_encode(array('error' => 1, 'status' => @$order->order->status, 'msg' => @$order->order->error));
}
}
示例5: osc_add_flash_ok_message
//Redirect to thank you page
} else {
osc_add_flash_ok_message(_m('Changes have been applied'));
osc_redirect_to(osc_route_url('payment-publish', array('itemId' => $iItemId)));
}
} elseif (isset($result_array->name)) {
osc_add_flash_ok_message(_m($result_array->name));
osc_redirect_to(osc_route_url('payment-publish', array('itemId' => $iItemId)));
}
}
}
if (isset($_POST['paypal-payment'])) {
$item_title = Params::getParam('item_title');
$premium_cost = Params::getParam('premium_cost');
$paypal_api_server = osc_get_preference('paypal_server_classic', 'classified');
$paypal_server = osc_get_preference('paypal_server', 'classified');
$username = osc_get_preference('paypal_username', 'classified');
$password = osc_get_preference('paypal_password', 'classified');
$signature = osc_get_preference('paypal_signature', 'classified');
$currency = osc_get_preference('default_currency', 'classified');
$id = Params::getParam('itemId');
$post_data = array('USER' => $username, 'PWD' => $password, 'SIGNATURE' => $signature, 'VERSION' => '93', 'PAYMENTREQUEST_0_PAYMENTACTION' => 'SALE', 'PAYMENTREQUEST_0_AMT' => $premium_cost, 'PAYMENTREQUEST_0_ITEMAMT' => $premium_cost, 'PAYMENTREQUEST_0_CURRENCYCODE' => $currency, 'PAYMENTREQUEST_0_DESC' => 'Premium payment for ' . $item_title, 'METHOD' => 'SetExpressCheckout', 'RETURNURL' => osc_route_url('payment-return', array('itemId' => $id)), 'CANCELURL' => osc_route_url('payment-cancel', array('itemId' => $id)), 'L_PAYMENTREQUEST_0_AMT0' => $premium_cost, 'L_PAYMENTREQUEST_0_QTY0' => 1, 'L_PAYMENTREQUEST_0_NAME0' => 'Premium payment for ' . $item_title);
$response = execute_paypal_nvp_post($post_data, $paypal_api_server);
if ($response['ACK'] == 'Success') {
$token = $response['TOKEN'];
header('Location:' . $paypal_server . 'cgi-bin/webscr?cmd=_express-checkout&token=' . $token);
} elseif ($response['ACK'] == 'Failure') {
osc_add_flash_error_message(_m($response['L_LONGMESSAGE0']));
osc_redirect_to(osc_route_url('payment-publish', array('itemId' => $id)));
}
}
示例6: osc_add_flash_ok_message
<?php
$status = CcavenuePayment::processPayment();
// GET TX ID
$tx = Params::getParam('Order_Id');
if ($status == PAYMENT_PRO_COMPLETED) {
osc_add_flash_ok_message(__('Payment processed correctly', 'payment_pro'));
} else {
if ($status == PAYMENT_PRO_PENDING) {
osc_add_flash_info_message(__('We are processing your payment, if we did not finish in a few seconds, please contact us', 'payment_pro'));
} else {
osc_add_flash_error_message(sprintf(__('Something failed! Please write down this transaction ID and contact us: %s', 'payment_pro'), $tx));
}
}
payment_pro_js_redirect_to(osc_route_url('payment-pro-done', array('tx' => $tx)));
示例7: nc_osc_get_public_picture_link
</div>
<div class="col-lg-6 col-md-6">
<div class="row">
<!--<a href="#seller-profile" role="button" data-toggle="modal" data-target="#seller-profile">Seller Profile</a>-->
<img src="<?php
echo nc_osc_get_public_picture_link(osc_item_user_id());
?>
" class="img-responsive">
</div>
<div class="row">
<?php
if (osc_logged_user_id() != osc_item_user_id()) {
?>
<!--<a href="<?php
echo osc_route_url('seller-items', array('seller' => osc_item_user_id()));
?>
" >-->
<a href="<?php
echo osc_search_url(array('seller_post' => osc_item_user_id()));
?>
">See other items from seller</a>
<?php
}
?>
</div>
<div class="row">
<?php
if (osc_is_web_user_logged_in()) {
?>
<?php
示例8: payment_user_menu
/**
* Create a new menu option on users' dashboards
*/
function payment_user_menu()
{
echo '<li class="opt_payment" ><a href="' . osc_route_url('payment-user-menu') . '" >' . __("Listings payment status", "payment") . '</a></li>';
if (osc_get_preference('pack_price_1', 'payment') != '' && osc_get_preference('pack_price_1', 'payment') != '0' || osc_get_preference('pack_price_2', 'payment') != '' && osc_get_preference('pack_price_2', 'payment') != '0' || osc_get_preference('pack_price_3', 'payment') != '' && osc_get_preference('pack_price_3', 'payment') != '0') {
echo '<li class="opt_payment_pack" ><a href="' . osc_route_url('payment-user-pack') . '" >' . __("Buy credit for payments", "payment") . '</a></li>';
}
}
示例9: payment_pro_show_item
function payment_pro_show_item($item)
{
if (osc_get_preference("pay_per_post", 'payment_pro') == "1" && !ModelPaymentPro::newInstance()->publishFeeIsPaid($item['pk_i_id'])) {
if (osc_is_admin_user_logged_in()) {
osc_get_flash_message('pubMessages', true);
osc_add_flash_warning_message(__('The listing hasn\'t been paid', 'payment_pro'));
} else {
if (osc_is_web_user_logged_in() && osc_logged_user_id() == $item['fk_i_user_id']) {
osc_get_flash_message('pubMessages', true);
osc_add_flash_warning_message(sprintf(__('To make this listing available to others, you need to pay a publish fee. <a href="%s">Continue and make the ad public</a>', 'payment_pro'), osc_route_url('payment-pro-user-menu')));
} else {
ob_get_clean();
Rewrite::newInstance()->set_location('error');
header('HTTP/1.1 400 Bad Request');
osc_current_web_theme_path('404.php');
exit;
}
}
}
}
示例10: addPublish
}
});
}
function addPublish(id) {
$("#pub_" + id).attr('disabled', true);
$.ajax({
type: "POST",
url: '<?php
echo osc_ajax_plugin_url(PAYMENT_PRO_PLUGIN_FOLDER . 'ajax.php');
?>
&pub=' + id,
dataType: 'json',
success: function(data){
if(data.error==0) {
window.location = '<?php
echo osc_route_url('payment-pro-checkout');
?>
';
} else {
$("#pub_" + id).attr('disabled', false);
var flash = $("#flash_js");
var message = $('<div>').addClass('flashmessage').addClass('flashmessage-error').attr('id', 'flashmessage').html(data.msg);
flash.html(message);
$("#flashmessage").slideDown('slow').delay(3000).slideUp('slow');
$("html, body").animate({ scrollTop: 0 }, "slow");
}
}
});
}
</script>
<?php
示例11: recurringButton
public static function recurringButton($subscription, $extra = null)
{
$r = rand(0, 1000);
$extra['random'] = $r;
$extra = payment_pro_set_custom($extra);
if (osc_get_preference('paypal_sandbox', 'payment_pro') == 1) {
$ENDPOINT = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
} else {
$ENDPOINT = 'https://www.paypal.com/cgi-bin/webscr';
}
?>
<form class="nocsrf" action="<?php
echo $ENDPOINT;
?>
" method="post" id="paypal_<?php
echo $r;
?>
">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<input type="hidden" name="notify_url" value="<?php
echo osc_route_url('paypal-notify', array('extra' => $extra));
?>
" />
<input type="hidden" name="return" value="<?php
echo osc_route_url('paypal-return', array('extra' => $extra));
?>
" />
<input type="hidden" name="cancel_return" value="<?php
echo osc_route_url('paypal-cancel', array('extra' => $extra));
?>
" />
<input type="hidden" name="business" value="<?php
echo osc_get_preference('paypal_email', 'payment_pro');
?>
" />
<input type="hidden" name="item_name" value="<?php
echo $subscription['description'];
?>
" />
<input type="hidden" name="a3" value="<?php
echo $subscription['amount'];
?>
" />
<input type="hidden" name="p3" value="<?php
echo $subscription['duration'];
?>
" />
<input type="hidden" name="t3" value="<?php
echo $subscription['period'];
?>
" />
<input type="hidden" name="src" value="1" />
<input type="hidden" name="currency_code" value="<?php
echo osc_get_preference('currency', 'payment_pro');
?>
" />
<input type="hidden" name="custom" value="<?php
echo $extra;
?>
" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="charset" value="utf-8" />
</form>
<div class="buttons">
<div class="right"><a style="cursor:pointer;cursor:hand" id="button-confirm" class="button" onclick="$('#paypal_<?php
echo $r;
?>
').submit();"><span><img src='<?php
echo PAYMENT_PRO_URL;
?>
payments/paypal/subscription.gif' border='0' /></span></a></div>
</div>
<?php
}
示例12: ajaxPayment
public static function ajaxPayment()
{
$status = AuthorizePayment::processPayment();
if ($status == PAYMENT_PRO_COMPLETED) {
payment_pro_cart_drop();
osc_add_flash_ok_message(sprintf(__('Success! Please write down this transaction ID in case you have any problem: %s', 'payment_pro'), Params::getParam('braintree_transaction_id')));
payment_pro_js_redirect_to(osc_route_url('payment-pro-done', array('tx' => Params::getParam('braintree_transaction_id'))));
} else {
if ($status == PAYMENT_PRO_ALREADY_PAID) {
payment_pro_cart_drop();
osc_add_flash_warning_message(__('Warning! This payment was already paid', 'payment_pro'));
payment_pro_js_redirect_to(osc_route_url('payment-pro-done', array('tx' => Params::getParam('authorize_transaction_id'))));
} else {
printf(__('There were an error processing your payment: %s', 'payment_pro'), Params::getParam('authorize_error'));
}
}
}
示例13: item_success_redirect
function item_success_redirect($item)
{
if (!OC_ADMIN) {
if (isset($item['pk_i_id'])) {
Session::newInstance()->_dropKeepForm();
if ($item['b_active'] == 0) {
osc_add_flash_ok_message(_m('Check your inbox to validate your listing'));
} else {
// only if enabled and active can show item-success page
if ($item['b_active'] == 1 && $item['b_enabled'] == 1) {
// item-success redirect
Session::newInstance()->_set('inserted_item', $item);
osc_redirect_to(osc_route_url('item-success'));
exit;
}
}
$itemId = Params::getParam('itemId');
$category = Category::newInstance()->findByPrimaryKey(Params::getParam('catId'));
View::newInstance()->_exportVariableToView('category', $category);
osc_redirect_to(osc_search_category_url());
}
}
}
示例14: osc_route_url
<?php
}
?>
<?php
if (!osc_logged_user_id() == osc_item_user_id()) {
?>
<a href="<?php
echo osc_route_url('seller-items', array('seller' => osc_item_user_id()));
?>
" >See other items from seller</a>
<?php
}
?>
<a href="<?php
echo osc_route_url('watchlist');
?>
" >Check my Watchlist</a>
<?php
if (osc_comments_enabled()) {
?>
<?php
if (osc_reg_user_post_comments() && osc_is_web_user_logged_in() || !osc_reg_user_post_comments()) {
?>
<?php
if (nc_osc_show_fb_comment()) {
?>
<div class="fb-comments"
data-href="<?php
echo getUrl();
示例15: payment_send_email
/**
* Send email to un-registered users with payment options
*
* @param integer $item
* @param float $category_fee
*/
function payment_send_email($item, $category_fee)
{
if (osc_is_web_user_logged_in()) {
return false;
}
$mPages = new Page();
$aPage = $mPages->findByInternalName('email_payment');
$locale = osc_current_user_locale();
$content = array();
if (isset($aPage['locale'][$locale]['s_title'])) {
$content = $aPage['locale'][$locale];
} else {
$content = current($aPage['locale']);
}
$item_url = osc_item_url();
$item_url = '<a href="' . $item_url . '" >' . $item_url . '</a>';
$publish_url = osc_route_url('payment-publish', array('itemId' => $item['pk_i_id']));
$premium_url = osc_route_url('payment-premium', array('itemId' => $item['pk_i_id']));
$words = array();
$words[] = array('{ITEM_ID}', '{CONTACT_NAME}', '{CONTACT_EMAIL}', '{WEB_URL}', '{ITEM_TITLE}', '{ITEM_URL}', '{WEB_TITLE}', '{PUBLISH_LINK}', '{PUBLISH_URL}', '{PREMIUM_LINK}', '{PREMIUM_URL}', '{START_PUBLISH_FEE}', '{END_PUBLISH_FEE}', '{START_PREMIUM_FEE}', '{END_PREMIUM_FEE}');
$words[] = array($item['pk_i_id'], $item['s_contact_name'], $item['s_contact_email'], osc_base_url(), $item['s_title'], $item_url, osc_page_title(), '<a href="' . $publish_url . '">' . $publish_url . '</a>', $publish_url, '<a href="' . $premium_url . '">' . $premium_url . '</a>', $premium_url, '', '', '', '');
if ($category_fee == 0) {
$content['s_text'] = preg_replace('|{START_PUBLISH_FEE}(.*){END_PUBLISH_FEE}|', '', $content['s_text']);
}
$premium_fee = ModelPayment::newInstance()->getPremiumPrice($item['fk_i_category_id']);
if ($premium_fee == 0) {
$content['s_text'] = preg_replace('|{START_PREMIUM_FEE}(.*){END_PREMIUM_FEE}|', '', $content['s_text']);
}
$title = osc_mailBeauty($content['s_title'], $words);
$body = osc_mailBeauty($content['s_text'], $words);
$emailParams = array('subject' => $title, 'to' => $item['s_contact_email'], 'to_name' => $item['s_contact_name'], 'body' => $body, 'alt_body' => $body);
osc_sendMail($emailParams);
}