diff --git a/Frontend/WirecardCheckoutSeamless/Bootstrap.php b/Frontend/WirecardCheckoutSeamless/Bootstrap.php index 2111894..d711535 100644 --- a/Frontend/WirecardCheckoutSeamless/Bootstrap.php +++ b/Frontend/WirecardCheckoutSeamless/Bootstrap.php @@ -64,7 +64,7 @@ public function getCapabilities() */ public function getVersion() { - return '1.10.4'; + return '1.10.5'; } /** @@ -1016,6 +1016,20 @@ public function onPostDispatch(Enlight_Event_EventArgs $args) $view->addTemplateDir($this->Path() . 'Views/common/'); $view->addTemplateDir($this->Path() . 'Views/responsive/'); + $customerId = Shopware()->WirecardCheckoutSeamless()->Config()->customerid; + + if(Shopware()->Session()->offsetGet('wcsConsumerDeviceId') != null) { + $consumerDeviceId = Shopware()->Session()->offsetGet('wcsConsumerDeviceId'); + } else { + $timestamp = microtime(); + $consumerDeviceId = md5($customerId . "_" . $timestamp); + Shopware()->Session()->offsetSet('wcsConsumerDeviceId', $consumerDeviceId); + } + $ratepay = ''; + $ratepay .= ''; + $ratepay .= ''; + $ratepay .= ''; + $view->ratePayScript = $ratepay; // Output of common errors if (null != Shopware()->WirecardCheckoutSeamless()->wirecard_action) { @@ -1149,6 +1163,8 @@ public function onPostDispatch(Enlight_Event_EventArgs $args) $confirmMailFailed = $variables['confirmMailDeliveryFailed']; $view->addTemplateDir($this->Path() . 'Views/common/'); $view->addTemplateDir($this->Path() . 'Views/responsive/'); + //consumerDeviceId session must be set null here + Shopware()->Session()->offsetSet('wcsConsumerDeviceId', null); $view->pendingPayment = $args->getSubject()->Request()->get('pending'); $view->confirmMailFailed = $confirmMailFailed; diff --git a/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Basket.php b/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Basket.php index a3649c9..74769a1 100644 --- a/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Basket.php +++ b/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Basket.php @@ -128,14 +128,6 @@ public function getData() return $this->_basket; } - /** - * Destructor - */ - public function __destruct() - { - unset( $this ); - } - /*************************************** * PROTECTED METHODS * ***************************************/ diff --git a/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Basket/Item.php b/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Basket/Item.php index afe9858..bb187ce 100644 --- a/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Basket/Item.php +++ b/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Basket/Item.php @@ -259,14 +259,6 @@ public function getImageUrl() return null; } - /** - * Destructor - */ - public function __destruct() - { - unset( $this ); - } - /*************************************** * PROTECTED METHODS * ***************************************/ diff --git a/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Client/ClientAbstract.php b/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Client/ClientAbstract.php index 1ec0fcf..72a7db9 100644 --- a/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Client/ClientAbstract.php +++ b/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Client/ClientAbstract.php @@ -315,14 +315,6 @@ public function getRequestData() return (array) $this->_requestData; } - /** - * Destructor - */ - public function __destruct() - { - unset( $this ); - } - /************************** * PROTECTED METHODS * **************************/ diff --git a/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Config/client.config.php b/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Config/client.config.php index d4c7ff7..531ef01 100644 --- a/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Config/client.config.php +++ b/Frontend/WirecardCheckoutSeamless/Components/WirecardCEE/Stdlib/Config/client.config.php @@ -32,7 +32,7 @@ return Array( 'MODULE_NAME' => 'WirecardCEE_Stdlib', - 'MODULE_VERSION' => '3.0.2', + 'MODULE_VERSION' => '3.0.3', 'DEPENDENCIES' => array( 'SCRIPTING_LANG' => 'PHP', 'SCRIPTING_LANG_VERSION' => '5.2' diff --git a/Frontend/WirecardCheckoutSeamless/Models/Seamless.php b/Frontend/WirecardCheckoutSeamless/Models/Seamless.php index 9189e68..5ad7fce 100644 --- a/Frontend/WirecardCheckoutSeamless/Models/Seamless.php +++ b/Frontend/WirecardCheckoutSeamless/Models/Seamless.php @@ -78,6 +78,11 @@ public function initPayment($confirmUrl) $init->setConfirmUrl($confirmUrl); $init->setOrderReference(Shopware()->WirecardCheckoutSeamless()->wWirecardCheckoutSeamlessId); + if(Shopware()->Session()->offsetGet('wcsConsumerDeviceId') != null) { + $init->consumerDeviceId = Shopware()->Session()->offsetGet('wcsConsumerDeviceId'); + //default set to null, but no effect + Shopware()->Session()->offsetSet('wcsConsumerDeviceId', null); + } foreach ($cfg->wirecardCheckoutSeamlessParameters() as $action => $value) { if (!is_null($value)) { diff --git a/Frontend/WirecardCheckoutSeamless/Views/responsive/frontend/checkout/confirm.tpl b/Frontend/WirecardCheckoutSeamless/Views/responsive/frontend/checkout/confirm.tpl index e440476..8134da1 100644 --- a/Frontend/WirecardCheckoutSeamless/Views/responsive/frontend/checkout/confirm.tpl +++ b/Frontend/WirecardCheckoutSeamless/Views/responsive/frontend/checkout/confirm.tpl @@ -14,6 +14,9 @@ oldShopVersion = {$oldShopVersion|json_encode}; } + {if isset($ratePayScript)} + {$ratePayScript} + {/if} {/block} diff --git a/README.md b/README.md index a09a596..b7340d9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Wirecard Checkout Seamless plugin for Shopware [![License](https://img.shields.io/badge/license-GPLv2-blue.svg)](https://raw.githubusercontent.com/wirecard/Shopware-WCS/master/LICENSE) -[![Shopware](https://img.shields.io/badge/Shopware-v5.3.1-green.svg)](https://www.shopware.com/) +[![Shopware](https://img.shields.io/badge/Shopware-v5.3.2-green.svg)](https://www.shopware.com/) [![PHP v7](https://img.shields.io/badge/php-v7-yellow.svg)](http://www.php.net) [![PHP v5.6](https://img.shields.io/badge/php-v5.6-yellow.svg)](http://www.php.net)