diff --git a/update/plg_vmpayment_wirecardceecheckout_update.xml b/update/plg_vmpayment_wirecardceecheckout_update.xml index 820994f..e8e9c78 100644 --- a/update/plg_vmpayment_wirecardceecheckout_update.xml +++ b/update/plg_vmpayment_wirecardceecheckout_update.xml @@ -75,4 +75,19 @@ https://www.wirecard.at/ + + Wirecard Checkout Page + Wirecard - Your Full Service Payment Provider + plugin + vmpayment + wirecardceecheckout + 1.7.4 + site + + https://github.com/wirecard/virtuemart3-wcp/archive/1.7.4.zip + + Wirecard + https://www.wirecard.at/ + + \ No newline at end of file diff --git a/wirecardceecheckout.php b/wirecardceecheckout.php index 752e80d..f5e5742 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.3'; + protected static $PLUGIN_VERSION = '1.7.4'; protected $_method; protected $_order; @@ -961,7 +961,11 @@ protected function _initiatePayment($cart) } if ( in_array($paymentType, array(WirecardCEE_QPay_PaymentType::IDL, WirecardCEE_QPay_PaymentType::EPS ) ) ) { - $client->setFinancialInstitution($_POST['financialInstitution']); + if (isset($_POST['financialInstitution'])) { + $client->setFinancialInstitution($_POST['financialInstitution']); + } else { + $client->setFinancialInstitution($sessionWirecard->additional["financialInstitution"]); + } } if (array_key_exists('ST', $order['details'])) { $client->createConsumerMerchantCrmId($order['details']['ST']->email); @@ -1040,7 +1044,7 @@ protected function _getEnabledPaymentTypes() $paymentTypes[7]['image'] = strtolower(WirecardCEE_QPay_PaymentType::EPS); $paymentTypes[7]['title'] = $this->_getPaymentTypeName(WirecardCEE_QPay_PaymentType::EPS); $paymentTypes[7]['value'] = WirecardCEE_QPay_PaymentType::EPS; - $paymentTypes[9]['financial_inst'] = WirecardCEE_QPay_PaymentType::getFinancialInstitutions('EPS'); + $paymentTypes[7]['financial_inst'] = WirecardCEE_QPay_PaymentType::getFinancialInstitutions('EPS'); } if ((int)$this->_getMethod()->paymenttype_giropay == 1) { $paymentTypes[8]['image'] = strtolower(WirecardCEE_QPay_PaymentType::GIROPAY); @@ -1929,4 +1933,26 @@ function plgVmOnCheckAutomaticSelectedPayment(VirtueMartCart $cart, array $cart_ return $this->onCheckAutomaticSelected($cart, $cart_prices, $paymentCounter); } -} \ No newline at end of file + public function changePaymentTypeAjax($data) + { + $session = JFactory::getSession(); + $sessionData = $session->get('WIRECARDCEECHECKOUT', 0, 'vm'); + if (!empty($sessionData)) { + $sessionWirecard = unserialize($sessionData); + $sessionWirecard->paymenttype = $data["wirecard_paymenttype"]; + $sessionWirecard->additional = $data["wcp_additional"]; + } + $session->set('WIRECARDCEECHECKOUT', serialize($sessionWirecard), 'vm'); + } + + public function plgVmOnSelfCallFE() + { + $action = vRequest::getCmd('action'); + $data = vRequest::getPost(); + switch ($action) { + case "changePaymentTypeAjax": + $this->changePaymentTypeAjax($data); + break; + } + } +} diff --git a/wirecardceecheckout.xml b/wirecardceecheckout.xml index 328b87f..54a9671 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.3 + 1.7.4 VMPAYMENT_WIRECARDCEECHECKOUT_PAYMENT_DESCRIPTION diff --git a/wirecardceecheckout/tmpl/displaypayment.php b/wirecardceecheckout/tmpl/displaypayment.php index 1621e64..09dcd75 100644 --- a/wirecardceecheckout/tmpl/displaypayment.php +++ b/wirecardceecheckout/tmpl/displaypayment.php @@ -40,12 +40,12 @@ $url = JURI::root() . 'images/stories/virtuemart/' . $this->_psType . '/'; foreach ( $viewData['paymenttypes'] as $pt ) { - ?> + ?>
/> + echo ' checked="checked"' ?> />
- -
+ +

- '; - for ( $day = 31; $day > 0; $day -- ) { - $selected = ''; - if ($viewData['birth_day'] == $day){ - $selected = 'selected'; - } - $birthday .= ''; - } + '; + for ( $day = 31; $day > 0; $day -- ) { + $selected = ''; + if ($viewData['birth_day'] == $day){ + $selected = 'selected'; + } + $birthday .= ''; + } - $birthday .= ''; + $birthday .= ''; - $birthday .= ''; + $birthday .= ''; - $birthday .= ''; - echo $birthday; - ?> + $birthday .= ''; + echo $birthday; + ?>
- + - -
+ +

- - -
+ + +

- +