Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions payu/payu.php
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,6 @@ public function fetchTemplate($name)
*/
public function hookBackOfficeHeader()
{
$output = '<link type="text/css" rel="stylesheet" href="' . _MODULE_DIR_ . $this->name . '/css/payu.css" />';

return $output;
}
Expand Down Expand Up @@ -737,12 +736,14 @@ public function hookActionGetExtraMailTemplateVars(array &$params)
'order_reference' => $params['template_vars']['{order_name}']
];
$url = $this->context->link->getPageLink('guest-tracking', null, null, $urlParams);
$url = str_replace(' ', '%20', $url);

} else {
$urlParams = [
'id_order' => $id_order
];
$url = $this->context->link->getPageLink('order-detail', null, null, $urlParams);
$url = str_replace(' ', '%20', $url);
}

$params['extra_template_vars']['{payment}'] = $params['template_vars']['{payment}'] . ', <a href="' . $url . '#repayment">' . $this->l('Repay by PayU') . '</a>';
Expand Down Expand Up @@ -1630,6 +1631,8 @@ public function orderCreateRequestByOrder($orderTotal, $payMethod = null, $param
];
$continueUrl = $this->context->link->getPageLink('order-confirmation', null, null, $params);

$continueUrl = str_replace(' ', '%20', $continueUrl);

$ocreq = [
'merchantPosId' => OpenPayU_Configuration::getMerchantPosId(),
'description' => $this->l('Order:') . ' ' . $this->order->id . ' - ' . $this->order->reference . ', ' . $this->l('Store:') . ' ' . Configuration::get('PS_SHOP_NAME'),
Expand Down Expand Up @@ -2067,7 +2070,7 @@ private function getLanguage()
{
$iso = Language::getIsoById($this->context->language->id);

return $iso === 'gb' ? 'en' : $iso;
return in_array($iso, ['gb', 'si']) ? 'en' : $iso;
}

/**
Expand Down