You are here

function template_preprocess_commerce_worldpay_bg_success in Commerce Worldpay 7

Template preprocess for the success page.

File

includes/commerce_worldpay_bg.theme.inc, line 75
Theme and pre/process functions.

Code

function template_preprocess_commerce_worldpay_bg_success(&$variables) {
  $order = $variables['order'];
  $variables['title'] = t('Payment has been completed');
  _template_common_variables_worldpay_bg($variables);
  $url_options = array();
  if ($variables['settings']['payment_urls']['force_non_ssl_links']) {
    $url_options['https'] = FALSE;
  }
  $variables['return_url'] = url('checkout/' . $order->order_id . '/payment/return/' . $order->data['payment_redirect_key'], array(
    'absolute' => TRUE,
  ) + $url_options);
}