Skip to content

Commit

Permalink
Merge pull request #11 from wirecard/TPWDCEE-196
Browse files Browse the repository at this point in the history
#10 add consumerDeviceId
  • Loading branch information
rinnhofer authored Aug 31, 2017
2 parents 7ca7e50 + a45ac4e commit 6f9db52
Show file tree
Hide file tree
Showing 395 changed files with 36 additions and 6 deletions.
4 changes: 4 additions & 0 deletions includes/plugins/wirecard_checkout_page/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
<CreateDate>2017-06-14</CreateDate>
<!--<SQL>install.sql</SQL>-->
</Version>
<Version nr="109">
<CreateDate>2017-08-31</CreateDate>
<!--<SQL>install.sql</SQL>-->
</Version>
<Adminmenu>
<Settingslink sort="1">
<Name>Einstellungen</Name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,23 @@
*/
global $smarty, $customer;

ini_set("display_errors", "on");
error_reporting(E_ALL);
ini_set('include_path', dirname(__FILE__) . '/../paymentmethod/classes/lib/' . PATH_SEPARATOR .ini_get('include_path'));
require_once "autoload.php";

$tmpl_path = dirname(__FILE__) . '/../paymentmethod/template/';

$step = Shop::Smarty()->getTemplateVars('step');
if (Shop::getPageType() === PAGE_BESTELLVORGANG && $step == 'Zahlung') {
$tmpl_path = dirname(__FILE__) . '/../paymentmethod/template/';

if (Shop::getPageType() == PAGE_BESTELLVORGANG && $step == 'Bestaetigung') {
if (!isset($_SESSION['wcp_consumerDeviceId'])) {
$_SESSION['wcp_consumerDeviceId'] = md5($oPlugin->oPluginEinstellungAssoc_arr['wirecard_checkout_page_customer_id'] . "_" . microtime());
}

$smarty->assign(array('consumerDeviceId' => $_SESSION['wcp_consumerDeviceId']));
pq('footer')->append($smarty->fetch($tmpl_path . "wcp_consumerdeviceid.tpl"));
}

if (Shop::getPageType() === PAGE_BESTELLVORGANG && $step == 'Zahlung') {
$translate = function ($key) use ($oPlugin) {
return !array_key_exists($key,
$oPlugin->oPluginSprachvariableAssoc_arr) ? $key : $oPlugin->oPluginSprachvariableAssoc_arr[$key];
Expand Down Expand Up @@ -119,7 +129,6 @@ function ($match) use ($payolution_mid) {

$smarty->assign($smarty_data);


pq('head')->append($smarty->fetch($tmpl_path . "payment_scripts.tpl"));
foreach ($selectors as $payment => $selector) {
$template_path = $tmpl_path . $payment . ".tpl";
Expand All @@ -132,4 +141,4 @@ function ($match) use ($payolution_mid) {
pq($selector . " label")->append($smarty->fetch($template_path));
}
}
}
}
Loading

0 comments on commit 6f9db52

Please sign in to comment.