Skip to content

Commit

Permalink
Merge pull request #18 from wirecard/prestashop17standards
Browse files Browse the repository at this point in the history
Prestashop17standards
  • Loading branch information
rinnhofer authored Jan 26, 2017
2 parents e9f4d5f + 43e8105 commit e05eeb7
Show file tree
Hide file tree
Showing 22 changed files with 416 additions and 562 deletions.
2 changes: 1 addition & 1 deletion wirecardceecheckoutseamless/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>wirecardceecheckoutseamless</name>
<displayName><![CDATA[Wirecard Checkout Seamless]]></displayName>
<version><![CDATA[2.0.0]]></version>
<version><![CDATA[2.0.1]]></version>
<description><![CDATA[Wirecard Checkout Seamless payment module]]></description>
<author><![CDATA[Wirecard]]></author>
<tab><![CDATA[payments_gateways]]></tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,12 @@ public function postProcess()
break;

case 'REFUND':


$op = $this->backendClient->getClient()->refund(
$transaction->ordernumber,
$amount,
$transaction->currency
);


break;

case 'REFUNDREVERSAL':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public function initToolbarTitle()
parent::initToolbarTitle();

switch ($this->display) {

case 'add':
$this->toolbar_title[] = $this->l('Fund transfer');
$this->addMetaTitle($this->l('Fund transfer'));
Expand Down Expand Up @@ -198,7 +197,6 @@ public function initProcess()

$this->display = 'add';
if (Tools::isSubmit('transferFund')) {

$amount = strtr(Tools::getValue('amount'), ',', '.');
if (!Validate::isFloat($amount)) {
$this->errors[] = Tools::displayError('Please enter a valid amount');
Expand Down Expand Up @@ -323,7 +321,9 @@ public function processTransferFund()
private function getExistingOrderDetails($ordernumber)
{
return Db::getInstance()->getRow(
'SELECT * FROM ' . _DB_PREFIX_ . 'wirecard_checkout_seamless_tx WHERE ordernumber = "' . pSQL($ordernumber) . '"'
'SELECT * FROM ' . _DB_PREFIX_ . 'wirecard_checkout_seamless_tx WHERE ordernumber = "' . pSQL(
$ordernumber
) . '"'
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public function initToolbarTitle()
parent::initToolbarTitle();

switch ($this->display) {

case 'add':
$this->toolbar_title[] = $this->l('Send support request');
$this->addMetaTitle($this->l('Send support request'));
Expand All @@ -83,7 +82,7 @@ public function renderForm()
'input' => array(
array(
'type' => 'select',
'label' => $this->l('To:'),
'label' => $this->l('To: '),
'desc' => $this->l('Choose a support channel'),
'name' => 'to',
'required' => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ public function setMedia()

$this->registerJavascript(
'module-wirecardceecheckoutseamless-scripts',
'modules/wirecardceecheckoutseamless/js/scripts.js',
[
'modules/wirecardceecheckoutseamless/views/js/scripts.js',
array(
'priority' => 201,
'attribute' => 'async',
]
)
);
}
}
18 changes: 10 additions & 8 deletions wirecardceecheckoutseamless/controllers/front/paymentIFrame.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ class WirecardCEECheckoutSeamlessPaymentIFrameModuleFrontController extends Modu
*/
public function initContent()
{
$this->ssl = true;
$this->ssl = true;
$this->display_column_left = false;
parent::initContent();

$this->context->smarty->assign(array(
'redirectUrl' => $this->context->cookie->wcsRedirectUrl,
'windowName' => $this->module->getWindowName()
));
$this->context->smarty->assign(
array(
'redirectUrl' => $this->context->cookie->wcsRedirectUrl,
'windowName' => $this->module->getWindowName()
)
);
unset($this->context->cookie->wcsRedirectUrl);

$this->setTemplate('module:wirecardceecheckoutseamless/views/templates/front/payment_iframe.tpl');
Expand All @@ -63,11 +65,11 @@ public function setMedia()

$this->registerJavascript(
'module-wirecardceecheckoutseamless-scripts',
'modules/wirecardceecheckoutseamless/js/scripts.js',
[
'modules/wirecardceecheckoutseamless/views/js/scripts.js',
array(
'priority' => 201,
'attribute' => 'async',
]
)
);
}
}
27 changes: 0 additions & 27 deletions wirecardceecheckoutseamless/css/styles.css

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public function init(Cart $cart)
$dataStorageInit->setOrderIdent($cart->id);

if ($this->module->getConfigValue('creditcardoptions', 'pci3_dss_saq_a_enable')) {

$dataStorageInit->setJavascriptScriptVersion('pci3');
if (Tools::strlen(trim($this->module->getConfigValue('creditcardoptions', 'iframe_css_url')))) {
$dataStorageInit->setIframeCssUrl(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ public function getConsentTxt()
{
$txt = $this->module->getPaymentTranslations()['consentTxt'];

return sprintf($txt, $this->getPayolutionLink());
return utf8_decode(sprintf($txt, $this->getPayolutionLink()));
}

/**
Expand All @@ -827,7 +827,7 @@ public function getMinAgeMessage()
{
$txt = $this->module->getPaymentTranslations()['minAgeMessage'];

return sprintf($txt, $this->getMinAge());
return utf8_decode(sprintf($txt, $this->getMinAge()));
}

/**
Expand All @@ -850,7 +850,7 @@ public function getPayolutionLink()
$mid = Configuration::get('WCS_OPTIONS_PAYOLUTION_MID');

if (!Tools::strlen($mid)) {
return $this->module->getPaymentTranslations()['consentTxt'];
return $this->module->getPaymentTranslations()['consent'];
}

//$Swift_Message_Encoder = new Swift_Message_Encoder()
Expand All @@ -864,7 +864,7 @@ public function getPayolutionLink()
$this->module->getPaymentTranslations()['consent']
);
} else {
return $this->module->getPaymentTranslations()['consentTxt'];
return $this->module->getPaymentTranslations()['consent'];
}
}
}
Loading

0 comments on commit e05eeb7

Please sign in to comment.