diff --git a/Model/ConfigProvider.php b/Model/ConfigProvider.php index 51516fd0..aecc205c 100644 --- a/Model/ConfigProvider.php +++ b/Model/ConfigProvider.php @@ -264,7 +264,6 @@ protected function getPayoneConfig() 'bankCodeValidatedAndValid' => false, 'blockedMessage' => $this->paymentHelper->getBankaccountCheckBlockedMessage(), 'epsBankGroups' => Eps::getBankGroups(), - 'idealBankGroups' => Ideal::getBankGroups(), 'customerBirthday' => $this->customerHelper->getCustomerBirthday(), 'addresscheckEnabled' => (int)$this->requestHelper->getConfigParam('enabled', 'address_check', 'payone_protect'), 'addresscheckBillingEnabled' => $this->requestHelper->getConfigParam('check_billing', 'address_check', 'payone_protect') == 'NO' ? 0 : 1, diff --git a/Model/Methods/OnlineBankTransfer/Ideal.php b/Model/Methods/OnlineBankTransfer/Ideal.php index aa398275..1bcf1b4c 100644 --- a/Model/Methods/OnlineBankTransfer/Ideal.php +++ b/Model/Methods/OnlineBankTransfer/Ideal.php @@ -56,28 +56,6 @@ class Ideal extends OnlineBankTransferBase */ protected $sSubType = self::METHOD_OBT_SUBTYPE_IDEAL; - /** - * Array of all available bank groups - * - * @var array - */ - protected static $aBankGroups = [ - 'ABN_AMRO_BANK' => 'ABN Amro Bank', - 'ASN_BANK' => 'ASN Bank', - 'ING_BANK' => 'ING Bank', - 'RABOBANK' => 'Rabobank', - 'SNS_BANK' => 'SNS Bank', - 'SNS_REGIO_BANK' => 'SNS Regio Bank', - 'TRIODOS_BANK' => 'Triodos Bank', - 'VAN_LANSCHOT_BANKIERS' => 'Van Lanschot Kempen', - 'KNAB_BANK' => 'Knab Bank', - 'BUNQ_BANK' => 'Bunq Bank', - 'REVOLUT' => 'Revolut', - 'YOURSAFE' => 'Yoursafe', - 'NATIONALE_NEDERLANDEN' => 'Nationale-Nederlanden', - 'N26' => 'N26', - ]; - /** * Return parameters specific to this payment sub type * @@ -86,48 +64,10 @@ class Ideal extends OnlineBankTransferBase */ public function getSubTypeSpecificParameters(Order $oOrder) { - $oInfoInstance = $this->getInfoInstance(); - $aParams = [ 'bankcountry' => 'NL', - 'bankgrouptype' => $oInfoInstance->getAdditionalInformation('bank_group'), ]; return $aParams; } - - /** - * Add the checkout-form-data to the checkout session - * - * @param DataObject $data - * @return $this - */ - public function assignData(DataObject $data) - { - parent::assignData($data); - - $oInfoInstance = $this->getInfoInstance(); - $oInfoInstance->setAdditionalInformation('bank_group', $this->toolkitHelper->getAdditionalDataEntry($data, 'bank_group')); - - return $this; - } - - /** - * Return available bank groups - * - * @return array - */ - public static function getBankGroups() - { - $aReturn = []; - - foreach (self::$aBankGroups as $sKey => $sTitle) { - $aReturn[] = [ - 'id' => $sKey, - 'title' => mb_convert_encoding($sTitle, 'UTF-8'), - ]; - } - - return $aReturn; - } } diff --git a/Test/Unit/Model/Methods/OnlineBankTransfer/IdealTest.php b/Test/Unit/Model/Methods/OnlineBankTransfer/IdealTest.php index a3551f42..86516cfb 100644 --- a/Test/Unit/Model/Methods/OnlineBankTransfer/IdealTest.php +++ b/Test/Unit/Model/Methods/OnlineBankTransfer/IdealTest.php @@ -51,16 +51,7 @@ protected function setUp(): void { $this->objectManager = $this->getObjectManager(); - $info = $this->getMockBuilder(InfoInterface::class)->disableOriginalConstructor()->getMock(); - $info->method('getAdditionalInformation')->willReturn('info'); - - $toolkitHelper = $this->getMockBuilder(Toolkit::class)->disableOriginalConstructor()->getMock(); - $toolkitHelper->method('getAdditionalDataEntry')->willReturn('info'); - - $this->classToTest = $this->objectManager->getObject(ClassToTest::class, [ - 'toolkitHelper' => $toolkitHelper - ]); - $this->classToTest->setInfoInstance($info); + $this->classToTest = $this->objectManager->getObject(ClassToTest::class); } public function testGetSubTypeSpecificParameters() @@ -68,15 +59,7 @@ public function testGetSubTypeSpecificParameters() $order = $this->getMockBuilder(Order::class)->disableOriginalConstructor()->getMock(); $result = $this->classToTest->getSubTypeSpecificParameters($order); - $expected = ['bankcountry' => 'NL', 'bankgrouptype' => 'info']; + $expected = ['bankcountry' => 'NL']; $this->assertEquals($expected, $result); } - - public function testAssignData() - { - $data = $this->getMockBuilder(DataObject::class)->disableOriginalConstructor()->getMock(); - - $result = $this->classToTest->assignData($data); - $this->assertInstanceOf(ClassToTest::class, $result); - } } diff --git a/view/frontend/web/js/view/payment/method-renderer/obt_ideal-method.js b/view/frontend/web/js/view/payment/method-renderer/obt_ideal-method.js index e3a241b9..ed052b3b 100644 --- a/view/frontend/web/js/view/payment/method-renderer/obt_ideal-method.js +++ b/view/frontend/web/js/view/payment/method-renderer/obt_ideal-method.js @@ -29,33 +29,12 @@ define( 'use strict'; return Component.extend({ defaults: { - template: 'Payone_Core/payment/obt_ideal', - bankGroup: '' - }, - - initObservable: function () { - this._super() - .observe([ - 'bankGroup' - ]); - return this; - }, - - getData: function () { - var parentReturn = this._super(); - if (parentReturn.additional_data === null) { - parentReturn.additional_data = {}; - } - parentReturn.additional_data.bank_group = this.bankGroup(); - return parentReturn; + template: 'Payone_Core/payment/obt_ideal' }, /** Returns payment method instructions */ getInstructions: function () { return window.checkoutConfig.payment.instructions[this.item.method]; - }, - getBankGroups: function () { - return window.checkoutConfig.payment.payone.idealBankGroups; } }); } diff --git a/view/frontend/web/template/payment/obt_ideal.html b/view/frontend/web/template/payment/obt_ideal.html index 7008d5a7..5f2c1aba 100644 --- a/view/frontend/web/template/payment/obt_ideal.html +++ b/view/frontend/web/template/payment/obt_ideal.html @@ -41,28 +41,6 @@ - -
-