diff --git a/.github/workflows/templates/magento/configure-mollie.sh b/.github/workflows/templates/magento/configure-mollie.sh index 9650bcae224..8439e9e00e3 100644 --- a/.github/workflows/templates/magento/configure-mollie.sh +++ b/.github/workflows/templates/magento/configure-mollie.sh @@ -26,6 +26,7 @@ bin/magento config:set payment/mollie_methods_kbc/active 1 & bin/magento config:set payment/mollie_methods_klarnasliceit/active 1 & bin/magento config:set payment/mollie_methods_paypal/active 1 & bin/magento config:set payment/mollie_methods_przelewy24/active 1 & +bin/magento config:set payment/mollie_methods_payconiq/active 1 & bin/magento config:set payment/mollie_methods_alma/active 1 & bin/magento config:set payment/mollie_methods_bancontact/active 1 & bin/magento config:set payment/mollie_methods_bancomatpay/active 1 & diff --git a/Api/Webapi/ResetCartInterface.php b/Api/Webapi/ResetCartInterface.php new file mode 100644 index 00000000000..e730849bc43 --- /dev/null +++ b/Api/Webapi/ResetCartInterface.php @@ -0,0 +1,16 @@ +resultPageFactory = $resultPageFactory; $this->request = $request; $this->storeManager = $storeManager; + $this->url = $url; + $this->orderRepository = $orderRepository; + $this->encryptor = $encryptor; + $this->paymentTokenRepository = $paymentTokenRepository; + $this->generatePaymentToken = $generatePaymentToken; } public function execute() @@ -42,12 +83,35 @@ public function execute() throw new AuthorizationException(__('Invalid token')); } + $id = $this->encryptor->decrypt(base64_decode($token)); + $order = $this->orderRepository->get($id); + $resultPage = $this->resultPageFactory->create(); $resultPage->getConfig()->getTitle()->set(__('Please finish the payment on the terminal.')); $block = $resultPage->getLayout()->getBlock('mollie.pointofsale.wait'); - $block->setData('token', $token); - $block->setData('storeCode', $this->storeManager->getStore()->getCode()); + $block->setData( + 'status_url', + '/rest/' . $this->storeManager->getStore()->getCode() . '/V1/mollie/get-order/' . $token + ); + $block->setData( + 'reset_url', + '/rest/' . $this->storeManager->getStore()->getCode() . '/V1/mollie/reset-cart/' . $token + ); + $block->setData( + 'retry_url', + $this->url->getUrl('mollie/checkout/redirect', ['paymentToken' => $this->getToken($order)]) + ); return $resultPage; } + + private function getToken(OrderInterface $order): string + { + $token = $this->paymentTokenRepository->getByOrder($order); + if ($token) { + return $token->getToken(); + } + + return $this->generatePaymentToken->forOrder($order)->getToken(); + } } diff --git a/Model/Client/Orders/Processors/AddAdditionalInformation.php b/Model/Client/Orders/Processors/AddAdditionalInformation.php index 25c54143864..adc24c1fd07 100644 --- a/Model/Client/Orders/Processors/AddAdditionalInformation.php +++ b/Model/Client/Orders/Processors/AddAdditionalInformation.php @@ -49,6 +49,7 @@ public function process(OrderInterface $magentoOrder, Order $mollieOrder, string $dashboardUrl = $this->dashboardUrl->forOrdersApi($magentoOrder->getStoreId(), $mollieOrder->id); $magentoOrder->getPayment()->setAdditionalInformation('mollie_id', $mollieOrder->id); $magentoOrder->getPayment()->setAdditionalInformation('dashboard_url', $dashboardUrl); + $magentoOrder->getPayment()->setAdditionalInformation('method', $mollieOrder->method); $status = $mollieOrder->status; $payment = $magentoOrder->getPayment(); diff --git a/Model/Client/Payments.php b/Model/Client/Payments.php index e3dade8f7c4..7b736eda987 100644 --- a/Model/Client/Payments.php +++ b/Model/Client/Payments.php @@ -341,6 +341,7 @@ public function processTransaction(Order $order, $mollieApi, $type = 'webhook', $dashboardUrl = $this->dashboardUrl->forPaymentsApi($order->getStoreId(), $paymentData->id); $order->getPayment()->setAdditionalInformation('dashboard_url', $dashboardUrl); $order->getPayment()->setAdditionalInformation('mollie_id', $paymentData->id); + $order->getPayment()->setAdditionalInformation('method', $paymentData->method); $status = $paymentData->status; $payment = $order->getPayment(); diff --git a/Model/Client/Payments/Processors/AddAdditionalInformation.php b/Model/Client/Payments/Processors/AddAdditionalInformation.php index 10987a4b48f..af5c3d3051c 100644 --- a/Model/Client/Payments/Processors/AddAdditionalInformation.php +++ b/Model/Client/Payments/Processors/AddAdditionalInformation.php @@ -43,6 +43,7 @@ public function process( $dashboardUrl = $this->dashboardUrl->forPaymentsApi($order->getStoreId(), $molliePayment->id); $magentoPayment->setAdditionalInformation('dashboard_url', $dashboardUrl); $magentoPayment->setAdditionalInformation('mollie_id', $molliePayment->id); + $magentoPayment->setAdditionalInformation('method', $molliePayment->method); $status = $molliePayment->status; if ($type == 'webhook' && $magentoPayment->getAdditionalInformation('payment_status') != $status) { diff --git a/Model/Methods/Payconiq.php b/Model/Methods/Payconiq.php new file mode 100644 index 00000000000..567f5dcdd4d --- /dev/null +++ b/Model/Methods/Payconiq.php @@ -0,0 +1,18 @@ +paymentLinkUrl = $paymentLinkUrl; + $this->orderPaymentRepository = $orderPaymentRepository; + } + + public function execute(Observer $observer) + { + /** @var OrderInterface $order */ + $order = $observer->getEvent()->getData('order'); + + $payment = $order->getPayment(); + if ($payment->getMethod() != Paymentlink::CODE) { + return; + } + + $payment->setAdditionalInformation( + 'checkout_url', + $this->paymentLinkUrl->execute((int)$order->getEntityId()) + ); + + $this->orderPaymentRepository->save($payment); + } +} diff --git a/README.md b/README.md index 8f8eb2998db..0c4a747442a 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Mollie requires no minimum costs, no fixed contracts, no hidden costs. At Mollie - PayPal - Paysafecard - Point Of Sale (POS) +- Payconiq - Przelewy24 - SEPA Direct Debit - SOFORT Banking diff --git a/Service/Mollie/GetMollieStatusResult.php b/Service/Mollie/GetMollieStatusResult.php index cd421db4c62..d3697f9eb4f 100644 --- a/Service/Mollie/GetMollieStatusResult.php +++ b/Service/Mollie/GetMollieStatusResult.php @@ -23,7 +23,9 @@ public function __construct( string $status, string $method = null ) { - $method = str_replace('mollie_methods_', '', $method); + if ($method !== null) { + $method = str_replace('mollie_methods_', '', $method); + } $this->status = $status; $this->method = $method; diff --git a/Service/Mollie/PaymentMethods.php b/Service/Mollie/PaymentMethods.php index 7360e9af259..e33b5aa0e73 100644 --- a/Service/Mollie/PaymentMethods.php +++ b/Service/Mollie/PaymentMethods.php @@ -39,6 +39,7 @@ class PaymentMethods 'mollie_methods_paypal', 'mollie_methods_paysafecard', 'mollie_methods_pointofsale', + 'mollie_methods_payconiq', 'mollie_methods_przelewy24', 'mollie_methods_riverty', 'mollie_methods_sofort', diff --git a/Service/Mollie/ProcessTransaction.php b/Service/Mollie/ProcessTransaction.php index af33f5aefd6..5f9a270063b 100644 --- a/Service/Mollie/ProcessTransaction.php +++ b/Service/Mollie/ProcessTransaction.php @@ -78,7 +78,7 @@ public function execute(int $orderId, string $transactionId, string $type = 'web return $this->getMollieStatusResultFactory->create([ 'status' => $result['status'], - 'method' => $order->getPayment()->getMethod(), + 'method' => $order->getPayment()->getAdditionalInformation('method') ?? $order->getPayment()->getMethod(), ]); } diff --git a/Test/End-2-end/cypress/e2e/magento/methods/payconiq.cy.js b/Test/End-2-end/cypress/e2e/magento/methods/payconiq.cy.js new file mode 100644 index 00000000000..fdd5902df48 --- /dev/null +++ b/Test/End-2-end/cypress/e2e/magento/methods/payconiq.cy.js @@ -0,0 +1,60 @@ +/* + * Copyright Magmodules.eu. All rights reserved. + * See COPYING.txt for license details. + */ + +import CheckoutPaymentPage from "Pages/frontend/CheckoutPaymentPage"; +import VisitCheckoutPaymentCompositeAction from "CompositeActions/VisitCheckoutPaymentCompositeAction"; +import MollieHostedPaymentPage from "Pages/mollie/MollieHostedPaymentPage"; +import CheckoutSuccessPage from "Pages/frontend/CheckoutSuccessPage"; +import OrdersPage from "Pages/backend/OrdersPage"; +import CartPage from "Pages/frontend/CartPage"; + +const checkoutPaymentPage = new CheckoutPaymentPage(); +const visitCheckoutPayment = new VisitCheckoutPaymentCompositeAction(); +const mollieHostedPaymentPage = new MollieHostedPaymentPage(); +const checkoutSuccessPage = new CheckoutSuccessPage(); +const ordersPage = new OrdersPage(); +const cartPage = new CartPage(); + +if (Cypress.env('mollie_available_methods').includes('payconiq')) { + describe('Check that payconiq behaves as expected', () => { + [ + {status: 'paid', orderStatus: 'Processing', title: 'C3706886: Validate the submission of an order with Payconiq as payment method and payment mark as "Paid" '}, + {status: 'failed', orderStatus: 'Canceled', title: 'C3706887: Validate the submission of an order with Payconiq as payment method and payment mark as "Failed"'}, + {status: 'expired', orderStatus: 'Canceled', title: 'C3706888: Validate the submission of an order with Payconiq as payment method and payment mark as "Expired" '}, + {status: 'canceled', orderStatus: 'Canceled', title: 'C3706889: Validate the submission of an order with Payconiq as payment method and payment mark as "Canceled" '}, + ].forEach((testCase) => { + it(testCase.title, () => { + visitCheckoutPayment.visit('BE'); + + cy.intercept('mollie/checkout/redirect/paymentToken/*').as('mollieRedirect'); + + checkoutPaymentPage.selectPaymentMethod('Payconiq'); + checkoutPaymentPage.placeOrder(); + + mollieHostedPaymentPage.selectStatus(testCase.status); + + if (testCase.status === 'paid') { + checkoutSuccessPage.assertThatOrderSuccessPageIsShown(); + } + + if (testCase.status === 'canceled') { + cartPage.assertCartPageIsShown(); + } + + cy.backendLogin(); + + cy.get('@order-id').then((orderId) => { + ordersPage.openOrderById(orderId); + }); + + if (testCase.status === 'expired') { + ordersPage.callFetchStatus(); + } + + ordersPage.assertOrderStatusIs(testCase.orderStatus); + }); + }); + }) +} diff --git a/Test/End-2-end/cypress/fixtures/belgian-shipping-address.json b/Test/End-2-end/cypress/fixtures/belgian-shipping-address.json new file mode 100644 index 00000000000..e0b48229859 --- /dev/null +++ b/Test/End-2-end/cypress/fixtures/belgian-shipping-address.json @@ -0,0 +1,15 @@ +{ + "type": { + "username": "annaschmidt@mollie.com", + "firstname": "Anna", + "company": "Acme Firma BVBA", + "lastname": "Schmidt", + "street[0]": "Voorbeeldstraat 1", + "city": "Brussel", + "postcode": "1000", + "telephone": "+32 2 XXXXXXX" + }, + "select": { + "country_id": "BE" + } +} diff --git a/Test/End-2-end/cypress/support/actions/composite/VisitCheckoutPaymentCompositeAction.js b/Test/End-2-end/cypress/support/actions/composite/VisitCheckoutPaymentCompositeAction.js index 2394fc60ef2..c8ed6d5395d 100644 --- a/Test/End-2-end/cypress/support/actions/composite/VisitCheckoutPaymentCompositeAction.js +++ b/Test/End-2-end/cypress/support/actions/composite/VisitCheckoutPaymentCompositeAction.js @@ -39,9 +39,14 @@ export default class VisitCheckoutPaymentCompositeAction { } fillAddress(fixture, asCustomer = false) { - if (asCustomer) { - checkoutShippingPage.skipUsername(); - } + if (asCustomer) { + checkoutShippingPage.skipUsername(); + } + + if (fixture === 'BE') { + checkoutShippingPage.fillBelgianShippingAddress(); + return; + } if (fixture === 'DE') { checkoutShippingPage.fillGermanShippingAddress(); diff --git a/Test/End-2-end/cypress/support/pages/frontend/CheckoutShippingPage.js b/Test/End-2-end/cypress/support/pages/frontend/CheckoutShippingPage.js index 8ddb743f2c3..905724e04fd 100644 --- a/Test/End-2-end/cypress/support/pages/frontend/CheckoutShippingPage.js +++ b/Test/End-2-end/cypress/support/pages/frontend/CheckoutShippingPage.js @@ -16,6 +16,12 @@ export default class CheckoutShippingPage { }); } + fillBelgianShippingAddress() { + cy.fixture('belgian-shipping-address').then((address) => { + this.fillShippingAddress(address); + }); + } + fillGermanShippingAddress() { cy.fixture('german-shipping-address').then((address) => { this.fillShippingAddress(address); diff --git a/Test/Integration/Etc/Config/MethodsConfigurationTest.php b/Test/Integration/Etc/Config/MethodsConfigurationTest.php index e3845068414..809202a02e4 100644 --- a/Test/Integration/Etc/Config/MethodsConfigurationTest.php +++ b/Test/Integration/Etc/Config/MethodsConfigurationTest.php @@ -38,6 +38,7 @@ public function methods(): array ['mollie_methods_paypal'], ['mollie_methods_paysafecard'], ['mollie_methods_pointofsale'], + ['mollie_methods_payconiq'], ['mollie_methods_przelewy24'], ['mollie_methods_riverty'], ['mollie_methods_sofort'], diff --git a/Test/Integration/Helper/GeneralTest.php b/Test/Integration/Helper/GeneralTest.php index b3a711ee34d..58a316bf346 100644 --- a/Test/Integration/Helper/GeneralTest.php +++ b/Test/Integration/Helper/GeneralTest.php @@ -165,6 +165,7 @@ public function getMethodCodeDataProvider() 'paypal' => ['mollie_methods_paypal', 'paypal'], 'paysafecard' => ['mollie_methods_paysafecard', 'paysafecard'], 'pointofsale' => ['mollie_methods_pointofsale', 'pointofsale'], + 'payconiq' => ['mollie_methods_payconiq', 'payconiq'], 'przelewy24' => ['mollie_methods_przelewy24', 'przelewy24'], 'riverty' => ['mollie_methods_riverty', 'riverty'], 'sofort' => ['mollie_methods_sofort', 'sofort'], diff --git a/Test/Integration/Model/Methods/PayconiqTest.php b/Test/Integration/Model/Methods/PayconiqTest.php new file mode 100644 index 00000000000..47c05927cc0 --- /dev/null +++ b/Test/Integration/Model/Methods/PayconiqTest.php @@ -0,0 +1,16 @@ +assertArrayHasKey('mollie_methods_paypal', $result['payment']['image']); $this->assertArrayHasKey('mollie_methods_paysafecard', $result['payment']['image']); $this->assertArrayHasKey('mollie_methods_pointofsale', $result['payment']['image']); + $this->assertArrayHasKey('mollie_methods_payconiq', $result['payment']['image']); $this->assertArrayHasKey('mollie_methods_przelewy24', $result['payment']['image']); $this->assertArrayHasKey('mollie_methods_riverty', $result['payment']['image']); $this->assertArrayHasKey('mollie_methods_sofort', $result['payment']['image']); diff --git a/Test/Integration/Service/Config/PaymentFeeTest.php b/Test/Integration/Service/Config/PaymentFeeTest.php index 1c5cfaff059..e7e70808710 100644 --- a/Test/Integration/Service/Config/PaymentFeeTest.php +++ b/Test/Integration/Service/Config/PaymentFeeTest.php @@ -46,6 +46,7 @@ public function isAvailableForMethodProvider() ['mollie_methods_paypal', true], ['mollie_methods_paysafecard', true], ['mollie_methods_pointofsale', true], + ['mollie_methods_payconiq', true], ['mollie_methods_przelewy24', true], ['mollie_methods_riverty', true], ['mollie_methods_sofort', true], diff --git a/Webapi/ResetCart.php b/Webapi/ResetCart.php new file mode 100644 index 00000000000..d56fc7e25d1 --- /dev/null +++ b/Webapi/ResetCart.php @@ -0,0 +1,64 @@ +encryptor = $encryptor; + $this->orderRepository = $orderRepository; + $this->checkoutSession = $checkoutSession; + } + + public function byHash(string $hash): void + { + $decodedHash = base64_decode($hash); + $orderId = $this->encryptor->decrypt($decodedHash); + + $this->checkIfLastRealOrder((int)$orderId); + $this->checkoutSession->restoreQuote(); + } + + private function checkIfLastRealOrder(int $orderId) + { + if ($this->checkoutSession->getLastRealOrder()->getId()) { + return; + } + + try { + $order = $this->orderRepository->get($orderId); + $this->checkoutSession->setLastRealOrderId($order->getIncrementId()); + } catch (NoSuchEntityException $exception) { + // + } + } +} diff --git a/Webapi/StartTransaction.php b/Webapi/StartTransaction.php index 7ac877d5392..2db1392b98a 100644 --- a/Webapi/StartTransaction.php +++ b/Webapi/StartTransaction.php @@ -10,6 +10,7 @@ use Magento\Sales\Api\OrderRepositoryInterface; use Mollie\Payment\Api\PaymentTokenRepositoryInterface; use Mollie\Payment\Api\Webapi\StartTransactionRequestInterface; +use Mollie\Payment\Service\Order\Transaction; class StartTransaction implements StartTransactionRequestInterface { @@ -23,12 +24,19 @@ class StartTransaction implements StartTransactionRequestInterface */ private $paymentTokenRepository; + /** + * @var Transaction + */ + private $transaction; + public function __construct( OrderRepositoryInterface $orderRepository, - PaymentTokenRepositoryInterface $paymentTokenRepository + PaymentTokenRepositoryInterface $paymentTokenRepository, + Transaction $transaction ) { $this->orderRepository = $orderRepository; $this->paymentTokenRepository = $paymentTokenRepository; + $this->transaction = $transaction; } /** @@ -45,6 +53,16 @@ public function execute(string $token) /** @var \Mollie\Payment\Model\Mollie $instance */ $instance = $order->getPayment()->getMethodInstance(); - return $instance->startTransaction($order); + $checkoutUrl = $instance->startTransaction($order); + if ($checkoutUrl !== null) { + return $checkoutUrl; + } + + // If the order is paid with a payment method without hosted payment page, + // we need to redirect to the success page. As the order is instantly paid. + return $this->transaction->getRedirectUrl( + $order, + $token + ); } } diff --git a/composer.json b/composer.json index 15a186b6f26..b2c65383da1 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "mollie/magento2", "description": "Mollie Payment Module for Magento 2", - "version": "2.40.1", + "version": "2.41.0", "keywords": [ "mollie", "payment", diff --git a/etc/adminhtml/methods.xml b/etc/adminhtml/methods.xml index d8bc8482603..7417f0b9103 100644 --- a/etc/adminhtml/methods.xml +++ b/etc/adminhtml/methods.xml @@ -28,6 +28,7 @@ + diff --git a/etc/adminhtml/methods/payconiq.xml b/etc/adminhtml/methods/payconiq.xml new file mode 100644 index 00000000000..a6973f0d434 --- /dev/null +++ b/etc/adminhtml/methods/payconiq.xml @@ -0,0 +1,156 @@ + + + + + + + + + Magento\Config\Model\Config\Source\Yesno + payment/mollie_methods_payconiq/active + + + + payment/mollie_methods_payconiq/title + + 1 + + + + + Mollie\Payment\Model\Adminhtml\Source\Method + payment/mollie_methods_payconiq/method + + 1 + + here + to read more about the differences between the Payment and Orders API.]]> + + + + payment/mollie_methods_payconiq/payment_description + + + payment + 1 + + + + + validate-digits-range digits-range-1-365 + payment/mollie_methods_payconiq/days_before_expire + + 1 + order + + How many days before orders for this method becomes expired? Leave empty to use default expiration (28 days) + + + + Magento\Payment\Model\Config\Source\Allspecificcountries + payment/mollie_methods_payconiq/allowspecific + + 1 + + + + + Magento\Directory\Model\Config\Source\Country + 1 + payment/mollie_methods_payconiq/specificcountry + + 1 + + + + + payment/mollie_methods_payconiq/min_order_total + + 1 + + + + + payment/mollie_methods_payconiq/max_order_total + + 1 + + + + + payment/mollie_methods_payconiq/payment_surcharge_type + Mollie\Payment\Model\Adminhtml\Source\PaymentFeeType + + 1 + + + + + payment/mollie_methods_payconiq/payment_surcharge_fixed_amount + Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee + validate-not-negative-number + + 1 + fixed_fee,fixed_fee_and_percentage + + + + + payment/mollie_methods_payconiq/payment_surcharge_percentage + Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee + validate-number-range number-range-0-10 + + 1 + percentage,fixed_fee_and_percentage + + + + + payment/mollie_methods_payconiq/payment_surcharge_limit + + Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee + validate-not-negative-number + + 1 + percentage,fixed_fee_and_percentage + + + + + payment/mollie_methods_payconiq/payment_surcharge_tax_class + \Magento\Tax\Model\TaxClass\Source\Product + + 1 + fixed_fee,percentage,fixed_fee_and_percentage + + + + + validate-number + payment/mollie_methods_payconiq/sort_order + + 1 + + + + diff --git a/etc/adminhtml/methods/paymentlink.xml b/etc/adminhtml/methods/paymentlink.xml index eda0276c5c6..faa57c77a9b 100644 --- a/etc/adminhtml/methods/paymentlink.xml +++ b/etc/adminhtml/methods/paymentlink.xml @@ -1,7 +1,12 @@ + + - + + - + + - + + - + + - - - - - - Mollie\Payment\Block\Adminhtml\Render\Heading - Mollie Profile.
]]>
+ Mollie Profile.
]]>
diff --git a/etc/config.xml b/etc/config.xml index bfe2ca62d18..6ef01a71507 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -8,7 +8,7 @@ - v2.40.1 + v2.41.0 0 0 test @@ -528,6 +528,25 @@ 0 1 + + 1 + Mollie\Payment\Model\Methods\Payconiq + Payconiq + {ordernumber} + payment + order + 0 + + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 1 + 1 Mollie\Payment\Model\Methods\Przelewy24 diff --git a/etc/di.xml b/etc/di.xml index 08b039519d8..883bcc8ce2a 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -9,6 +9,7 @@ + @@ -1597,6 +1598,51 @@ + + + + Magento\Payment\Block\Form + Mollie\Payment\Block\Info\Base + MolliePayconiqValueHandlerPool + MollieCommandPool + MolliePayconiqValidatorPool + + + + + + + MolliePayconiqConfigValueHandler + + + + + + + MolliePayconiqConfig + + + + + + Mollie\Payment\Model\Methods\Payconiq::CODE + + + + + + + MolliePayconiqCountryValidator + + + + + + + MolliePayconiqConfig + + + diff --git a/etc/events.xml b/etc/events.xml index 6c9df6b8668..de771b9207c 100644 --- a/etc/events.xml +++ b/etc/events.xml @@ -1,4 +1,9 @@ + + @@ -29,6 +34,7 @@ + diff --git a/etc/graphql/di.xml b/etc/graphql/di.xml index cd45735746e..984530c1bb3 100644 --- a/etc/graphql/di.xml +++ b/etc/graphql/di.xml @@ -32,6 +32,7 @@ Mollie\Payment\GraphQL\DataProvider Mollie\Payment\GraphQL\DataProvider Mollie\Payment\GraphQL\DataProvider + Mollie\Payment\GraphQL\DataProvider Mollie\Payment\GraphQL\DataProvider Mollie\Payment\GraphQL\DataProvider Mollie\Payment\GraphQL\DataProvider diff --git a/etc/payment.xml b/etc/payment.xml index 15938bd2f81..390c0c4b327 100644 --- a/etc/payment.xml +++ b/etc/payment.xml @@ -78,6 +78,9 @@ 0 + + 0 + 0 diff --git a/etc/webapi.xml b/etc/webapi.xml index 7461462ccac..5c56d22ecb4 100644 --- a/etc/webapi.xml +++ b/etc/webapi.xml @@ -1,10 +1,8 @@ + ~ Copyright Magmodules.eu. All rights reserved. + ~ See COPYING.txt for license details. + --> @@ -51,6 +49,13 @@ + + + + + + + diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index a0dc16054c9..4d74018075c 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -221,6 +221,7 @@ "Paypal","PayPal" "Paysafecard","Paysafecard" "Point Of Sale (POS)","Point Of Sale (POS)" +"Payconiq","Payconiq" "Przelewy24","Przelewy24" "Sofort","Sofort" "Trustly","Trustly" diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 9ad7cf38b69..dddb3f72c2b 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -221,6 +221,7 @@ "Paypal","Paypal" "Paysafecard","Paysafecard" "Point Of Sale (POS)","Point Of Sale (POS)" +"Payconiq","Payconiq" "Przelewy24","Przelewy24" "Sofort","Sofort" "Trustly","Trustly" diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv index 97ea9ba9482..b123e880cbd 100644 --- a/i18n/es_ES.csv +++ b/i18n/es_ES.csv @@ -221,6 +221,7 @@ "Paypal","Paypal" "Paysafecard","Paysafecard" "Point Of Sale (POS)","Point Of Sale (POS)" +"Payconiq","Payconiq" "Przelewy24","Przelewy24" "Sofort","Sofort" "Trustly","Trustly" diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index e074c0d5e8a..d6da30e74ea 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -221,6 +221,7 @@ "Paypal","PayPal" "Paysafecard","Paysafecard" "Point Of Sale (POS)","Point Of Sale (POS)" +"Payconiq","Payconiq" "Przelewy24","Przelewy24" "Sofort","Sofort" "Trustly","Trustly" diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index c6ba9e346ae..6755231acee 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -221,6 +221,7 @@ "Paypal","PayPal" "Paysafecard","Paysafecard" "Point Of Sale (POS)","Point Of Sale (POS)" +"Payconiq","Payconiq" "Przelewy24","Przelewy24" "Sofort","Sofort" "Trustly","Trustly" diff --git a/view/adminhtml/templates/system/config/button/documentation.phtml b/view/adminhtml/templates/system/config/button/documentation.phtml index e7f1dbf7a90..98960b85fad 100644 --- a/view/adminhtml/templates/system/config/button/documentation.phtml +++ b/view/adminhtml/templates/system/config/button/documentation.phtml @@ -1,6 +1,6 @@ Open Documentation diff --git a/view/adminhtml/web/images/payconiq.svg b/view/adminhtml/web/images/payconiq.svg new file mode 100644 index 00000000000..fd3dbfb937e --- /dev/null +++ b/view/adminhtml/web/images/payconiq.svg @@ -0,0 +1 @@ + diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml index 7c120a849ce..fcfcbaf60f6 100644 --- a/view/frontend/layout/checkout_index_index.xml +++ b/view/frontend/layout/checkout_index_index.xml @@ -96,6 +96,9 @@ true + + true + true diff --git a/view/frontend/templates/checkout/pointofsale/wait.phtml b/view/frontend/templates/checkout/pointofsale/wait.phtml index 7d827205bf6..72132ab7cde 100644 --- a/view/frontend/templates/checkout/pointofsale/wait.phtml +++ b/view/frontend/templates/checkout/pointofsale/wait.phtml @@ -1,4 +1,8 @@ -
"}}'>
+
+ + diff --git a/view/frontend/web/images/methods/payconiq.svg b/view/frontend/web/images/methods/payconiq.svg new file mode 100644 index 00000000000..fd3dbfb937e --- /dev/null +++ b/view/frontend/web/images/methods/payconiq.svg @@ -0,0 +1 @@ + diff --git a/view/frontend/web/js/view/checkout/save-payment-method.js b/view/frontend/web/js/view/checkout/save-payment-method.js index 63562310f97..5bd1bc0208f 100644 --- a/view/frontend/web/js/view/checkout/save-payment-method.js +++ b/view/frontend/web/js/view/checkout/save-payment-method.js @@ -1,3 +1,8 @@ +/* + * Copyright Magmodules.eu. All rights reserved. + * See COPYING.txt for license details. + */ + define([ 'ko', 'uiComponent', @@ -64,7 +69,8 @@ define([ extension_attributes: {} }; - payload.billingAddress = quote.billingAddress(); + // Do not send the billing address, this is saved by Magento itself + // payload.billingAddress = quote.billingAddress(); /** * Problem: We need to set the payment method, therefor we created this function. The api call requires diff --git a/view/frontend/web/js/view/payment/method-renderer.js b/view/frontend/web/js/view/payment/method-renderer.js index 817d373586b..bb93036566e 100644 --- a/view/frontend/web/js/view/payment/method-renderer.js +++ b/view/frontend/web/js/view/payment/method-renderer.js @@ -50,6 +50,7 @@ define( {type: 'mollie_methods_paypal', component: defaultComponent}, {type: 'mollie_methods_paysafecard', component: defaultComponent}, {type: 'mollie_methods_pointofsale', component: pointofsaleComponent}, + {type: 'mollie_methods_payconiq', component: defaultComponent}, {type: 'mollie_methods_przelewy24', component: defaultComponent}, {type: 'mollie_methods_riverty', component: defaultComponent}, {type: 'mollie_methods_sofort', component: defaultComponent},