From 5e0fbec15d8779cc85ba0ca196ef856494098b4e Mon Sep 17 00:00:00 2001 From: tomazpu <32056440+tomazpu@users.noreply.github.com> Date: Tue, 6 Feb 2018 11:21:46 +0100 Subject: [PATCH 1/2] #15 Update when ratepay script is loaded --- wirecardceecheckout.php | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/wirecardceecheckout.php b/wirecardceecheckout.php index f5e5742..1f163b6 100644 --- a/wirecardceecheckout.php +++ b/wirecardceecheckout.php @@ -832,19 +832,23 @@ protected function getPluginHtml($plugin, $selectedPlugin, $pluginSalesPrice) $birthYear = $sessionWirecard->birthYear; } - $customer_id = $this->_getCustomerId(); - - if( isset( $_SESSION['wcp-consumerDeviceId'] ) ) { - $consumerDeviceId = $_SESSION['wcp-consumerDeviceId']; - } else { - $timestamp = microtime(); - $consumerDeviceId = md5( $customer_id . "_" . $timestamp ); - $_SESSION['wcp-consumerDeviceId'] = $consumerDeviceId; - } - $ratepay = ''; - $ratepay .= ''; - $ratepay .= ''; - $ratepay .= ''; + $ratepay = ""; + if (((int)$this->_getMethod()->paymenttype_invoice == 1 && $this->_getInvoiceFinancialInstitution() == "ratepay") || + ((int)$this->_getMethod()->paymenttype_installment == 1 && $this->_getInstallmentFinancialInstitution() == "ratepay")) { + $customer_id = $this->_getCustomerId(); + if (isset($_SESSION['wcp-consumerDeviceId'])) { + $consumerDeviceId = $_SESSION['wcp-consumerDeviceId']; + } else { + $timestamp = microtime(); + $consumerDeviceId = md5( $customer_id . "_" . $timestamp ); + $_SESSION['wcp-consumerDeviceId'] = $consumerDeviceId; + } + + $ratepay = ''; + $ratepay .= ''; + $ratepay .= ''; + $ratepay .= ''; + } $html = $this->renderByLayout('displaypayment', array( 'paymenttypes' => $this->_getEnabledPaymentTypes(), From 126e9f61dd0032776ec3a6b03f9f360a89df7c19 Mon Sep 17 00:00:00 2001 From: tomazpu <32056440+tomazpu@users.noreply.github.com> Date: Tue, 6 Feb 2018 11:23:12 +0100 Subject: [PATCH 2/2] #15 Update plugin version --- .../plg_vmpayment_wirecardceecheckout_update.xml | 15 +++++++++++++++ wirecardceecheckout.php | 2 +- wirecardceecheckout.xml | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/update/plg_vmpayment_wirecardceecheckout_update.xml b/update/plg_vmpayment_wirecardceecheckout_update.xml index e8e9c78..4fdea02 100644 --- a/update/plg_vmpayment_wirecardceecheckout_update.xml +++ b/update/plg_vmpayment_wirecardceecheckout_update.xml @@ -90,4 +90,19 @@ https://www.wirecard.at/ + + Wirecard Checkout Page + Wirecard - Your Full Service Payment Provider + plugin + vmpayment + wirecardceecheckout + 1.7.5 + site + + https://github.com/wirecard/virtuemart3-wcp/archive/1.7.5.zip + + Wirecard + https://www.wirecard.at/ + + \ No newline at end of file diff --git a/wirecardceecheckout.php b/wirecardceecheckout.php index 1f163b6..a119501 100644 --- a/wirecardceecheckout.php +++ b/wirecardceecheckout.php @@ -54,7 +54,7 @@ class plgVmPaymentwirecardceecheckout extends vmPSPlugin protected static $WINDOW_NAME = 'WirecardCEECheckoutFrame'; protected static $PLUGIN_NAME = 'VirtueMart2_CheckoutPage'; - protected static $PLUGIN_VERSION = '1.7.4'; + protected static $PLUGIN_VERSION = '1.7.5'; protected $_method; protected $_order; diff --git a/wirecardceecheckout.xml b/wirecardceecheckout.xml index 54a9671..106be20 100644 --- a/wirecardceecheckout.xml +++ b/wirecardceecheckout.xml @@ -36,7 +36,7 @@ http://www.wirecard.at/ Copyright (C) 2013 Wirecard. All rights reserved. http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL - 1.7.4 + 1.7.5 VMPAYMENT_WIRECARDCEECHECKOUT_PAYMENT_DESCRIPTION