diff --git a/Block/Widget/Button/Toolbar.php b/Block/Widget/Button/Toolbar.php index 058ddb6f3..ba4996afa 100644 --- a/Block/Widget/Button/Toolbar.php +++ b/Block/Widget/Button/Toolbar.php @@ -49,7 +49,6 @@ class Toolbar 'buckaroo_magento2_belfius', 'buckaroo_magento2_transfer', 'buckaroo_magento2_eps', - 'buckaroo_magento2_giropay', 'buckaroo_magento2_kbc', 'buckaroo_magento2_klarna', 'buckaroo_magento2_klarnakp', diff --git a/Helper/Data.php b/Helper/Data.php index d80e6b8c0..ad16cdd32 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -433,7 +433,6 @@ public function getPaymentMethodsList() ['value' => 'emandate', 'label' => __('Digital Debit Authorization')], ['value' => 'eps', 'label' => __('EPS')], ['value' => 'giftcards', 'label' => __('Giftcards')], - ['value' => 'giropay', 'label' => __('Giropay')], ['value' => 'ideal', 'label' => __('iDEAL')], ['value' => 'idealprocessing', 'label' => __('iDEAL Processing')], ['value' => 'kbc', 'label' => __('KBC')], diff --git a/Model/Config/Source/PaymentMethods/AfterExpiry.php b/Model/Config/Source/PaymentMethods/AfterExpiry.php index 661e8016e..ab15b983c 100644 --- a/Model/Config/Source/PaymentMethods/AfterExpiry.php +++ b/Model/Config/Source/PaymentMethods/AfterExpiry.php @@ -37,7 +37,6 @@ public function toOptionArray() ['value' => 'dankort', 'label' => __('Dankort')], ['value' => 'eps', 'label' => __('EPS')], ['value' => 'giftcard', 'label' => __('Giftcards')], - ['value' => 'giropay', 'label' => __('Giropay')], ['value' => 'ideal', 'label' => __('iDEAL')], ['value' => 'idealprocessing', 'label' => __('iDEAL Processing')], ['value' => 'maestro', 'label' => __('Maestro')], diff --git a/Model/Config/Source/PaymentMethods/PayLink.php b/Model/Config/Source/PaymentMethods/PayLink.php index 7de64040d..8c558c2be 100644 --- a/Model/Config/Source/PaymentMethods/PayLink.php +++ b/Model/Config/Source/PaymentMethods/PayLink.php @@ -38,7 +38,6 @@ public function toOptionArray() ['value' => 'dankort', 'label' => __('Dankort')], ['value' => 'eps', 'label' => __('EPS')], ['value' => 'giftcard', 'label' => __('Giftcards')], - ['value' => 'giropay', 'label' => __('Giropay')], ['value' => 'ideal', 'label' => __('iDEAL')], ['value' => 'idealprocessing', 'label' => __('iDEAL Processing')], ['value' => 'maestro', 'label' => __('Maestro')], diff --git a/Model/Config/Source/PaymentMethods/PayPerEmail.php b/Model/Config/Source/PaymentMethods/PayPerEmail.php index f191f7d0a..8f65f5351 100644 --- a/Model/Config/Source/PaymentMethods/PayPerEmail.php +++ b/Model/Config/Source/PaymentMethods/PayPerEmail.php @@ -70,11 +70,6 @@ public function toOptionArray() 'label' => __('Giftcards'), 'code' => 'buckaroo_magento2_giftcards' ], - [ - 'value' => 'giropay', - 'label' => __('Giropay'), - 'code' => 'buckaroo_magento2_giropay' - ], [ 'value' => 'ideal', 'label' => __('iDEAL'), diff --git a/Model/ConfigProvider/Method/Giropay.php b/Model/ConfigProvider/Method/Giropay.php deleted file mode 100644 index 7ebedd842..000000000 --- a/Model/ConfigProvider/Method/Giropay.php +++ /dev/null @@ -1,81 +0,0 @@ -getBuckarooPaymentFeeLabel( - \Buckaroo\Magento2\Model\Method\Giropay::PAYMENT_METHOD_CODE - ); - - return [ - 'payment' => [ - 'buckaroo' => [ - 'giropay' => [ - 'paymentFeeLabel' => $paymentFeeLabel, - 'subtext' => $this->getSubtext(), - 'subtext_style' => $this->getSubtextStyle(), - 'subtext_color' => $this->getSubtextColor(), - 'allowedCurrencies' => $this->getAllowedCurrencies(), - ], - ], - ], - ]; - } - - /** - * @param null|int $storeId - * - * @return float - */ - public function getPaymentFee($storeId = null) - { - $paymentFee = $this->scopeConfig->getValue( - self::XPATH_GIROPAY_PAYMENT_FEE, - \Magento\Store\Model\ScopeInterface::SCOPE_STORE, - $storeId - ); - - return $paymentFee ? $paymentFee : false; - } -} diff --git a/Model/Method/Giropay.php b/Model/Method/Giropay.php deleted file mode 100644 index 69a7318ab..000000000 --- a/Model/Method/Giropay.php +++ /dev/null @@ -1,109 +0,0 @@ -transactionBuilderFactory->get('order'); - - $services = [ - 'Name' => 'giropay', - 'Action' => 'Pay', - 'Version' => 2, - ]; - - /** - * @noinspection PhpUndefinedMethodInspection - */ - $transactionBuilder->setOrder($payment->getOrder()) - ->setServices($services) - ->setMethod('TransactionRequest'); - - return $transactionBuilder; - } - - /** - * {@inheritdoc} - */ - public function getCaptureTransactionBuilder($payment) - { - return false; - } - - /** - * {@inheritdoc} - */ - public function getAuthorizeTransactionBuilder($payment) - { - return false; - } - - protected function getRefundTransactionBuilderVersion() - { - return 2; - } - - /** - * {@inheritdoc} - */ - public function getVoidTransactionBuilder($payment) - { - return true; - } - - /** - * @param \Magento\Sales\Api\Data\OrderPaymentInterface|\Magento\Payment\Model\InfoInterface $payment - * - * @return bool|string - */ - public function getPaymentMethodName($payment) - { - return $this->buckarooPaymentMethodCode; - } - - protected function getRefundTransactionBuilderChannel() - { - return 'Web'; - } -} diff --git a/Test/Unit/Model/Config/Source/PaymentMethods/AfterExpiryTest.php b/Test/Unit/Model/Config/Source/PaymentMethods/AfterExpiryTest.php index 33bde4377..5fb49443f 100644 --- a/Test/Unit/Model/Config/Source/PaymentMethods/AfterExpiryTest.php +++ b/Test/Unit/Model/Config/Source/PaymentMethods/AfterExpiryTest.php @@ -41,9 +41,6 @@ public function toOptionArrayProvider() [ ['value' => 'giftcard', 'label' => 'Giftcards'] ], - [ - ['value' => 'giropay', 'label' => 'Giropay'] - ], [ ['value' => 'ideal', 'label' => 'iDEAL'] ], diff --git a/Test/Unit/Model/Config/Source/PaymentMethods/PayPerEmailTest.php b/Test/Unit/Model/Config/Source/PaymentMethods/PayPerEmailTest.php index b9964fd5a..2d3dd894f 100644 --- a/Test/Unit/Model/Config/Source/PaymentMethods/PayPerEmailTest.php +++ b/Test/Unit/Model/Config/Source/PaymentMethods/PayPerEmailTest.php @@ -44,9 +44,6 @@ public function toOptionArrayProvider() [ ['value' => 'giftcard', 'label' => 'Giftcards'] ], - [ - ['value' => 'giropay', 'label' => 'Giropay'] - ], [ ['value' => 'ideal', 'label' => 'iDEAL'] ], diff --git a/Test/Unit/Model/ConfigProvider/Method/GiropayTest.php b/Test/Unit/Model/ConfigProvider/Method/GiropayTest.php deleted file mode 100644 index 0e3325832..000000000 --- a/Test/Unit/Model/ConfigProvider/Method/GiropayTest.php +++ /dev/null @@ -1,137 +0,0 @@ - [ - [ - 'payment' => [ - 'buckaroo' => [ - 'giropay' => [ - 'paymentFeeLabel' => 'Fee', - 'allowedCurrencies' => ['EUR'] - ] - ] - ] - ] - ] - ]; - } - - /** - * @param $expected - * - * @dataProvider getConfigProvider - */ - public function testGetConfig($expected) - { - $scopeConfigMock = $this->getFakeMock(ScopeConfigInterface::class) - ->setMethods(['getValue']) - ->getMockForAbstractClass(); - $scopeConfigMock->expects($this->atLeastOnce()) - ->method('getValue') - ->withConsecutive( - [Giropay::XPATH_ALLOWED_CURRENCIES, ScopeInterface::SCOPE_STORE, null] - ) - ->willReturnOnConsecutiveCalls('EUR'); - - $paymentFeeMock = $this->getFakeMock(PaymentFee::class)->setMethods(['getBuckarooPaymentFeeLabel'])->getMock(); - $paymentFeeMock->method('getBuckarooPaymentFeeLabel')->with(GiropayMethod::PAYMENT_METHOD_CODE)->willReturn('Fee'); - - $instance = $this->getInstance(['scopeConfig' => $scopeConfigMock, 'paymentFeeHelper' => $paymentFeeMock]); - $result = $instance->getConfig(); - - $this->assertEquals($expected, $result); - } - - public function getPaymentFeeProvider() - { - return [ - 'null value' => [ - null, - false - ], - 'false value' => [ - false, - false - ], - 'empty int value' => [ - 0, - false - ], - 'empty float value' => [ - 0.00, - false - ], - 'empty string value' => [ - '', - false - ], - 'int value' => [ - 1, - 1 - ], - 'float value' => [ - 2.34, - 2.34 - ], - 'string value' => [ - '5.67', - 5.67 - ], - ]; - } - - /** - * @param $value - * @param $expected - * - * @dataProvider getPaymentFeeProvider - */ - public function testGetPaymentFee($value, $expected) - { - $scopeConfigMock = $this->getFakeMock(ScopeConfigInterface::class) - ->setMethods(['getValue']) - ->getMockForAbstractClass(); - $scopeConfigMock->expects($this->once()) - ->method('getValue') - ->with(Giropay::XPATH_GIROPAY_PAYMENT_FEE, ScopeInterface::SCOPE_STORE) - ->willReturn($value); - - $instance = $this->getInstance(['scopeConfig' => $scopeConfigMock]); - $result = $instance->getPaymentFee(); - - $this->assertEquals($expected, $result); - } -} diff --git a/Test/Unit/Model/Method/GiropayTest.php b/Test/Unit/Model/Method/GiropayTest.php deleted file mode 100644 index 34e5b533a..000000000 --- a/Test/Unit/Model/Method/GiropayTest.php +++ /dev/null @@ -1,241 +0,0 @@ -getObject(DataObject::class); - $data->setBuckarooSkipValidation(0); - $data->setAdditionalData([ - 'customer_bic' => 'NL32INGB' - ]); - - $infoInstanceMock = $this->getFakeMock(InfoInterface::class) - ->setMethods(['setAdditionalInformation']) - ->getMockForAbstractClass(); - $infoInstanceMock->expects($this->exactly(2))->method('setAdditionalInformation')->withConsecutive( - ['buckaroo_skip_validation', 0], - ['customer_bic', 'NL32INGB'] - ); - - $instance = $this->getInstance(); - $instance->setData('info_instance', $infoInstanceMock); - - $result = $instance->assignData($data); - $this->assertInstanceOf(Giropay::class, $result); - } - - /** - * Test the getOrderTransactionBuilder method. - */ - public function testGetOrderTransactionBuilder() - { - $fixture = [ - 'customer_bic' => 'biccib', - 'order' => 'orderrr!', - ]; - - $paymentMock = $this->getFakeMock(Payment::class) - ->setMethods(['getOrder', 'getAdditionalInformation']) - ->getMock(); - $paymentMock->expects($this->once())->method('getOrder')->willReturn($fixture['order']); - $paymentMock->expects($this->once()) - ->method('getAdditionalInformation') - ->with('customer_bic') - ->willReturn($fixture['customer_bic']); - - $orderMock =$this->getFakeMock(Order::class)->setMethods(['setOrder', 'setMethod', 'setServices'])->getMock(); - $orderMock->expects($this->once())->method('setOrder')->with($fixture['order'])->willReturnSelf(); - $orderMock->expects($this->once())->method('setMethod')->with('TransactionRequest')->willReturnSelf(); - $orderMock->expects($this->once())->method('setServices')->willReturnCallback( - function ($services) use ($fixture, $orderMock) { - $this->assertEquals('giropay', $services['Name']); - $this->assertEquals($fixture['customer_bic'], $services['RequestParameter'][0]['_']); - - return $orderMock; - } - ); - - $trxFactoryMock = $this->getFakeMock(TransactionBuilderFactory::class)->setMethods(['get'])->getMock(); - $trxFactoryMock->expects($this->once())->method('get')->with('order')->willReturn($orderMock); - - $infoInterface = $this->getFakeMock(InfoInterface::class)->getMockForAbstractClass(); - - $instance = $this->getInstance(['transactionBuilderFactory' => $trxFactoryMock]); - $instance->setData('info_instance', $infoInterface); - - $this->assertEquals($orderMock, $instance->getOrderTransactionBuilder($paymentMock)); - } - - /** - * Test the getCaptureTransactionBuilder method. - */ - public function testGetCaptureTransactionBuilder() - { - $instance = $this->getInstance(); - $this->assertFalse($instance->getCaptureTransactionBuilder('')); - } - - /** - * Test the getAuthorizeTransactionBuild method. - */ - public function testGetAuthorizeTransactionBuilder() - { - $instance = $this->getInstance(); - $this->assertFalse($instance->getAuthorizeTransactionBuilder('')); - } - - /** - * Test the getRefundTransactionBuilder method. - */ - public function testGetRefundTransactionBuilder() - { - $paymentMock = $this->getFakeMock(Payment::class) - ->setMethods(['getOrder', 'getAdditionalInformation']) - ->getMock(); - $paymentMock->expects($this->once())->method('getOrder')->willReturn('orderr'); - $paymentMock->expects($this->once()) - ->method('getAdditionalInformation') - ->with(Giropay::BUCKAROO_ORIGINAL_TRANSACTION_KEY_KEY) - ->willReturn('getAdditionalInformation'); - - $trxFactoryMock = $this->getFakeMock(TransactionBuilderFactory::class) - ->setMethods(['get', 'setOrder', 'setMethod', 'setChannel', 'setOriginalTransactionKey', 'setServices']) - ->getMock(); - $trxFactoryMock->expects($this->once())->method('get')->with('refund')->willReturnSelf(); - $trxFactoryMock->expects($this->once())->method('setOrder')->with('orderr')->willReturnSelf(); - $trxFactoryMock->expects($this->once())->method('setMethod')->with('TransactionRequest')->willReturnSelf(); - $trxFactoryMock->expects($this->once())->method('setChannel')->with('CallCenter')->willReturnSelf(); - $trxFactoryMock->expects($this->once()) - ->method('setOriginalTransactionKey') - ->with('getAdditionalInformation') - ->willReturnSelf(); - $trxFactoryMock->expects($this->once())->method('setServices')->willReturnCallback( - function ($services) use ($trxFactoryMock) { - $services['Name'] = 'giropay'; - $services['Action'] = 'Refund'; - - return $trxFactoryMock; - } - ); - - $instance = $this->getInstance(['transactionBuilderFactory' => $trxFactoryMock]); - - $this->assertEquals($trxFactoryMock, $instance->getRefundTransactionBuilder($paymentMock)); - } - - /** - * Test the getVoidTransactionBuild method. - */ - public function testGetVoidTransactionBuilder() - { - $instance = $this->getInstance(); - $this->assertTrue($instance->getVoidTransactionBuilder('')); - } - - /** - * Test the validation method happy path. - */ - public function testValidate() - { - $paymentInfoMock = $this->getFakeMock(InfoInterface::class) - ->setMethods(['getQuote', 'getBillingAddress', 'getCountryId', 'getAdditionalInformation']) - ->getMockForAbstractClass(); - $paymentInfoMock->expects($this->once())->method('getQuote')->willReturnSelf(); - $paymentInfoMock->expects($this->once())->method('getBillingAddress')->willReturnSelf(); - $paymentInfoMock->expects($this->once())->method('getCountryId')->willReturn(4); - $paymentInfoMock->expects($this->exactly(2)) - ->method('getAdditionalInformation') - ->withConsecutive(['buckaroo_skip_validation'], ['customer_bic']) - ->willReturnOnConsecutiveCalls(false, 'ABCDEF1E'); - - $instance = $this->getInstance(); - $instance->setData('info_instance', $paymentInfoMock); - $result = $instance->validate(); - - $this->assertInstanceOf(Giropay::class, $result); - } - - /** - * Test the validation method happy path. - */ - public function testValidateInvalidBic() - { - $paymentInfoMock = $this->getFakeMock(InfoInterface::class) - ->setMethods(['getQuote', 'getBillingAddress', 'getCountryId', 'getAdditionalInformation']) - ->getMockForAbstractClass(); - $paymentInfoMock->expects($this->once())->method('getQuote')->willReturnSelf(); - $paymentInfoMock->expects($this->once())->method('getBillingAddress')->willReturnSelf(); - $paymentInfoMock->expects($this->once())->method('getCountryId')->willReturn(4); - $paymentInfoMock->expects($this->exactly(2)) - ->method('getAdditionalInformation') - ->withConsecutive(['buckaroo_skip_validation'], ['customer_bic']) - ->willReturnOnConsecutiveCalls(false, 'wrong'); - - $instance = $this->getInstance(); - $instance->setData('info_instance', $paymentInfoMock); - - try { - $instance->validate(); - } catch (LocalizedException $e) { - $this->assertEquals('Please enter a valid BIC number', $e->getMessage()); - } - } - - /** - * Test the validation method happy path. - */ - public function testValidateSkipValidation() - { - $paymentInfoMock = $this->getFakeMock(InfoInterface::class) - ->setMethods(['getQuote', 'getBillingAddress', 'getCountryId', 'getAdditionalInformation']) - ->getMockForAbstractClass(); - $paymentInfoMock->expects($this->once())->method('getQuote')->willReturnSelf(); - $paymentInfoMock->expects($this->once())->method('getBillingAddress')->willReturnSelf(); - $paymentInfoMock->expects($this->once())->method('getCountryId')->willReturn(4); - $paymentInfoMock->expects($this->once()) - ->method('getAdditionalInformation') - ->with('buckaroo_skip_validation') - ->willReturn(true); - - $instance = $this->getInstance(); - $instance->setData('info_instance', $paymentInfoMock); - - $result = $instance->validate(); - - $this->assertInstanceOf(Giropay::class, $result); - } -} diff --git a/etc/adminhtml/system/payment_methods.xml b/etc/adminhtml/system/payment_methods.xml index 2aa07251a..3a80f1638 100644 --- a/etc/adminhtml/system/payment_methods.xml +++ b/etc/adminhtml/system/payment_methods.xml @@ -66,8 +66,6 @@ - - diff --git a/etc/adminhtml/system/payment_methods/giropay.xml b/etc/adminhtml/system/payment_methods/giropay.xml deleted file mode 100644 index 6ba00f4cb..000000000 --- a/etc/adminhtml/system/payment_methods/giropay.xml +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - Buckaroo\Magento2\Block\Config\Form\Field\Fieldset - - - - - Buckaroo\Magento2\Model\Config\Source\Enablemode - payment/buckaroo_magento2_giropay/active - - - - - - payment/buckaroo_magento2_giropay/title - - - - - - payment/buckaroo_magento2_giropay/subtext - - - - - - Buckaroo\Magento2\Model\Config\Source\SubtextStyle - payment/buckaroo_magento2_giropay/subtext_style - - - - - - payment/buckaroo_magento2_giropay/subtext_color - Buckaroo\Magento2\Block\Config\Form\Field\ColorPicker - - - - - - - payment/buckaroo_magento2_giropay/sort_order - - - - - - - - - Magento\Config\Model\Config\Source\Yesno - payment/buckaroo_magento2_giropay/order_email - - - - - Configuration > Sales > Tax.]]> - payment/buckaroo_magento2_giropay/payment_fee - Buckaroo\Magento2\Model\Config\Backend\PaymentFee - - - - - - payment/buckaroo_magento2_giropay/payment_fee_label - - - - - - The payment method shows only for orders with an order amount greater than the minimum amount. - payment/buckaroo_magento2_giropay/min_amount - Buckaroo\Magento2\Model\Config\Backend\Price - - - - - - The payment method shows only for orders with an order amount smaller than the maximum amount. - payment/buckaroo_magento2_giropay/max_amount - Buckaroo\Magento2\Model\Config\Backend\Price - - - - - - Magento\Config\Model\Config\Source\Yesno - payment/buckaroo_magento2_giropay/active_status - - - - - - To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status. - Buckaroo\Magento2\Model\Config\Source\StatusesSuccess - payment/buckaroo_magento2_giropay/order_status_success - - 1 - - - - - - - To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status. - Buckaroo\Magento2\Model\Config\Source\StatusesFailed - payment/buckaroo_magento2_giropay/order_status_failed - - 1 - - - - - - - Your contract with Buckaroo must allow for the selected currencies to be used with this payment method. - payment/buckaroo_magento2_giropay/allowed_currencies - Buckaroo\Magento2\Model\Config\Source\AllowedCurrencies::giropay - Buckaroo\Magento2\Model\Config\Backend\AllowedCurrencies - - - - - Buckaroo\Magento2\Model\Config\Source\AllOrSpecificCountries - payment/buckaroo_magento2_giropay/allowspecific - - - - - - Magento\Config\Model\Config\Source\Locale\Country - payment/buckaroo_magento2_giropay/specificcountry - - 1 - - - - - - - Magento developer client restrictions. - Magento\Config\Model\Config\Source\Yesno - payment/buckaroo_magento2_giropay/limit_by_ip - - - - - Buckaroo\Magento2\Model\Config\Source\SpecificCustomerGroups - 1 - payment/buckaroo_magento2_giropay/specificcustomergroup - - - - diff --git a/etc/config.xml b/etc/config.xml index 320d22a16..d95dba683 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -95,7 +95,7 @@ buckaroo_magento2 order 0 - amex,bancontactmrcash,cartebancaire,cartebleuevisa,nexi,postepay,dankort,eps,giftcard,giropay,ideal,mastercard,paypal,sofortueberweisung,transfer,visa,maestro,visaelectron,vpay,alipay,wechatpay,p24,trustly,belfius,blik + amex,bancontactmrcash,cartebancaire,cartebleuevisa,nexi,postepay,dankort,eps,giftcard,ideal,mastercard,paypal,sofortueberweisung,transfer,visa,maestro,visaelectron,vpay,alipay,wechatpay,p24,trustly,belfius,blik @@ -182,23 +182,9 @@ buckaroo_magento2 order 1 - amex,bancontactmrcash,cartebancaire,cartebleuevisa,nexi,postepay,dankort,eps,giftcard,giropay,ideal,mastercard,paypal,sofortueberweisung,transfer,visa,maestro,visaelectron,vpay,alipay,wechatpay,p24,trustly,belfius,blik + amex,bancontactmrcash,cartebancaire,cartebleuevisa,nexi,postepay,dankort,eps,giftcard,ideal,mastercard,paypal,sofortueberweisung,transfer,visa,maestro,visaelectron,vpay,alipay,wechatpay,p24,trustly,belfius,blik - - 0 - Buckaroo\Magento2\Model\Method\Giropay - pending - Giropay - 0 - 160 - 1 - Fee - buckaroo_magento2 - order - 0 - - 0 Buckaroo\Magento2\Model\Method\Mrcash @@ -290,8 +276,8 @@ 1 1 1 - amex,bancontactmrcash,cartebancaire,cartebleuevisa,nexi,postepay,dankort,eps,sepadirectdebit,giftcard,giropay,ideal,mastercard,paypal,sofortueberweisung,transfer,visa,maestro,visaelectron,vpay,alipay,wechatpay,p24,trustly,belfius,blik - amex,bancontactmrcash,cartebancaire,cartebleuevisa,nexi,postepay,dankort,eps,giftcard,giropay,ideal,mastercard,paypal,sofortueberweisung,transfer,visa,maestro,visaelectron,vpay,alipay,wechatpay,p24,trustly,belfius,blik + amex,bancontactmrcash,cartebancaire,cartebleuevisa,nexi,postepay,dankort,eps,sepadirectdebit,giftcard,ideal,mastercard,paypal,sofortueberweisung,transfer,visa,maestro,visaelectron,vpay,alipay,wechatpay,p24,trustly,belfius,blik + amex,bancontactmrcash,cartebancaire,cartebleuevisa,nexi,postepay,dankort,eps,giftcard,ideal,mastercard,paypal,sofortueberweisung,transfer,visa,maestro,visaelectron,vpay,alipay,wechatpay,p24,trustly,belfius,blik 7 1 diff --git a/etc/di.xml b/etc/di.xml index 89cf99a36..75c61345c 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -249,10 +249,6 @@ creditcards Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcards - - giropay - Buckaroo\Magento2\Model\ConfigProvider\Method\Giropay - mrcash Buckaroo\Magento2\Model\ConfigProvider\Method\Mrcash diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml index 6bd197d3b..d217359d4 100644 --- a/etc/frontend/di.xml +++ b/etc/frontend/di.xml @@ -36,7 +36,6 @@ Buckaroo\Magento2\Model\ConfigProvider\Method\Mrcash Buckaroo\Magento2\Model\ConfigProvider\Method\Sofortbanking Buckaroo\Magento2\Model\ConfigProvider\Method\Belfius - Buckaroo\Magento2\Model\ConfigProvider\Method\Giropay Buckaroo\Magento2\Model\ConfigProvider\Method\Afterpay Buckaroo\Magento2\Model\ConfigProvider\Method\Afterpay2 Buckaroo\Magento2\Model\ConfigProvider\Method\PayPerEmail diff --git a/etc/payment.xml b/etc/payment.xml index 80e06896c..93dffa21d 100644 --- a/etc/payment.xml +++ b/etc/payment.xml @@ -51,9 +51,6 @@ 0 - - 0 - 0 diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index e13182196..42f141d39 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -97,8 +97,6 @@ "Enable Przelewy24","Przelewy24 activieren" "Trustly","Trustly" "Enable Trustly","Trustly activieren" -"Giropay","Giropay" -"Enable Giropay","Giropay activieren" "Refunding","Erstattung" "Enable or disable refunding.","Gutschrift/Rückerstattung aktivieren oder deaktivieren." "Set to 'No' refunds must be done manualy in Payment Plaza.","Mit der Auswahl 'Nein' werden Gutschriften in Magento bei Payment Plaza nicht angeboten." diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv index 37a3d4c79..25943735f 100644 --- a/i18n/es_ES.csv +++ b/i18n/es_ES.csv @@ -99,8 +99,6 @@ "Enable Trustly","Activar Trustly" "Request To Pay","Request To Pay" "Enable Request To Pay","Activar Request To Pay" -"Giropay","Giropay" -"Enable Giropay","Activar Giropay" "Refunding","Reembolso" "Enable or disable refunding.","Activar o desactivar el reembolso." "Set to 'No' refunds must be done manualy in Payment Plaza.","Elegir 'No' para 'los reembolsos se deben realizar manualmente en Payment Plaza'." diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 08d54046d..76b72f06a 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -97,8 +97,6 @@ "Enable Przelewy24","Activer Przelewy24" "Trustly","Trustly" "Enable Trustly","Activer Trustly" -"Giropay","Giropay" -"Enable Giropay","Activer Giropay" "Refunding","Remboursement" "Enable or disable refunding.","Activer ou désactiver le remboursement" "Set to 'No' refunds must be done manualy in Payment Plaza.","Défini sur "Non", les remboursements doivent être effectués manuellement dans Payment Plaza." diff --git a/i18n/nl_BE.csv b/i18n/nl_BE.csv index 598df015d..bd82c60ab 100644 --- a/i18n/nl_BE.csv +++ b/i18n/nl_BE.csv @@ -97,8 +97,6 @@ "Enable Przelewy24","Przelewy24 inschakelen" "Trustly","Trustly" "Enable Trustly","Trustly inschakelen" -"Giropay","Giropay" -"Enable Giropay","Giropay inschakelen" "Refunding","Terugbetaling" "Enable or disable refunding.","Schakel de creditering/terugstorten in of uit." "Set to 'No' refunds must be done manualy in Payment Plaza.","Bij de selectie 'Nee' worden credit memo's in Magento niet aangeboden bij Payment Plaza." diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index 0eba9f0e5..65b8ee68f 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -99,8 +99,6 @@ "Enable Przelewy24","Przelewy24 inschakelen" "Trustly","Trustly" "Enable Trustly","Trustly inschakelen" -"Giropay","Giropay" -"Enable Giropay","Giropay inschakelen" "Blik","Blik" "Enable Blik","Blik inschakelen" "Refunding","Terugbetaling" diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml index 2fd41041a..7f0aa03b6 100644 --- a/view/frontend/layout/checkout_index_index.xml +++ b/view/frontend/layout/checkout_index_index.xml @@ -117,9 +117,6 @@ true - - true - true diff --git a/view/frontend/web/css/styles.css b/view/frontend/web/css/styles.css index 7afb0da75..e3c2cd600 100644 --- a/view/frontend/web/css/styles.css +++ b/view/frontend/web/css/styles.css @@ -133,15 +133,15 @@ margin-top: 20px; } -.payment-method-second-col input::placeholder { +.payment-method-second-col input::placeholder { color: #c0c0c0; - opacity: 1; + opacity: 1; } - + .payment-method-second-col input:-ms-input-placeholder { color: #c0c0c0; } - + .payment-method-second-col input::-ms-input-placeholder { color: #c0c0c0; } @@ -173,7 +173,6 @@ .buckaroo_magento2_afterpay20 .payment-method-second-col, .buckaroo_magento2_billink .payment-method-second-col, .buckaroo_magento2_sepadirectdebit .payment-method-second-col, - .buckaroo_magento2_giropay .payment-method-second-col, .buckaroo_magento2_payperemail .payment-method-second-col, .buckaroo_magento2_klarna .payment-method-second-col, .buckaroo_magento2_klarnakp .payment-method-second-col, @@ -205,7 +204,6 @@ .buckaroo_magento2_afterpay20 .payment-method-billing-address, .buckaroo_magento2_billink .payment-method-billing-address, .buckaroo_magento2_sepadirectdebit .payment-method-billing-address, - .buckaroo_magento2_giropay .payment-method-billing-address, .buckaroo_magento2_payperemail .payment-method-billing-address, .buckaroo_magento2_klarna .payment-method-billing-address, .buckaroo_magento2_klarnakp .payment-method-billing-address, @@ -241,7 +239,6 @@ .magento-blank .buckaroo_magento2_afterpay20 .fieldset > .field:not(.choice) > .label, .magento-blank .buckaroo_magento2_billink .fieldset > .field:not(.choice) > .label, .magento-blank .buckaroo_magento2_sepadirectdebit .fieldset > .field:not(.choice) > .label, - .magento-blank .buckaroo_magento2_giropay .fieldset > .field:not(.choice) > .label, .magento-blank .buckaroo_magento2_payperemail .fieldset > .field:not(.choice) > .label, .magento-blank .buckaroo_magento2_klarna .fieldset > .field:not(.choice) > .label, .magento-blank .buckaroo_magento2_klarnakp .fieldset > .field:not(.choice) > .label, @@ -268,7 +265,6 @@ .magento-blank .buckaroo_magento2_afterpay20 .fieldset > .field:not(.choice) > .control, .magento-blank .buckaroo_magento2_billink .fieldset > .field:not(.choice) > .control, .magento-blank .buckaroo_magento2_sepadirectdebit .fieldset > .field:not(.choice) > .control, - .magento-blank .buckaroo_magento2_giropay .fieldset > .field:not(.choice) > .control, .magento-blank .buckaroo_magento2_payperemail .fieldset > .field:not(.choice) > .control, .magento-blank .buckaroo_magento2_klarna .fieldset > .field:not(.choice) > .control, .magento-blank .buckaroo_magento2_klarnakp .fieldset > .field:not(.choice) > .control, @@ -293,7 +289,6 @@ .magento-blank .buckaroo_magento2_afterpay20 .fieldset > .field.choice:before, .magento-blank .buckaroo_magento2_billink .fieldset > .field.choice:before, .magento-blank .buckaroo_magento2_sepadirectdebit .fieldset > .field.choice:before, - .magento-blank .buckaroo_magento2_giropay .fieldset > .field.choice:before, .magento-blank .buckaroo_magento2_payperemail .fieldset > .field.choice:before, .magento-blank .buckaroo_magento2_klarna .fieldset > .field.choice:before, .magento-blank .buckaroo_magento2_klarnakp .fieldset > .field.choice:before, @@ -643,4 +638,4 @@ .fieldset > .field .addon .bk-paybybank-selector .bank-method-input { display:none; } -} \ No newline at end of file +} diff --git a/view/frontend/web/js/view/payment/buckaroo-payments.js b/view/frontend/web/js/view/payment/buckaroo-payments.js index efa1abc6a..b574b68b1 100644 --- a/view/frontend/web/js/view/payment/buckaroo-payments.js +++ b/view/frontend/web/js/view/payment/buckaroo-payments.js @@ -93,10 +93,6 @@ define( type: 'buckaroo_magento2_transfer', component: 'Buckaroo_Magento2/js/view/payment/method-renderer/transfer' }, - { - type: 'buckaroo_magento2_giropay', - component: 'Buckaroo_Magento2/js/view/payment/method-renderer/giropay' - }, { type: 'buckaroo_magento2_mrcash', component: 'Buckaroo_Magento2/js/view/payment/method-renderer/mrcash' diff --git a/view/frontend/web/js/view/payment/method-renderer/giftcards.js b/view/frontend/web/js/view/payment/method-renderer/giftcards.js index fe87d5dcf..ced797fd1 100644 --- a/view/frontend/web/js/view/payment/method-renderer/giftcards.js +++ b/view/frontend/web/js/view/payment/method-renderer/giftcards.js @@ -66,7 +66,7 @@ define( } function checkPayments(){ - var p = ["billink","klarnakp","capayableinstallments","sofortbanking","giropay","transfer","sepadirectdebit","capayablein3","creditcard","mrcash","payperemail","emandate"]; + var p = ["billink","klarnakp","capayableinstallments","sofortbanking","transfer","sepadirectdebit","capayablein3","creditcard","mrcash","payperemail","emandate"]; p.forEach(function(item) { $('.buckaroo_magento2_'+item).remove(); }); diff --git a/view/frontend/web/js/view/payment/method-renderer/giropay.js b/view/frontend/web/js/view/payment/method-renderer/giropay.js deleted file mode 100644 index cb2804922..000000000 --- a/view/frontend/web/js/view/payment/method-renderer/giropay.js +++ /dev/null @@ -1,121 +0,0 @@ -/** - * NOTICE OF LICENSE - * - * This source file is subject to the MIT License - * It is available through the world-wide-web at this URL: - * https://tldrlegal.com/license/mit-license - * If you are unable to obtain it through the world-wide-web, please send an email - * to support@buckaroo.nl so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade this module to newer - * versions in the future. If you wish to customize this module for your - * needs please contact support@buckaroo.nl for more information. - * - * @copyright Copyright (c) Buckaroo B.V. - * @license https://tldrlegal.com/license/mit-license - */ -/*browser:true*/ -/*global define*/ -define( - [ - 'jquery', - 'Magento_Checkout/js/view/payment/default', - 'Magento_Checkout/js/model/payment/additional-validators', - 'Buckaroo_Magento2/js/action/place-order', - 'ko', - 'Magento_Checkout/js/checkout-data', - 'Magento_Checkout/js/action/select-payment-method', - 'buckaroo/checkout/common' - ], - function ( - $, - Component, - additionalValidators, - placeOrderAction, - ko, - checkoutData, - selectPaymentMethodAction, - checkoutCommon - ) { - 'use strict'; - - return Component.extend( - { - defaults: { - template: 'Buckaroo_Magento2/payment/buckaroo_magento2_giropay' - }, - paymentFeeLabel : window.checkoutConfig.payment.buckaroo.giropay.paymentFeeLabel, - subtext : window.checkoutConfig.payment.buckaroo.giropay.subtext, - subTextStyle : checkoutCommon.getSubtextStyle('giropay'), - currencyCode : window.checkoutConfig.quoteData.quote_currency_code, - baseCurrencyCode : window.checkoutConfig.quoteData.base_currency_code, - - /** - * @override - */ - initialize : function (options) { - if (checkoutData.getSelectedPaymentMethod() == options.index) { - window.checkoutConfig.buckarooFee.title(this.paymentFeeLabel); - } - - return this._super(options); - }, - - /** - * Place order. - * - * placeOrderAction has been changed from Magento_Checkout/js/action/place-order to our own version - * (Buckaroo_Magento2/js/action/place-order) to prevent redirect and handle the response. - */ - placeOrder: function (data, event) { - var self = this, - placeOrder; - - if (event) { - event.preventDefault(); - } - - if (this.validate() && additionalValidators.validate()) { - this.isPlaceOrderActionAllowed(false); - placeOrder = placeOrderAction(this.getData(), this.redirectAfterPlaceOrder, this.messageContainer); - - $.when(placeOrder).fail( - function () { - self.isPlaceOrderActionAllowed(true); - } - ).done(this.afterPlaceOrder.bind(this)); - return true; - } - return false; - }, - - afterPlaceOrder: function () { - var response = window.checkoutConfig.payment.buckaroo.response; - checkoutCommon.redirectHandle(response); - }, - - selectPaymentMethod: function () { - window.checkoutConfig.buckarooFee.title(this.paymentFeeLabel); - - selectPaymentMethodAction(this.getData()); - checkoutData.setSelectedPaymentMethod(this.item.method); - return true; - }, - - payWithBaseCurrency: function () { - var allowedCurrencies = window.checkoutConfig.payment.buckaroo.giropay.allowedCurrencies; - - return allowedCurrencies.indexOf(this.currencyCode) < 0; - }, - - getPayWithBaseCurrencyText: function () { - var text = $.mage.__('The transaction will be processed using %s.'); - - return text.replace('%s', this.baseCurrencyCode); - } - } - ); - } -); diff --git a/view/frontend/web/template/payment/buckaroo_magento2_giropay.html b/view/frontend/web/template/payment/buckaroo_magento2_giropay.html deleted file mode 100644 index 8b71e76b2..000000000 --- a/view/frontend/web/template/payment/buckaroo_magento2_giropay.html +++ /dev/null @@ -1,60 +0,0 @@ -
-
-
-
- - -
-
- -
-
-
- -
- -
- - - -
- -
-
- -
-
- - -
- -
- - -
- - - -
- -
-