From 9de2f7ae6bc7fa2cf499b8605ac9f7c81ee2778c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timon=20R=C3=B6nisch?= Date: Mon, 4 Apr 2016 10:10:40 +0200 Subject: [PATCH] Update of payment method InvoiceB2B. --- app/code/community/Wirecard/CheckoutPage/Helper/Data.php | 2 +- .../community/Wirecard/CheckoutPage/Model/Abstract.php | 2 +- .../community/Wirecard/CheckoutPage/Model/Invoiceb2b.php | 8 +++----- app/code/community/Wirecard/CheckoutPage/etc/config.xml | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/code/community/Wirecard/CheckoutPage/Helper/Data.php b/app/code/community/Wirecard/CheckoutPage/Helper/Data.php index 08c2b28..3ef9fed 100644 --- a/app/code/community/Wirecard/CheckoutPage/Helper/Data.php +++ b/app/code/community/Wirecard/CheckoutPage/Helper/Data.php @@ -33,7 +33,7 @@ class Wirecard_CheckoutPage_Helper_Data extends Mage_Payment_Helper_Data { - protected $_pluginVersion = '4.0.3'; + protected $_pluginVersion = '4.0.4'; protected $_pluginName = 'Wirecard/CheckoutPage'; /** diff --git a/app/code/community/Wirecard/CheckoutPage/Model/Abstract.php b/app/code/community/Wirecard/CheckoutPage/Model/Abstract.php index c7bee7e..26269e0 100644 --- a/app/code/community/Wirecard/CheckoutPage/Model/Abstract.php +++ b/app/code/community/Wirecard/CheckoutPage/Model/Abstract.php @@ -53,7 +53,7 @@ abstract class Wirecard_CheckoutPage_Model_Abstract extends Mage_Payment_Model_M protected $_defaultLocale = 'en'; protected $_order; - protected $_pluginVersion = '4.0.3'; + protected $_pluginVersion = '4.0.4'; protected $_pluginName = 'Wirecard/CheckoutPage'; protected $_formBlockType = 'wirecard_checkoutpage/form'; diff --git a/app/code/community/Wirecard/CheckoutPage/Model/Invoiceb2b.php b/app/code/community/Wirecard/CheckoutPage/Model/Invoiceb2b.php index 34e956e..3474c69 100644 --- a/app/code/community/Wirecard/CheckoutPage/Model/Invoiceb2b.php +++ b/app/code/community/Wirecard/CheckoutPage/Model/Invoiceb2b.php @@ -89,12 +89,10 @@ public function isAvailable($quote = null) } $billingAddress = $quote->getBillingAddress(); - if (strlen($billingAddress->getCompany())) - return true; - - $vat_id = $billingAddress->getData('vat_id'); - if (!strlen($vat_id)) + if (!strlen($billingAddress->getCompany())) + { return false; + } return parent::isAvailable($quote); } diff --git a/app/code/community/Wirecard/CheckoutPage/etc/config.xml b/app/code/community/Wirecard/CheckoutPage/etc/config.xml index 616ea30..d08bdfe 100644 --- a/app/code/community/Wirecard/CheckoutPage/etc/config.xml +++ b/app/code/community/Wirecard/CheckoutPage/etc/config.xml @@ -34,7 +34,7 @@ - 4.0.3 + 4.0.4