From 690d5977027e15190a3f1f43090a6a4ced8b5db1 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Mon, 29 Jul 2024 09:33:41 +0200 Subject: [PATCH 01/47] PLUG-3685 - Fastcheckout --- Block/Checkout/QuickCheckout.php | 37 +++ Controller/Checkout/Exchange.php | 133 ++++++++++- .../Checkout/FastCheckoutCreateOrder.php | 161 +++++++++++++ Controller/Checkout/FastCheckoutStart.php | 135 +++++++++++ Controller/Checkout/Finish.php | 20 ++ Model/OrderCreateResponse.php | 76 ++++++ Model/PayPaymentCreate.php | 46 ++-- Model/PayPaymentCreateFastCheckout.php | 217 ++++++++++++++++++ Model/PayPaymentProcessFastCheckout.php | 183 +++++++++++++++ ViewModel/QuickCheckout.php | 25 ++ etc/adminhtml/paymentmethods/ideal.xml | 22 ++ etc/db_schema.xml | 14 ++ view/frontend/layout/checkout_cart_index.xml | 12 + .../templates/pay_quick_checkout_cart.phtml | 14 ++ view/frontend/web/css/payQuickCheckout.css | 19 ++ .../web/images/quickCheckoutIdeal.png | Bin 0 -> 12107 bytes 16 files changed, 1098 insertions(+), 16 deletions(-) create mode 100644 Block/Checkout/QuickCheckout.php create mode 100644 Controller/Checkout/FastCheckoutCreateOrder.php create mode 100644 Controller/Checkout/FastCheckoutStart.php create mode 100644 Model/OrderCreateResponse.php create mode 100644 Model/PayPaymentCreateFastCheckout.php create mode 100644 Model/PayPaymentProcessFastCheckout.php create mode 100644 ViewModel/QuickCheckout.php create mode 100644 view/frontend/layout/checkout_cart_index.xml create mode 100644 view/frontend/templates/pay_quick_checkout_cart.phtml create mode 100644 view/frontend/web/css/payQuickCheckout.css create mode 100644 view/frontend/web/images/quickCheckoutIdeal.png diff --git a/Block/Checkout/QuickCheckout.php b/Block/Checkout/QuickCheckout.php new file mode 100644 index 00000000..b3f4ff7a --- /dev/null +++ b/Block/Checkout/QuickCheckout.php @@ -0,0 +1,37 @@ +urlHelper = $urlHelper; + $page->addPageAsset('Paynl_Payment::css/payQuickCheckout.css'); + parent::__construct($context, $data); + } + +} \ No newline at end of file diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index ce46a481..2a59d184 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -10,6 +10,7 @@ use Paynl\Payment\Controller\PayAction; use Paynl\Payment\Helper\PayHelper; use Paynl\Payment\Model\PayPayment; +use Paynl\Payment\Model\PayPaymentProcessFastCheckout; use Paynl\Transaction; class Exchange extends PayAction implements CsrfAwareActionInterface @@ -34,12 +35,22 @@ class Exchange extends PayAction implements CsrfAwareActionInterface */ private $payPayment; + /** + * @var PayPaymentProcessFastCheckout + */ + private $payPaymentProcessFastCheckout; + /** * * @var \Paynl\Payment\Helper\PayHelper; */ private $payHelper; + /** + * @var + */ + private $headers; + /** * * @param RequestInterface $request @@ -65,6 +76,7 @@ public function validateForCsrf(RequestInterface $request): bool * @param \Magento\Framework\Controller\Result\Raw $result * @param OrderRepository $orderRepository * @param PayPayment $payPayment + * @param PayPaymentProcessFastCheckout $payPaymentProcessFastCheckout * @param PayHelper $payHelper */ public function __construct( @@ -73,31 +85,146 @@ public function __construct( \Magento\Framework\Controller\Result\Raw $result, OrderRepository $orderRepository, PayPayment $payPayment, + PayPaymentProcessFastCheckout $payPaymentProcessFastCheckout, PayHelper $payHelper ) { $this->result = $result; $this->config = $config; $this->orderRepository = $orderRepository; $this->payPayment = $payPayment; + $this->payPaymentProcessFastCheckout = $payPaymentProcessFastCheckout; $this->payHelper = $payHelper; parent::__construct($context); } + + /** + * @return array|false + */ + private function getHeaders() + { + if (empty($this->headers)) { + $this->headers = array_change_key_case(getallheaders(), CASE_LOWER); + } + return $this->headers; + } + + /** + * @return bool + */ + private function isSignExchange() + { + $headers = $this->getHeaders(); + $signingMethod = $headers['signature-method'] ?? null; + return $signingMethod === 'HMAC'; + } + + /** + * @param $request + * @return array + * @throws Exception + */ + private function getPayLoad($_request) + { + $request = (object) $_request->getParams() ?? null; + + $action = $request->action ?? null; + if (!empty($action)) { + # The argument "action" tells us this is not coming from TGU. Todo: check should be better + $action = $request->action ?? null; + $paymentProfile = $request->payment_profile_id ?? null; + $payOrderId = $request->order_id ?? null; + $orderId = $request->extra1 ?? null; + } else { + # TGU + if ($_request->isGet() || !$this->isSignExchange()) { + $data['object'] = $request->object; + } else { + $rawBody = file_get_contents('php://input'); + $data = json_decode($rawBody, true, 512, 4194304); + $exchangeType = $data['type'] ?? null; + + # Volgens documentatie alleen type order verwerken. https://developer.pay.nl/docs/signing + if ($exchangeType != 'order') { + throw new Exception('Cant handle exchange type other then order'); + } + } + $this->payHelper->logDebug('payload', $data); + $payOrderId = $data['object']['orderId'] ?? ''; + $internalStateId = $data['object']['status']['code'] ?? ''; + $internalStateName = $data['object']['status']['action'] ?? ''; + $orderId = $data['object']['reference'] ?? ''; + $action = ($internalStateId == 100 || $internalStateName == 95) ? 'new_ppt' : 'pending'; + $checkoutData = $data['object']['checkoutData'] ?? ''; + } + + // Return mapped data so it works for all type of exchanges. + return [ + 'action' => $action, + 'paymentProfile' => $paymentProfile ?? null, + 'payOrderId' => $payOrderId, + 'orderId' => $orderId, + 'internalStateId' => $internalStateId ?? null, + 'internalStateName' => $internalStateName ?? null, + 'checkoutData' => $checkoutData ?? null, + 'orgData' => $data + ]; + } + + /** + * @param $params + * @return bool + */ + private function isFastCheckout($params) + { + return $params['orderId'] == 'fastcheckout' && !empty($params['checkoutData'] ?? ''); + } + /** * @return \Magento\Framework\Controller\Result\Raw */ public function execute() { - $params = $this->getRequest()->getParams(); + $params = $this->getPayLoad($this->getRequest()); $action = !empty($params['action']) ? strtolower($params['action']) : ''; - $payOrderId = isset($params['order_id']) ? $params['order_id'] : null; + $payOrderId = isset($params['payOrderId']) ? $params['payOrderId'] : null; $orderEntityId = isset($params['extra3']) ? $params['extra3'] : null; - $paymentProfileId = isset($params['payment_profile_id']) ? $params['payment_profile_id'] : null; + $paymentProfileId = isset($params['paymentProfile']) ? $params['paymentProfile'] : null; if ($action == 'pending') { return $this->result->setContents('TRUE| Ignore pending'); } + if ($this->isFastCheckout($params)) { + + $checkoutData = $params['checkoutData']; + + $fcOrder = $this->payPaymentProcessFastCheckout->processFastCheckout($params); + + $this->config->setStore($fcOrder->getStore()); + + try { + $this->config->configureSDK(true); + $transaction = Transaction::get($payOrderId); + } catch (\Exception $e) { + $this->payHelper->logCritical($e, $params, $fcOrder->getStore()); + return $this->result->setContents('FALSE| Error fetching transaction. ' . $e->getMessage()); + } + + try { + $result = $this->payPayment->processPaidOrder($transaction, $fcOrder, $paymentProfileId); + if (!$result) { + throw new \Exception('Cannot process order'); + } + + $message = 'TRUE| ' . (($transaction->isPaid()) ? "PAID" : "AUTHORIZED"); + } catch (\Exception $e) { + $message = 'FALSE| ' . $e->getMessage(); + } + + return $this->result->setContents($message); + } + if (empty($payOrderId) || empty($orderEntityId)) { $this->payHelper->logCritical('Exchange: order_id or orderEntity is not set', $params); return $this->result->setContents('FALSE| order_id is not set in the request'); diff --git a/Controller/Checkout/FastCheckoutCreateOrder.php b/Controller/Checkout/FastCheckoutCreateOrder.php new file mode 100644 index 00000000..c7799267 --- /dev/null +++ b/Controller/Checkout/FastCheckoutCreateOrder.php @@ -0,0 +1,161 @@ +_pageFactory = $pageFactory; + $this->_storeManager = $storeManager; + $this->_product = $product; + $this->_formkey = $formkey; + $this->quote = $quote; + $this->quoteManagement = $quoteManagement; + $this->customerFactory = $customerFactory; + $this->customerRepository = $customerRepository; + $this->remoteAddress = $remoteAddress; + $this->resource = $resource; + + return parent::__construct($context); + } + + public function execute() + { + + $data = json_decode('{"id":"6693a2f4-5223-8992-1a5f-526160012372","uuid":"a1bf5261-6001-2372-5200-1705096a2372","links":{"void":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/void","abort":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/abort","debug":"https:\/\/checkout.payments.nl\/to\/checkout\/6693a2f4-5223-8992-1a5f-526160012372\/with\/debugging\/6693a2f4522389921a5f526160012372","status":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/status","approve":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/approve","capture":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/capture","decline":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/decline","checkout":"https:\/\/checkout.payments.nl\/to\/return\/6693a2f4-5223-8992-1a5f-526160012372","redirect":"https:\/\/checkout.payments.nl\/to\/return\/6693a2f4-5223-8992-1a5f-526160012372","captureAmount":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/capture\/amount","captureProducts":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/capture\/products"},"amount":{"value":"10","currency":"EUR"},"status":{"code":"100","action":"PAID"},"orderId":"52001705096X2372","receipt":"","payments":[{"id":"6693a310-5223-88e3-2b77-052001705096","amount":{"value":"10","currency":"EUR"},"status":{"code":"100","action":"PAID"},"ipAddress":"","customerId":"NL93INGB0006700949","customerKey":"fd36c8fb62a554e1bd7be3a7fd7485a6","customerName":"Hr W M Jonker","customerType":"","secureStatus":"1","supplierData":{"contactDetails":{"email":"wouterjonker@hotmail.com","lastName":"Jonker","firstName":"Wouter","phoneNumber":" 31652457521"},"invoiceAddress":{"city":"Sommelsdijk","street":"Kortewegje","addition":"","lastName":"Jonker","firstName":"Wouter","postalCode":"3245XM","companyName":"","countryName":"Netherlands","houseNumber":"19"},"shippingAddress":{"city":"Sommelsdijk","street":"Kortewegje","addition":"","lastName":"Jonker","firstName":"Wouter","postalCode":"3245XM","companyName":"","countryName":"Netherlands","houseNumber":"19"}},"paymentMethod":{"id":"10","input":{"issuerId":""}},"capturedAmount":{"value":"10","currency":"EUR"},"currencyAmount":{"value":"10","currency":"EUR"},"authorizedAmount":{"value":"0","currency":"EUR"},"paymentVerificationMethod":"21"}],"createdAt":"2024-07-14T10:05:40 00:00","createdBy":"AT-0045-3283","expiresAt":"2024-07-21T10:05:40 00:00","reference":"","serviceId":"SL-5261-6001","modifiedAt":"2024-07-14T12:07:18 02:00","modifiedBy":"","completedAt":"2024-07-14T12:07:18 02:00","customerKey":"fd36c8fb62a554e1bd7be3a7fd7485a6","description":"","integration":{"test":""},"checkoutData":{"customer":{"email":"wouterjonker@hotmail.com","phone":" 31652457521","gender":"","locale":"","company":"","lastname":"Jonker","firstname":"Wouter","ipAddress":"","reference":"NL93INGB0006700949","dateOfBirth":""},"billingAddress":{"city":"Sommelsdijk","zipCode":"3245XM","lastName":"Jonker","firstName":"Wouter","regionCode":"","streetName":"Kortewegje","countryCode":"NL","streetNumber":"19","streetNumberAddition":""},"shippingAddress":{"city":"Sommelsdijk","zipCode":"3245XM","lastName":"Jonker","firstName":"Wouter","regionCode":"","streetName":"Kortewegje","countryCode":"NL","streetNumber":"19","streetNumberAddition":""}},"capturedAmount":{"value":"10","currency":"EUR"},"authorizedAmount":{"value":"0","currency":"EUR"},"manualTransferCode":"1000 0520 0170 5096"}'); + + $customerData = $data->checkoutData->customer; + $billingAddressData = $data->checkoutData->billingAddress; + $shippingAddressData = $data->checkoutData->shippingAddress; + + $payOrderId = '2531784984X99580'; + + $connection = $this->resource->getConnection(); + $tableName = $this->resource->getTableName('pay_fast_checkout'); + + $select = $connection->select()->from([$tableName])->where('payOrderId = ?', $payOrderId); + $result = $connection->fetchAll($select); + + $products = json_decode($result[0]['products']); + + $productids=array(1); + $store = $this->_storeManager->getStore(); + $websiteId = $this->_storeManager->getStore()->getWebsiteId(); + + $quote=$this->quote->create(); + $quote->setStore($store); + + $email = $customerData->email; + $customer = $this->customerFactory->create() + ->setWebsiteId($websiteId) + ->loadByEmail($email); + + if(!$customer->getEntityId()){ + $customer->setWebsiteId($websiteId) + ->setStore($store) + ->setFirstname($customerData->firstname) + ->setLastname($customerData->lastname) + ->setEmail($email) + ->setPassword($email); + $customer->save(); + } + + $customer= $this->customerRepository->getById($customer->getEntityId()); + $quote->setCurrency(); + + $quote->assignCustomer($customer); + + $quote->setSendConfirmation(1); + foreach($products as $productArr){ + $product = $this->_product->load($productArr->id); + $quote->addProduct($product, intval(array('qty' => $productArr->qty))); + } + + $billingAddress = $quote->getBillingAddress()->addData(array( + 'customer_address_id' => '', + 'prefix' => '', + 'firstname' => $customerData->firstname, + 'middlename' => '', + 'lastname' => $customerData->lastname, + 'suffix' => '', + 'company' => $customerData->company, + 'street' => array( + '0' => $billingAddressData->streetName, + '1' => $billingAddressData->streetNumber . $billingAddressData->streetNumberAddition + ), + 'city' => $billingAddressData->city, + 'country_id' => $billingAddressData->countryCode, + 'region' => $billingAddressData->regionCode, + 'postcode' => $billingAddressData->zipCode, + 'telephone' => $customerData->phone, + 'fax' => '', + 'vat_id' => '', + 'save_in_address_book' => 1 + )); + + $shippingAddress = $quote->getShippingAddress()->addData(array( + 'customer_address_id' => '', + 'prefix' => '', + 'firstname' => $customerData->firstname, + 'middlename' => '', + 'lastname' => $customerData->lastname, + 'suffix' => '', + 'company' => $customerData->company, + 'street' => array( + '0' => $shippingAddressData->streetName, + '1' => $shippingAddressData->streetNumber . $shippingAddressData->streetNumberAddition + ), + 'city' => $shippingAddressData->city, + 'country_id' => $shippingAddressData->countryCode, + 'region' => $shippingAddressData->regionCode, + 'postcode' => $shippingAddressData->zipCode, + 'telephone' => $customerData->phone, + 'fax' => '', + 'vat_id' => '', + 'save_in_address_book' => 1 + )); + + $shippingAddress->setCollectShippingRates(true) + ->collectShippingRates() + ->setShippingMethod('flatrate_flatrate') + ->setPaymentMethod('paynl_payment_ideal'); + $quote->setPaymentMethod('paynl_payment_ideal'); + $quote->setInventoryProcessed(false); + $quote->save(); + + $quote->getPayment()->importData(array('method' => 'paynl_payment_ideal')); + + + $quote->collectTotals()->save(); + + $service = $this->quoteManagement->submit($quote); + $increment_id = $service->getRealOrderId(); + + $quote = $customer = $service = null; + + echo __('Order created successfully with order id '.$increment_id); + } +} diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php new file mode 100644 index 00000000..8c653d77 --- /dev/null +++ b/Controller/Checkout/FastCheckoutStart.php @@ -0,0 +1,135 @@ +cart = $cart; + $this->payConfig = $payConfig; + $this->remoteAddress = $remoteAddress; + $this->resource = $resource; + $this->paymentHelper = $paymentHelper; + $this->storeManager = $storeManager; + $this->payHelper = $payHelper; + + return parent::__construct($context); + } + + /** + * @return array + */ + private function getProducts() + { + $products = $this->cart->getItems(); + $productArr = []; + + foreach ($products as $key => $product) { + if($product->getPrice() > 0){ + $productArr[] = [ + 'id' => $product->getProductId(), + 'quantity' => $product->getQty(), + 'description' => $product->getName(), + 'price' => $product->getPrice() * 100, + 'currecny' => $this->storeManager->getStore()->getCurrentCurrencyCode(), + 'type' => 'product', + 'vatPercentage' => ($product->getPriceInclTax() - $product->getBasePrice()) / $product->getBasePrice() * 100 + ]; + } + } + + return $productArr; + } + + public function execute() + { + $methodInstance = $this->paymentHelper->getMethodInstance('paynl_payment_ideal'); + $arrProducts = $this->getProducts(); + $fcAmount = $this->cart->getQuote()->getGrandTotal(); + try { + if (empty($fcAmount)) { + throw new \Exception('empty amount', FastCheckoutStart::FC_EMPTY_BASKET); + } + + $payTransaction = (new PayPaymentCreateFastCheckout( + $methodInstance, + $fcAmount * 100, + $arrProducts, + $this->storeManager->getStore()->getBaseUrl() + ))->create(); + + try { + $connection = $this->resource->getConnection(); + $tableName = $this->resource->getTableName('pay_fast_checkout'); + + $connection->insertOnDuplicate( + $tableName, ['payOrderId' => $payTransaction->getTransactionId(), 'products' => json_encode($arrProducts), 'storeId' => $this->storeManager->getStore()->getId(), 'orderId' => null], ['payOrderId', 'products', 'storeId', 'orderId', 'created_at'] + ); + } catch (\Exception $e) { + throw new \Exception($e->getMessage(), FastCheckoutStart::FC_DB_ERROR); + } + + $this->getResponse()->setNoCacheHeaders(); + $this->getResponse()->setRedirect($payTransaction->getRedirectUrl()); + + } catch (\Exception $e) { + $message = __('Something went wrong, please try again later'); + if ($e->getCode() == FastCheckoutStart::FC_EMPTY_BASKET) { + $message = __('Please put something in the basket'); + } elseif ($e->getCode() == FastCheckoutStart::FC_DB_ERROR) { + $this->payHelper->logCritical('FC DB ERROR: ' . $e->getMessage(), []); + } else { + $this->payHelper->logCritical('FC ERROR: ' . $e->getMessage(), []); + } + + $this->messageManager->addExceptionMessage($e, $message); + $this->_redirect('checkout/cart'); + } + } +} diff --git a/Controller/Checkout/Finish.php b/Controller/Checkout/Finish.php index cb0e2703..fdc189ad 100644 --- a/Controller/Checkout/Finish.php +++ b/Controller/Checkout/Finish.php @@ -139,6 +139,7 @@ public function execute() $params = $this->getRequest()->getParams(); $payOrderId = empty($params['orderId']) ? (empty($params['orderid']) ? null : $params['orderid']) : $params['orderId']; $orderStatusId = empty($params['orderStatusId']) ? null : (int)$params['orderStatusId']; + $orderStatusId = (empty($orderStatusId) && !empty($params['statusCode'])) ? (int)$params['statusCode'] : $orderStatusId; $magOrderId = empty($params['entityid']) ? null : $params['entityid']; $orderIds = empty($params['order_ids']) ? null : $params['order_ids']; $pickupMode = !empty($params['pickup']); @@ -151,6 +152,25 @@ public function execute() $multiShipFinish = is_array($orderIds); try { + if ($magOrderId == 'fc') { + if($bSuccess){ + # Make the cart inactive + $resultRedirect->setPath(Config::FINISH_PAY, ['_query' => ['utm_nooverride' => '1']]); + } elseif($bPending){ + $resultRedirect->setPath(Config::PENDING_PAY, ['_query' => ['utm_nooverride' => '1']]); + } else { + $resultRedirect->setPath(Config::CANCEL_PAY, ['_query' => ['utm_nooverride' => '1']]); + } + + if($bSuccess || $bPending){ + $session = $this->checkoutSession; + $quote = $session->getQuote(); + $quote->setIsActive(false); + $this->quoteRepository->save($quote); + } + + return $resultRedirect; + } $this->checkEmpty($magOrderId, 'magOrderId', 1012); $order = $this->orderRepository->get($magOrderId); $this->checkEmpty($order, 'order', 1013); diff --git a/Model/OrderCreateResponse.php b/Model/OrderCreateResponse.php new file mode 100644 index 00000000..115807d4 --- /dev/null +++ b/Model/OrderCreateResponse.php @@ -0,0 +1,76 @@ +links; + } + + /** + * @param mixed $links + */ + public function setLinks($links) + { + $this->links = $links; + } + + /** + * @param $transactionId + * @return void + */ + public function setTransactionId($transactionId) + { + $this->transid = $transactionId; + } + + /** + * @return mixed + */ + public function getTransactionId() + { + return $this->transid; + } + + /** + * @return mixed + */ + public function getRedirectUrl() + { + return $this->redirectUrl; + } + + /** + * @param mixed $redirectUrl + */ + public function setRedirectUrl($redirectUrl) + { + $this->redirectUrl = $redirectUrl; + } + + /** + * @return mixed + */ + public function getPaymentReference() + { + return $this->paymentReference; + } + + /** + * @param mixed $paymentReference + */ + public function setPaymentReference($paymentReference) + { + $this->paymentReference = $paymentReference; + } +} diff --git a/Model/PayPaymentCreate.php b/Model/PayPaymentCreate.php index 0126b562..f28c8954 100644 --- a/Model/PayPaymentCreate.php +++ b/Model/PayPaymentCreate.php @@ -7,6 +7,7 @@ use Magento\Sales\Model\Order; use Paynl\Payment\Helper\PayHelper; use Paynl\Payment\Model\Paymentmethod\PaymentMethod; +use Magento\Store\Model\StoreManagerInterface; class PayPaymentCreate { @@ -43,17 +44,17 @@ class PayPaymentCreate /** * @var integer */ - private $paymentMethodId; + protected $paymentMethodId; /** * @var integer */ - private $testMode; + protected $testMode; /** * @var \Paynl\Payment\Model\Config */ - private $payConfig; + protected $payConfig; /** * @var \Magento\Framework\App\Config\ScopeConfigInterface @@ -63,12 +64,12 @@ class PayPaymentCreate /** * @var PaymentMethod */ - private $methodInstance; + protected $methodInstance; /** * @var array */ - private $paymentData = []; + protected $paymentData = []; /** * @var array @@ -90,25 +91,35 @@ class PayPaymentCreate * @param PaymentMethod $methodInstance * @throws \Exception */ - public function __construct(Order $order, PaymentMethod $methodInstance) + public function __construct(null|Order $order, PaymentMethod $methodInstance) { $this->methodInstance = $methodInstance; $this->payConfig = $methodInstance->paynlConfig; $this->testMode = $this->payConfig->isTestMode(); $this->scopeConfig = $methodInstance->getScopeConfig(); - $this->order = $order; - $this->orderId = $order->getIncrementId(); - $this->additionalData = $order->getPayment()->getAdditionalInformation(); - $this->setAmount($this->payConfig->isAlwaysBaseCurrency() ? $order->getBaseGrandTotal() : $order->getGrandTotal()); - $this->setCurrency($this->payConfig->isAlwaysBaseCurrency() ? $order->getBaseCurrencyCode() : $order->getOrderCurrencyCode()); + $finishUrl = $exchangeUrl = ''; + + if($order instanceof Order) { + $this->order = $order; + $this->orderId = $order->getIncrementId(); + $this->additionalData = $order->getPayment()->getAdditionalInformation(); + $this->setAmount($this->payConfig->isAlwaysBaseCurrency() ? $order->getBaseGrandTotal() : $order->getGrandTotal()); + $this->setCurrency($this->payConfig->isAlwaysBaseCurrency() ? $order->getBaseCurrencyCode() : $order->getOrderCurrencyCode()); + + $finishUrl = $order->getStore()->getBaseUrl() . 'paynl/checkout/finish/?entityid=' . $order->getEntityId(); + $exchangeUrl = $order->getStore()->getBaseUrl() . 'paynl/checkout/exchange/'; + } + $this->setCompanyField($this->additionalData['companyfield'] ?? ''); $this->setCocNumber($this->additionalData['cocnumber'] ?? ''); $this->setVatNumber($this->additionalData['vatnumber'] ?? ''); $this->setIssuer($this->additionalData['payment_option'] ?? ''); $this->setExpireData((int)($this->additionalData['valid_days'] ?? '')); - $this->setFinishURL($this->additionalData['returnUrl'] ?? $order->getStore()->getBaseUrl() . 'paynl/checkout/finish/?entityid=' . $order->getEntityId()); - $this->setExchangeURL($this->additionalData['exchangeUrl'] ?? $order->getStore()->getBaseUrl() . 'paynl/checkout/exchange/'); + $this->setFinishURL($this->additionalData['returnUrl'] ?? $finishUrl); + $this->setExchangeURL($this->additionalData['exchangeUrl'] ?? $exchangeUrl); $this->setPaymentMethod($this->methodInstance->getPaymentOptionId()); + + return $this; } /** @@ -184,6 +195,15 @@ public function setFinishURL(string $finishUrl) return $this; } + /** + * @param string $finishUrl + * @return $this + */ + public function getFinishURL() + { + return $this->paymentData['returnURL']; + } + /** * @param string $exchangeURL * @return $this diff --git a/Model/PayPaymentCreateFastCheckout.php b/Model/PayPaymentCreateFastCheckout.php new file mode 100644 index 00000000..fe3f8d17 --- /dev/null +++ b/Model/PayPaymentCreateFastCheckout.php @@ -0,0 +1,217 @@ +setAmount($amount); + $fastCheckout->setCurrency('EUR'); // todo: make variable + $fastCheckout->setFinishURL($finishUrl); + $fastCheckout->setExchangeURL($exchangeUrl); + $fastCheckout->setProducts($products); + $fastCheckout->reference = 'fastcheckout'; + } + + /** + * @param $products + * @return void + */ + public function setProducts($products) + { + $this->products = $products; + } + + /** + * @return array + */ + public function getData() + { + $parameters = [ + 'serviceId' => $this->payConfig->getServiceId(), + 'amount' => [ + 'value' => $this->paymentData['amount'], + 'currency' => $this->paymentData['currency'], + ], + ]; + + $parameters['paymentMethod'] = ['id' => $this->paymentMethodId]; + + $this->_add($parameters, 'returnUrl', $this->paymentData['returnURL']); + $this->_add($parameters, 'description', ''); + $this->_add($parameters, 'reference', $this->reference); + $this->_add($parameters, 'exchangeUrl', $this->paymentData['exchangeURL']); + + $parameters['integration']['test'] = /*$this->testMode === */true; + + $optimize['flow'] = 'fastCheckout'; + $optimize['shippingAddress'] = true; + $optimize['billingAddress'] = true; + $optimize['contactDetails'] = ''; + + $this->_add($parameters, 'optimize', $optimize); + + $orderParameters = []; + $invoiceAddress = []; + $productData = $this->getProductData(); + + $this->_add($orderParameters, 'products', $this->getProductData()); + $this->_add($parameters, 'order', $orderParameters); + + $stats = []; + $this->_add($stats, 'info', ''); + $this->_add($stats, 'tool', ''); + $this->_add($stats, 'object', $this->methodInstance->getVersion() . ' | fc'); + $this->_add($stats, 'extra1', ''); + $this->_add($stats, 'extra2', ''); + $this->_add($stats, 'extra3', ''); + $this->_add($parameters, 'stats', $stats); + + return $parameters; + } + + /** + * @param $returnArr + * @param $field + * @param $value + * @return void + */ + private function _add(&$returnArr, $field, $value) + { + if (!empty($value)) { + $returnArr = array_merge($returnArr, [$field => $value]); + } + } + + /** + * @return array + */ + private function getProductData() + { + $arrProducts = []; + + foreach ($this->products as $i => $arrProduct) { + $product = []; + $product['id'] = $arrProduct['id'] ?? 'p'.$i; + $product['description'] = $arrProduct['description'] ?? ''; + $product['type'] = $arrProduct['type'] ?? ''; + $product['price'] = [ + 'value' => $arrProduct['price'], + 'currency' => $arrProduct['currecny'], + ]; + $product['quantity'] = $arrProduct['quantity'] ?? 0; + $product['vatPercentage'] = $arrProduct['vatPercentage'] ?? ''; + $arrProducts[] = $product; + } + + return $arrProducts; + } + + /** + * @return \Paynl\Result\Transaction\Start + * @throws \Paynl\Error\Api + * @throws \Paynl\Error\Error + * @throws \Paynl\Error\Required\ApiToken + * @throws \Paynl\Error\Required\ServiceId + */ + public function create(): OrderCreateResponse + { + $payload = $this->getData(); + + $payload = json_encode($payload); + #TODO: Make dynamic for failovergateway + $url = 'https://connect.payments.nl/v1/orders'; + + $rawResponse = (array)$this->sendCurlRequest($url, $payload, $this->payConfig->getTokencode(), $this->payConfig->getApiToken()); + + $redirectURL = $rawResponse['links']->redirect ?? ''; + + $transaction = new OrderCreateResponse(); + $transaction->setTransactionId($rawResponse['orderId'] ?? ''); + $transaction->setRedirectUrl($redirectURL); + $transaction->setPaymentReference($rawResponse['reference'] ?? ''); + $transaction->setLinks($rawResponse['links'] ?? ''); + + return $transaction; + } + + /** + * @param $requestUrl + * @param $payload + * @param $tokenCode + * @param $apiToken + * @param $method + * @return array + * @throws \Exception + */ + public function sendCurlRequest($requestUrl, $payload, $tokenCode, $apiToken, $method = 'POST') + { + $authorization = base64_encode($tokenCode . ':' . $apiToken); + + $curl = curl_init(); + curl_setopt_array( + $curl, [ + CURLOPT_URL => $requestUrl, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => "", + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 30, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => $method, + CURLOPT_POSTFIELDS => $payload, + CURLOPT_HTTPHEADER => [ + "accept: application/json", + "authorization: Basic " . $authorization, + "content-type: application/json", + ], + ] + ); + + $rawResponse = curl_exec($curl); + $response = json_decode($rawResponse); + + $error = curl_error($curl); + $http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE); + curl_close($curl); + + if ($error) { + throw new \Exception($error); + } elseif (!empty($response->violations)) { + $field = $response->violations[0]->propertyPath ?? ($response->violations[0]->code ?? ''); + throw new \Exception($field . ': ' . ($response->violations[0]->message ?? '')); + } + + return (array)$response; + } +} diff --git a/Model/PayPaymentProcessFastCheckout.php b/Model/PayPaymentProcessFastCheckout.php new file mode 100644 index 00000000..52fbb0c8 --- /dev/null +++ b/Model/PayPaymentProcessFastCheckout.php @@ -0,0 +1,183 @@ +_pageFactory = $pageFactory; + $this->_storeManager = $storeManager; + $this->_product = $product; + $this->_formkey = $formkey; + $this->quote = $quote; + $this->quoteManagement = $quoteManagement; + $this->customerFactory = $customerFactory; + $this->customerRepository = $customerRepository; + $this->remoteAddress = $remoteAddress; + $this->resource = $resource; + $this->orderFactory = $orderFactory; + $this->paynlConfig = $paynlConfig; + $this->payPayment = $payPayment; + } + + /** + * @param array $params + * @return boolean + */ + public function processFastCheckout($params) + { + $checkoutData = $params['checkoutData']; + + $customerData = $checkoutData['customer']; + $billingAddressData = $checkoutData['billingAddress']; + $shippingAddressData = $checkoutData['shippingAddress']; + + $payOrderId = $params['payOrderId']; + + $connection = $this->resource->getConnection(); + $tableName = $this->resource->getTableName('pay_fast_checkout'); + + $select = $connection->select()->from([$tableName])->where('payOrderId = ?', $payOrderId); + $result = $connection->fetchAll($select); + + if($result[0]['orderId'] == null) { + $products = json_decode($result[0]['products']); + + $store = $this->_storeManager->getStore($result[0]['storeId']); + $websiteId = $store->getWebsiteId(); + + $this->paynlConfig->setStore($store); + + $quote=$this->quote->create(); + $quote->setStore($store); + + $email = $customerData['email']; + $customer = $this->customerFactory->create() + ->setWebsiteId($websiteId) + ->loadByEmail($email); + + if(!$customer->getEntityId()){ + $customer->setWebsiteId($websiteId) + ->setStore($store) + ->setFirstname($customerData['firstName']) + ->setLastname($customerData['lastName']) + ->setEmail($email) + ->setPassword($email); + $customer->save(); + } + + $customer= $this->customerRepository->getById($customer->getEntityId()); + $quote->setCurrency(); + + $quote->assignCustomer($customer); + $quote->setSendConfirmation(1); + + foreach($products as $productArr){ + $product = $this->_product->load($productArr->id); + $product->setPrice($product->getPrice()); + $quote->addProduct($product, intval($productArr->quantity)); + } + + $billingAddress = $quote->getBillingAddress()->addData(array( + 'customer_address_id' => '', + 'prefix' => '', + 'firstname' => $customerData['firstName'], + 'middlename' => '', + 'lastname' => $customerData['lastName'], + 'suffix' => '', + 'company' => $customerData['company'] ?? '', + 'street' => array( + '0' => $billingAddressData['streetName'], + '1' => $billingAddressData['streetNumber'] . $billingAddressData['streetNumberAddition'] + ), + 'city' => $billingAddressData['city'], + 'country_id' => $billingAddressData['countryCode'], + 'region' => $billingAddressData['regionCode'] ?? '', + 'postcode' => $billingAddressData['zipCode'], + 'telephone' => $customerData['phone'], + 'fax' => '', + 'vat_id' => '', + 'save_in_address_book' => 0 + )); + + $shippingAddress = $quote->getShippingAddress()->addData(array( + 'customer_address_id' => '', + 'prefix' => '', + 'firstname' => $customerData['firstName'], + 'middlename' => '', + 'lastname' => $customerData['lastName'], + 'suffix' => '', + 'company' => $customerData['company'] ?? '', + 'street' => array( + '0' => $shippingAddressData['streetName'], + '1' => $shippingAddressData['streetNumber'] . $shippingAddressData['streetNumberAddition'] + ), + 'city' => $shippingAddressData['city'], + 'country_id' => $shippingAddressData['countryCode'], + 'region' => $shippingAddressData['regionCode'] ?? '', + 'postcode' => $shippingAddressData['zipCode'], + 'telephone' => $customerData['phone'], + 'fax' => '', + 'vat_id' => '', + 'save_in_address_book' => 0 + )); + + $shippingAddress->setCollectShippingRates(true) + ->collectShippingRates() + ->setShippingMethod($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')); + $quote->setPaymentMethod('paynl_payment_ideal'); + $quote->setInventoryProcessed(false); + $quote->save(); + $quote->getPayment()->importData(array('method' => 'paynl_payment_ideal')); + + $quote->collectTotals()->save(); + + $service = $this->quoteManagement->submit($quote); + $increment_id = $service->getRealOrderId(); + + $order = $this->orderFactory->create()->loadByIncrementId($increment_id); + $additionalData = $order->getPayment()->getAdditionalInformation(); + $additionalData['transactionId'] = $payOrderId; + $order->getPayment()->setAdditionalInformation($additionalData); + $order->save(); + + $connection->insertOnDuplicate( + $tableName, ['payOrderId' => $payOrderId, 'orderId' => $increment_id], ['payOrderId', 'orderId'] + ); + } else { + $order = $this->orderFactory->create()->loadByIncrementId($result[0]['orderId']); + } + + return $order; + } + +} diff --git a/ViewModel/QuickCheckout.php b/ViewModel/QuickCheckout.php new file mode 100644 index 00000000..9a67b236 --- /dev/null +++ b/ViewModel/QuickCheckout.php @@ -0,0 +1,25 @@ +scopeConfig = $scopeConfig; + } +} \ No newline at end of file diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 64df4e56..2c4ec4db 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -148,6 +148,28 @@ Business, BB2: Only show this payment method when the customer entered a company payment/paynl_payment_ideal/showforgroup + + + + Paynl\Payment\Model\Config\Source\OffOn + payment/paynl_payment_ideal/fast_checkout_enabled + + 1 + + Allows users to checkout directly from the cart without the need to fill in their address. + + + + Magento\Shipping\Model\Config\Source\Allmethods + payment/paynl_payment_ideal/fast_checkout_shipping + + 1 + 1 + diff --git a/etc/db_schema.xml b/etc/db_schema.xml index 03f9e236..fba94f84 100644 --- a/etc/db_schema.xml +++ b/etc/db_schema.xml @@ -10,4 +10,18 @@ + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/view/frontend/layout/checkout_cart_index.xml b/view/frontend/layout/checkout_cart_index.xml new file mode 100644 index 00000000..7d50478c --- /dev/null +++ b/view/frontend/layout/checkout_cart_index.xml @@ -0,0 +1,12 @@ + + + + + + + Paynl\Payment\ViewModel\QuickCheckout + + + + + \ No newline at end of file diff --git a/view/frontend/templates/pay_quick_checkout_cart.phtml b/view/frontend/templates/pay_quick_checkout_cart.phtml new file mode 100644 index 00000000..10deef9e --- /dev/null +++ b/view/frontend/templates/pay_quick_checkout_cart.phtml @@ -0,0 +1,14 @@ + + + +
+
+ +
+
diff --git a/view/frontend/web/css/payQuickCheckout.css b/view/frontend/web/css/payQuickCheckout.css new file mode 100644 index 00000000..aa8a5409 --- /dev/null +++ b/view/frontend/web/css/payQuickCheckout.css @@ -0,0 +1,19 @@ +#paynl_quick_checkout_cart{ + display:block; + width:100%; +} + +#paynl_quick_checkout_cart button, +#top-cart-quick-checkout{ + width: 100%; + line-height: 2.2rem; + padding: 14px 17px; + font-size: 1.8rem; + margin-top: -10px; + background: #c90066; + border-color: #c90066; + background-image: url("../images/quickCheckoutIdeal.png"); + background-repeat: no-repeat; + background-size: 51px; + background-position: 8px center; +} \ No newline at end of file diff --git a/view/frontend/web/images/quickCheckoutIdeal.png b/view/frontend/web/images/quickCheckoutIdeal.png new file mode 100644 index 0000000000000000000000000000000000000000..644f1c3bcea38176362f108dfab40cbb34cca696 GIT binary patch literal 12107 zcmeHsWl&t()@|bwf&~Z`oM6Ekw=^0c!5xA%&_H7iG){1rpuydp0KpxC1Shx?f(DlW zA=vBWoO|xM^}ecCx9WZWPFHvDz2}^JtU1RTYt>$Rg{dgXKEx)+1^@sL<>jQ+5Jz#u zj};Rg@sEOT@D%`f%;}+_?5rLlK}nL}+LG*0gJ5E_UZ)EoeCTc}8dCO&D1%fIhu z^}zBY)4}b7dtkKP+zmVM$f)I)YMdvlt)y|&0H}vYC{On9FMY<&e10TJg()i(Y$cuz zbUXvQM@f{gixXSWynPFBj6)==~-(rfR^_lz^w_jyL^dzL@- zZ-!Q@joT93l#abI9vgaxd^tk(zl&DhdBbwi;*j$o_K3wyuE}D)Hlb0QRk)wBw zUymN&ZX_JRI^4>9L~m|(D|SFhfku((9Uvdi8;5U~hTN0)q@eS&k^48T#M+0E-qr1Q zAd6{JYja{TbA=30#816kul43G`tLhGx$166?v!y<_lr){!*=DF%U#<8vc9FBHSRU; zB<>wH+Gb5E7Lwk2zgdg8oWu~(kvbU}v%l?+7HJP8(JB^nPhB)UUWGec%w3H3XKJ~h zI_mE}2@tZongxw@w5?GV_`_=;9k|AZD?@V%Qkj!5j*s+*Zz5BNJB>gcckxCjR0=gU zYWd(fhY-?%+aS~~$|sFnC+_g^gmW^$qm!K;GyP5!w~?TY8qbK!ULhP^2NjE5h8SwM z&Vr4{@!z=vBVnbpc})d^EmKTmYa#2tWSJ`7#BU}g`*pdWel6;GiE~b*roghPp{B@w zPU$$zvaMeuUj3NXOr9}G%?esDt759iH>+lCTPLuJoSmX)S1>)JcO?3O$8q~`6s-*p z)E!DMMjs8_waioQw&+VS&xFj(n;Urtp?R0L4wjZxv@bt>=duLdHgH+Cy_71>I8Jw) z7${2jSopSTc-?po1KoF9AFlJkGADvI7p*DTH?1+51m#c3aL<&T+*&`Oq1Gmit?Zh7 zKTUsg!LO{vFvbx7raoOX7-QY#`IF1dmVTq?LHIpehZy7ChQK}Oe2ISc_SM+!GOXil zL5(bRt2!+RxJ&WrxxP`$d#^0}IG^)rHu%x@*`DA1w{0K0?3fqBLqR+fDch7?Hzz3T zkvz+!IU_u~VYlyUB~v&urbkDc39W;L9%~654CIVbcF&hZYGMw%77}tz8_$K2HG%6! znp!WPdjc<_tWT<=%9`B@NcyDOiY*S;&>j5eMx zNXaa>&V+))(S)p!MvW;73!Sp(5j&IjsO3a|VySu!I^L9(kHB}bP3|+@1Q!00b`!n2 z@_o-(sk;_*AF~r!0M985ox@r`;!Dhv;T|^E4vWrt7MvQ}jP2I*rL@OMz4nS7xo1U$ zx$wkEIPT%1x1Pye%Q;m=wP(W`#z%0L>dAM$YjRY|kd+!25kF*YwqztsRsIS0**P{G znU{v^w8km&dLOrdlB|Xfr-?NK4-GW?NTq{0CVE15-l3mC(3+NX98W|&Ib(CQNbt6? zp19FgTWP1h8%gG==Lr%L=;#~tw5zdHrd$-+4?)<}QG zZ)0Gy@bERXn*JdEDRf(WdNBK7qlo&8V@6<@qZZvp)2EArgOWP@Q$|<)j1-vvvskXK zr^N%f9a?FPj?W8<6bN(%vFTi1v|q0H4e{h~i>zbQ=xpZ3_3GCk;YN;?rWF{KdXC%} zcRZAl^O6-8-kkRUD-ygTj|tUT@V=}JHtdmbK@A)%Tju`f{lYOpn-yI;#bA^ z>Y7cNs9_!H$si?-(d)g!Py4_^`W_~^ULqN*IxSY?KG4-uDXq}$PaD_96+LqF=zU+q zPn@WAF4=DMA4Vd_SoN}NTEm2WX?lzR%A>mQRq!4rhr!Mg)!47 zNTwdl%CYToM1Ki^v^5`HO}@>EO>UWLf{V?wD9byV_vJ-Je(OG*vUWu_Pkw+_k_?aV zq+_0!;{QRn5hRVanxwayVJzP zOtzPLZA;mDT`?Ht$mjf?cO^fOSvgq@<{nSCIwznP%7d8{J==kvi!(Gi$vQwD7)@<8_60 zm|H13cd6`*##uiMGE{a0;F8=+nE1^vCDYZ=et(dvvhH^uOTg9YF)TuBRIAYQ@%<07 zv#&9!nM6nQRfL!BB5AgLfwQ4by>C{Z+WYG!%hL{w z`0d;Q>P}SrAMd*u)>{7RjVIa-;^K{d^&CMx?BQt zrg_Lq{fbEOS-}LKlFHJ$;PDq#rei*uycO10I{97X-fhO>#9B|x?aHc`rkOcNDdz%I z>XS>1NcVFxLsdRXP@-CXuWV*__?VuP-yc%KoW`(3$c>peVM#*tO21UKXOu;%wlL*! zBo)rFMbA5ou+&ZV+HOF#lB|D}TYn;9=vx%iD?b--~i&>Lo_}!``|DfBWFJunq-0{&S zc1eLUyCOlE)&rr(Z^qG|ruf!qugif*YTxdTdk+v`Xnmk^#5-*F&+nn5|51ZFZZ^&` zMwLv%ku0tbK~nTh?or{P7RZAgk4oo1Ln76-FJoht{Uo8DCSi-68^3>PHN|{NgDXXh zt)!dej>2G?fP9qyG;lJ2;V~_^Le-9+iZQb-e<8q_VOT;|;IW1<(>JND*VZq5^V3yk z#+Qquu$&T)fm=N_WE75Qt4VZG%1lC{_^eM~=2jj1%7+v8eML$qv(KJIjUK0ZU=!)_ z^XY@Oh@Dreysg1M4C2_R_@&IMO>zSWgAFf5!#NAo& zJdp!a-NL45ydB8s&Fiu;{a#z^bJ@cVU25}K>Cc6JuGQ%uDZrEucy%QzeEkS z0@^UU&7$Iv?jG96Py+~IRrq5^9vPV@ z+ep^c?*ylB#g_?`cWjs)7|h2s8uI&OM-Jl*renae%eFz+VYR-}X{ zJS6*J?H+)kc@MMXVQoM(&IS3K1*sr$Uy7bYHzKjsnNYf)Ozx3r z1+JN$QZ5ave)|g7@X*%O=Vm$-S5?+lBEED;dl7=oIz*xCl zZiek8nqxX$u^`|D37@cvw?>sgbna_uT+$|3u3UV&!=$>`;0C^2!~m*Q+1JZB)#V@u}U+ZVv>6l^q1dvDb2!S$&nKYgjB&q1AffVAS2 z9gR?SV;$H5<_zV~S{b+=yHXQHs}_mNOWHCx?n}{KDapyJ5I!TapQa(sH`Cw)yvVZq zCGiYdqSV}&=bn6B7havo4DQwh{eg22SP&5MIAlv4W2sYQ*M zYLYm4d>Tzc-c*&BE#ZQSwqwAsW$~(Q%{pj#yD171bsI}=b2f)IaWWL9h$N=~h@%1) z*pPfTZK$d%@B|R6wuE;B8^_{wRY#r?KX>M3>3i41ek%-q*KQ~v=U7!Aha*sttX48k z&cR{+&4T`#5!^zSRgh%-td(K!-3>V4YXb$z80ehDCnwJN21V7&`=bU#+n5p!g+gS3 zQ2l~)duFg>qf=}5#euQth>CuTmdB2~ol(iLR~^6Fr=2VB>QzSQroUmcA5F=0j1_t` zsRmK0-ce63Rj~IlWO^pa!+|1M^Rg3z#k=~MSnAi3k)ZbxnVt!9kZbsQ_Kj(Sh75t~ zq}R+$(NqC{%l5KeF0Oa`H_iG(kuId(0y()2HU*6ZjoZ~3lZbEfWil@w$~prLscb#G zUR%@@fNgE|%o9zn_gjKrhp)H~v6kl1xmMy zLd38>g}yAQlY{DTc1^_7Nf>`TBbbv4!}n3BUUWWSJd4S+cdBO0l36G^$jnZ1!(_e@ zmo_?}oBG+rXr+B57pz5g?Gl|E>s{Eq-G*oP!mrrlbwt;|3`W-4$p}iFuvD;p{9DIq z!%*|xhIHeCyub(b@}FxJOGXq;2R=QUku5Bj=Y>*WVMbfLSbSmFr#xnkKB#FsT}CZF zPbhE^laaX;6Sq|oJ;s4wM%B$-rE+r$`oMe?jdZM>rSRiQ9cihQK_^X~U|{A!W6Je4 z2klL0G8VUd1L;6t4jgdh!XI=a>wl>&{qo0JV76VH%XaPC6}#Fp zAg49$ta3NV7>FOWHr**8WT?B@gE|?e?woLziKA!!o|QmppIl^=b5Rf_CrAxh>5(9^563MkR z3NucLIggP#5HDb%XvhyeTC}ZRnk6RO2p?2=9$9gBw`9sxBDQWcx1LJ>1^<9ZBb=H= z5+bM8CuRtIlg8GDyH~59knxouihYrUpE#nQ-Dy3+tZc2$T;#gr0kY}j1Z^rtppU+Y z9@~pjqGSJ{ky2NZ-MqJL?{(iMsbMQvH6#cJ0tP)-GUV#`wHSb%<@ZU!JFiE@&?xseGI%nJfYnCGyWRlc}{4~QU9?)J65&m<~n5iVQ;#|jmA z#x}V|=t;US)%!O*Q_1kye_Oh=#!oXlfoyf!rOu|(t;yMD0_40ZkBV6-`C%ivotw)G zy3YGXJKH}K1Nhcx^0jTT?ec2HFtSO&;^2VW2;Et!kk~f!N2(_1;vytfuv?Rsd1=dT z&1h$YsI@j*hyY31%-uZoi>}9IkVt9sp$7UTX^V)%f(V?Crs?*Q>fq)`@&KK7;BrhW zdWA==-|*Uh0jf^?Q?;79EvER^{XnoxOBHy!R;Eo=Ui}l+pInHn%zoU>T&pN-^ArLev0VI z*SMj$n{TX?pw@aw|8>Pv7aa`U)HeN`PaUBnV(r;e?b{bOd`&)?Y4m$jTn5mU3{xn} zL;36m!|MR`h_;tiixqbsY1W%mcfvnr9~iz<<9(DPG_}aG3VVxM8(PAOQuTn~Fyyj# z!uqxR*`xv|d2z9OL_Jk$uMvubI`t3g0S6g5eu6k`GMu7i6+A3V6Iar(t2&AhHw_U+ z!t7;G-ukhi3f{4RBY|8-hLi2<_la@1bgYvu(;sJ765Bv|nU7J`Vc9QbkZs1nq!}H# zqgXdOX@)RAJ$2tQWt6%|=qi4j+i4?3M^*!|@MZvP%x6Pv?0!ys7~hzl^&T|0BEDcv zPlb4ojuZ%$l2VbElKR)HbHoetbgx)3xsT$My+-Nv6MRigvxEayX;N#DYF-@3AG=tt?wBGTDWIj!@si%#UnkB zb&L8IEYm6>`T_ba{W46doSCI(yT=sWAm&HxUd<3J{Q>R+Q697W__H2blj`w4M~V-* zIfTjtA;g+_Z)n$Ry4@o_=vCHiiCsMi5VB?LbxxHE1!Fld&`7=@W_$;xl`MM^9>#DW zD|QnQ1(M)M(P!jxe3p$&9Jh{fAF#TddNqJ0z(R^9Y-Dq7ii)|9{5I9rhkDUv9rYN5 zqOCV%RD$v$D}Po`?+512B05Lq>(o{Z{X+nXaG%%3Mf4VvEBCirC7~QB)8%h1qg| z&0r=F4mVqS#8w9YAPRD`2b)?$oM=oS7En7ex}%m3IvS{%7@ansBA24Q6vPrL=ivxZ z_fXO>^{_S-GNS`M#};)HMgZ7CoWL}0wl;QfVK*_l-?+kv^Iv98I-1`hPS#>{I*KYZ zQZPpd4KD{T2N%1H8`K3z_Z*u>)X~gbSWWuHpAd*EF*-{pCwpN|PFGh~4p$xyn4<+J zw~&w!Cl`?B4lfJK#<-E(nl66Z#+TfNLOjggDh8aG0~B zDMZEvV&_EvcL-T|MU}r0ewAbawYC3U6oS0}Xw1y?uQ+>WN1NXpyb)<@sIC-xEPJ_ZR+uME|Sy-@%9|MMYt0n5pxxM&+f&=zirZYz8xh znhF0t6#(*?nDGL+*v+_ryzIO{9szbCem)*{GcZ_4h>wd0$i)Tz8>V0M09elvDnhyVh@On{%AOMq8UNI=j8$Zux)Hwa}%C_^@^Y~Y3Gwo?1A)AJ+yX!#*c`(18|qg-2urBQi_rl& zxc+TXu>m`o!yIi9Qis}^!Cc}0c49eE$y8f;hqv zlKX|q&Beh3{OvI_6@G!h1S6yawFO&1IPL8$emj13j4+}c1hwE_N<|?5wj-($mU4uE zonVd{Fqn-P-LGtEenI}_RzwUaGq4j_8teo?w1(hbm`gyIOGty8SD24qn2Vc@3n zw|JNt)ZG3575!`Y(1`xg>2gpwqJ8(@ra#7%I>h0Rt3NJnpuYzb4bAUiAq+PCqXanE z1!DF)PXyKlaeodpCjfBY%ff7zk`gBZ935u!0gsEFG{kc*wyR6vkjh}%Sf-HgYS z8^~>D0_NxWLkxeR!(rx5u3$%qgav{}1Xl=w{^p8?`OiLN`Oj=zEg`=;=$Bl%1la#Z z86D@J#d7|dG5%GpDChshhv@HszfCcS`~I*YrY^)x$obb)_$Ob8T>m#efA+)wW)n0t z|1|Pn@%s;5|IqbcG4Njn|D&#d==!f1_^*QhQP=-By0HJfn1a|Lo`75tOC^VZv1Y_F z3*F?EtTf>M*NTgW>CGA9fMqYI3kLvjdw%_p64-Dl5Jn6qc|{qF9SkfSL8KVy^b!Do z86ht%p<%glkm_ZxF-_LzbGfp-ZyvvFQ^Re8Ja6+HXHW&%58GTg&`RBkC@qYHxxl%W zC}@JjGNjrx#HCz`Kvu3lZceG!zZ(-xLasv19REWxvp+dGT6|1&(7tQjh`GSEGwdFd zvA2XFFp$R0{2~iJ=5-`ACbTUyc9uyTRim+n&Os;Oc7^Rr@dPk!iN=3xPtq4&BBysA z+7nODZE{HEe{O*_okeenSp7dR@C0D8Vx6VJ;&07*i$~K5ld!za`hAYoJywJjk389> zm&KA+S7V=}X^?qfU*5jkNNECmzqqJzJu;NcVM}ArP?CL7n1Gc6B_blqR(m*X&?=yi zKOF*}q!mqDl{k!uT*JnfL9IjWESXe%mh1z9Kvuhrx%5@_qx%CUo1(Y2%%`yQ`YcjX zL|i#0iDc|{#O%^%K z8o0jIxv}I89y-Wtt4IkBMz`UosCfoo^}6JSt+d|pX95m7=E5#FFICOlZRAu`iPEFs z3h9mZRl%QfcE-(L;m1h(JyR#w-AYU5vnIh4`;O1f&i>4(Jv}v*yxwm4rH6;G&=@=2 z#7fYr3pvr|E(+Hap_To(;QQcqo>7U#mjikl>o^QLYM&K97&oqy#JxJL(yQ2?s}8VT ztgkj3Ae^Z*c;(>0EilWG_w9OY@?7t>?t!>b9$YQ}BNXE&;)^NJv?Jt%eF+cwOp-is zHAMHF2d>-f#6l7gbb9KD`@}o#HPaUN-Q^`=dBY>Vb5dH5T1g;rW3m#nfhwiN1R?i* zGmiYr#`c0L!mu^BpAS83-iGFWy16==Z*-tvvnN%w6E2i}S?R-x563uewMX^M&84f= zW5>Xy1kiY$JVTXez8i^w?P2t^1jxnp#6imDI($HY)O6md^@ma*H0gx!eTzdThru75 zPjgg=uJhjG-^_WB0BHKV1@HA`XHuJ%gs%DdHN|9cC8Hm4RnSQ?L8AF^BwYraDd=pRXX6Tk?pZCCbG$|^!&YVN9f+X*A=-3|PKzh*Ae(5iA zllTq3x%gtUia#Q^BYY|hH`;f;e4rb$nXB>>f^SuMoLiM^v9-7yND93lCj_dG`{V(R zE-vv2H8yOGB>j7(Cv3HDV42-5w_?ckPeX?+9TiCrTZ0@xDT@BnQ?Pf15c&d3jM`p{ zC(PA|T{=_jwl*YGdFcu3{$LbQDm)RF{l;Ru?NNh3`p*$MOD&sE^r)8n2a`jECw+@G zO_?*~cE!|H($1M3Qu0&WQCDEJ_O)ampFHYN3GVmo29V;Qn^cqfGtli41{a~mTWkTr z2AfqvG$awUKBMn2b3;$>rDL+wUE`4*x%{^aT(JZ^FdN(ee%~?7KVPOq6gND+-Ir|T zq@G#UwZZyRanI^;$jN~{W`jg%XH~RmHbdu8SHz?m2ZFK_$CEbVbp)fvnQ(tTcgPv&z*;?ggr6kubL^7O@I=yI zx{tmAl~ z>>j5mUhA^LBB$#)lggb3>b;*2{U_E1>SdlUD9zXS@fx)iOY*a2)U=_LW^f;GnIRVC~*lNJyOjDR*!y}OQBUIf?8SS78C^e`y&@BqyWEQDrYh} zo$ha=aUAXnaK;j0M@iFWyaJx1iS!(x}C|XQG^kX_Q+8I>uoam@0NwX^9WFW z)PyJ7$9s;~_eVX+%gse@SbRHgQ&?Gv8_^3C#+sLDKpGz(_w87e)hqRD;(m& zCWP9P>FTTE<4c3(Y;E}|o;-O1m^*OUceySGWLK|9TlH!H>TTw`(}mzM3}MM2>5a(C z34l|(qyMP3(iUES2o%*BHe`nNp+YkP|iEbT@+zXzlM_E*}{ zzJ4`vgu^9NtKQFx)Z3{PO}@3d=^4=7u=57g&HK*o^_qXEb~(@kwEEophJLWNK}zN} z?JMq8YHy427aNjm7mHS5mWDtWKUj=C1%a}P^C-5115C3BSP>g~%gxTDZ~NF*_xwYJ zd4e|L(yHyeeP83=Qrb$Ob0kHCPe#-PvQ;)D(Cop*QE^`3V~09DMO|Go2n6zYH_lvVVD(~sD2h6|9}7L8 zc4}5#Q?vKmWKl^;3HWqlAX|La`keQE2i9|&)E-Bn2`E&|7^cp;eH2}JH7zsYD%iU^ z88N%wy?yq1e7v(ny(m<*Qe^9o}M3^wV=6{P&}!89KbJp=^c8xY1-q-aYW+Lqb=TA6#b!NQF#LAffanPIKRVl zZ;VjbJ?hYl2`kfvY4;cp+GLbKd< Date: Mon, 29 Jul 2024 10:38:44 +0200 Subject: [PATCH 02/47] Fix normal orders --- Controller/Checkout/Exchange.php | 3 +- Model/PayPaymentProcessFastCheckout.php | 106 ++++++++++++------------ 2 files changed, 56 insertions(+), 53 deletions(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index 2a59d184..0556b3a4 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -135,6 +135,7 @@ private function getPayLoad($_request) $paymentProfile = $request->payment_profile_id ?? null; $payOrderId = $request->order_id ?? null; $orderId = $request->extra1 ?? null; + $data = null; } else { # TGU if ($_request->isGet() || !$this->isSignExchange()) { @@ -188,7 +189,7 @@ public function execute() $params = $this->getPayLoad($this->getRequest()); $action = !empty($params['action']) ? strtolower($params['action']) : ''; $payOrderId = isset($params['payOrderId']) ? $params['payOrderId'] : null; - $orderEntityId = isset($params['extra3']) ? $params['extra3'] : null; + $orderEntityId = isset($params['orderId']) ? $params['orderId'] : null; $paymentProfileId = isset($params['paymentProfile']) ? $params['paymentProfile'] : null; if ($action == 'pending') { diff --git a/Model/PayPaymentProcessFastCheckout.php b/Model/PayPaymentProcessFastCheckout.php index 52fbb0c8..3839d1d3 100644 --- a/Model/PayPaymentProcessFastCheckout.php +++ b/Model/PayPaymentProcessFastCheckout.php @@ -11,13 +11,15 @@ class PayPaymentProcessFastCheckout protected $_formkey; protected $quote; protected $quoteManagement; - protected $customerFactory; + protected $customerFactory; protected $customerRepository; - protected $orderService; - protected $orderFactory; - protected $paynlConfig; - protected $payPayment; - + protected $remoteAddress; + protected $resource; + protected $orderService; + protected $orderFactory; + protected $paynlConfig; + protected $payPayment; + public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Framework\View\Result\PageFactory $pageFactory, @@ -29,10 +31,10 @@ public function __construct( \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, \Magento\Framework\App\ResourceConnection $resource, - \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress, - \Magento\Sales\Model\OrderFactory $orderFactory, + \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress, + \Magento\Sales\Model\OrderFactory $orderFactory, \Paynl\Payment\Model\Config $paynlConfig, - \Paynl\Payment\Model\PayPayment $payPayment, + \Paynl\Payment\Model\PayPayment $payPayment ) { $this->_pageFactory = $pageFactory; $this->_storeManager = $storeManager; @@ -48,7 +50,7 @@ public function __construct( $this->paynlConfig = $paynlConfig; $this->payPayment = $payPayment; } - + /** * @param array $params * @return boolean @@ -57,9 +59,9 @@ public function processFastCheckout($params) { $checkoutData = $params['checkoutData']; - $customerData = $checkoutData['customer']; - $billingAddressData = $checkoutData['billingAddress']; - $shippingAddressData = $checkoutData['shippingAddress']; + $customerData = $checkoutData['customer']; + $billingAddressData = $checkoutData['billingAddress']; + $shippingAddressData = $checkoutData['shippingAddress']; $payOrderId = $params['payOrderId']; @@ -67,9 +69,9 @@ public function processFastCheckout($params) $tableName = $this->resource->getTableName('pay_fast_checkout'); $select = $connection->select()->from([$tableName])->where('payOrderId = ?', $payOrderId); - $result = $connection->fetchAll($select); - - if($result[0]['orderId'] == null) { + $result = $connection->fetchAll($select); + + if ($result[0]['orderId'] == null) { $products = json_decode($result[0]['products']); $store = $this->_storeManager->getStore($result[0]['storeId']); @@ -77,31 +79,31 @@ public function processFastCheckout($params) $this->paynlConfig->setStore($store); - $quote=$this->quote->create(); - $quote->setStore($store); + $quote = $this->quote->create(); + $quote->setStore($store); - $email = $customerData['email']; + $email = $customerData['email']; $customer = $this->customerFactory->create() - ->setWebsiteId($websiteId) - ->loadByEmail($email); + ->setWebsiteId($websiteId) + ->loadByEmail($email); - if(!$customer->getEntityId()){ + if (!$customer->getEntityId()) { $customer->setWebsiteId($websiteId) - ->setStore($store) - ->setFirstname($customerData['firstName']) - ->setLastname($customerData['lastName']) - ->setEmail($email) - ->setPassword($email); + ->setStore($store) + ->setFirstname($customerData['firstName']) + ->setLastname($customerData['lastName']) + ->setEmail($email) + ->setPassword($email); $customer->save(); } - $customer= $this->customerRepository->getById($customer->getEntityId()); + $customer = $this->customerRepository->getById($customer->getEntityId()); $quote->setCurrency(); - $quote->assignCustomer($customer); + $quote->assignCustomer($customer); $quote->setSendConfirmation(1); - - foreach($products as $productArr){ + + foreach ($products as $productArr) { $product = $this->_product->load($productArr->id); $product->setPrice($product->getPrice()); $quote->addProduct($product, intval($productArr->quantity)); @@ -114,11 +116,11 @@ public function processFastCheckout($params) 'middlename' => '', 'lastname' => $customerData['lastName'], 'suffix' => '', - 'company' => $customerData['company'] ?? '', + 'company' => $customerData['company'] ?? '', 'street' => array( - '0' => $billingAddressData['streetName'], - '1' => $billingAddressData['streetNumber'] . $billingAddressData['streetNumberAddition'] - ), + '0' => $billingAddressData['streetName'], + '1' => $billingAddressData['streetNumber'] . $billingAddressData['streetNumberAddition'], + ), 'city' => $billingAddressData['city'], 'country_id' => $billingAddressData['countryCode'], 'region' => $billingAddressData['regionCode'] ?? '', @@ -126,9 +128,9 @@ public function processFastCheckout($params) 'telephone' => $customerData['phone'], 'fax' => '', 'vat_id' => '', - 'save_in_address_book' => 0 - )); - + 'save_in_address_book' => 0, + )); + $shippingAddress = $quote->getShippingAddress()->addData(array( 'customer_address_id' => '', 'prefix' => '', @@ -136,11 +138,11 @@ public function processFastCheckout($params) 'middlename' => '', 'lastname' => $customerData['lastName'], 'suffix' => '', - 'company' => $customerData['company'] ?? '', + 'company' => $customerData['company'] ?? '', 'street' => array( - '0' => $shippingAddressData['streetName'], - '1' => $shippingAddressData['streetNumber'] . $shippingAddressData['streetNumberAddition'] - ), + '0' => $shippingAddressData['streetName'], + '1' => $shippingAddressData['streetNumber'] . $shippingAddressData['streetNumberAddition'], + ), 'city' => $shippingAddressData['city'], 'country_id' => $shippingAddressData['countryCode'], 'region' => $shippingAddressData['regionCode'] ?? '', @@ -148,17 +150,17 @@ public function processFastCheckout($params) 'telephone' => $customerData['phone'], 'fax' => '', 'vat_id' => '', - 'save_in_address_book' => 0 - )); + 'save_in_address_book' => 0, + )); $shippingAddress->setCollectShippingRates(true) - ->collectShippingRates() - ->setShippingMethod($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')); - $quote->setPaymentMethod('paynl_payment_ideal'); + ->collectShippingRates() + ->setShippingMethod($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')); + $quote->setPaymentMethod('paynl_payment_ideal'); $quote->setInventoryProcessed(false); - $quote->save(); - $quote->getPayment()->importData(array('method' => 'paynl_payment_ideal')); - + $quote->save(); + $quote->getPayment()->importData(array('method' => 'paynl_payment_ideal')); + $quote->collectTotals()->save(); $service = $this->quoteManagement->submit($quote); @@ -175,9 +177,9 @@ public function processFastCheckout($params) ); } else { $order = $this->orderFactory->create()->loadByIncrementId($result[0]['orderId']); - } + } return $order; } - + } From 157c386b65be78a093c72a748e915b485ae96bc7 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:52:35 +0200 Subject: [PATCH 03/47] Rename quick to fast checkout --- .../{QuickCheckout.php => FastCheckout.php} | 7 +- Controller/Checkout/Exchange.php | 11 +- .../Checkout/FastCheckoutCreateOrder.php | 161 ------------------ Controller/Checkout/FastCheckoutStart.php | 28 +-- Model/PayPaymentCreateFastCheckout.php | 15 +- .../{QuickCheckout.php => FastCheckout.php} | 7 +- view/frontend/layout/checkout_cart_index.xml | 4 +- .../templates/pay_fast_checkout_cart.phtml | 14 ++ .../templates/pay_quick_checkout_cart.phtml | 14 -- ...yQuickCheckout.css => payFastCheckout.css} | 12 +- .../frontend/web/images/fastCheckoutIdeal.png | Bin 0 -> 11866 bytes .../web/images/quickCheckoutIdeal.png | Bin 12107 -> 0 bytes 12 files changed, 54 insertions(+), 219 deletions(-) rename Block/Checkout/{QuickCheckout.php => FastCheckout.php} (83%) delete mode 100644 Controller/Checkout/FastCheckoutCreateOrder.php rename ViewModel/{QuickCheckout.php => FastCheckout.php} (82%) create mode 100644 view/frontend/templates/pay_fast_checkout_cart.phtml delete mode 100644 view/frontend/templates/pay_quick_checkout_cart.phtml rename view/frontend/web/css/{payQuickCheckout.css => payFastCheckout.css} (58%) create mode 100644 view/frontend/web/images/fastCheckoutIdeal.png delete mode 100644 view/frontend/web/images/quickCheckoutIdeal.png diff --git a/Block/Checkout/QuickCheckout.php b/Block/Checkout/FastCheckout.php similarity index 83% rename from Block/Checkout/QuickCheckout.php rename to Block/Checkout/FastCheckout.php index b3f4ff7a..6570500f 100644 --- a/Block/Checkout/QuickCheckout.php +++ b/Block/Checkout/FastCheckout.php @@ -4,12 +4,11 @@ use Magento\Catalog\Block\Product\Context; use Magento\Catalog\Block\Product\ProductList\Item\Block; -use Magento\Framework\App\ActionInterface; use Magento\Framework\Url\Helper\Data as UrlHelper; use Magento\Framework\View\Page\Config; use Magento\Store\Model\Store; -class QuickCheckout extends Block +class FastCheckout extends Block { /** * @var UrlHelper @@ -30,8 +29,8 @@ public function __construct( array $data = [] ) { $this->urlHelper = $urlHelper; - $page->addPageAsset('Paynl_Payment::css/payQuickCheckout.css'); + $page->addPageAsset('Paynl_Payment::css/payFastCheckout.css'); parent::__construct($context, $data); } -} \ No newline at end of file +} diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index 0556b3a4..e701d9a4 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -2,8 +2,8 @@ namespace Paynl\Payment\Controller\Checkout; -use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; +use Magento\Framework\App\Request\InvalidRequestException; use Magento\Sales\Model\Order; use Magento\Sales\Model\OrderRepository; use Paynl\Payment\Controller\CsrfAwareActionInterface; @@ -97,7 +97,6 @@ public function __construct( parent::__construct($context); } - /** * @return array|false */ @@ -168,7 +167,7 @@ private function getPayLoad($_request) 'internalStateId' => $internalStateId ?? null, 'internalStateName' => $internalStateName ?? null, 'checkoutData' => $checkoutData ?? null, - 'orgData' => $data + 'orgData' => $data, ]; } @@ -179,7 +178,7 @@ private function getPayLoad($_request) private function isFastCheckout($params) { return $params['orderId'] == 'fastcheckout' && !empty($params['checkoutData'] ?? ''); - } + } /** * @return \Magento\Framework\Controller\Result\Raw @@ -200,8 +199,8 @@ public function execute() $checkoutData = $params['checkoutData']; - $fcOrder = $this->payPaymentProcessFastCheckout->processFastCheckout($params); - + $fcOrder = $this->payPaymentProcessFastCheckout->processFastCheckout($params); + $this->config->setStore($fcOrder->getStore()); try { diff --git a/Controller/Checkout/FastCheckoutCreateOrder.php b/Controller/Checkout/FastCheckoutCreateOrder.php deleted file mode 100644 index c7799267..00000000 --- a/Controller/Checkout/FastCheckoutCreateOrder.php +++ /dev/null @@ -1,161 +0,0 @@ -_pageFactory = $pageFactory; - $this->_storeManager = $storeManager; - $this->_product = $product; - $this->_formkey = $formkey; - $this->quote = $quote; - $this->quoteManagement = $quoteManagement; - $this->customerFactory = $customerFactory; - $this->customerRepository = $customerRepository; - $this->remoteAddress = $remoteAddress; - $this->resource = $resource; - - return parent::__construct($context); - } - - public function execute() - { - - $data = json_decode('{"id":"6693a2f4-5223-8992-1a5f-526160012372","uuid":"a1bf5261-6001-2372-5200-1705096a2372","links":{"void":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/void","abort":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/abort","debug":"https:\/\/checkout.payments.nl\/to\/checkout\/6693a2f4-5223-8992-1a5f-526160012372\/with\/debugging\/6693a2f4522389921a5f526160012372","status":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/status","approve":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/approve","capture":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/capture","decline":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/decline","checkout":"https:\/\/checkout.payments.nl\/to\/return\/6693a2f4-5223-8992-1a5f-526160012372","redirect":"https:\/\/checkout.payments.nl\/to\/return\/6693a2f4-5223-8992-1a5f-526160012372","captureAmount":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/capture\/amount","captureProducts":"https:\/\/connect.payments.nl\/v1\/orders\/6693a2f4-5223-8992-1a5f-526160012372\/capture\/products"},"amount":{"value":"10","currency":"EUR"},"status":{"code":"100","action":"PAID"},"orderId":"52001705096X2372","receipt":"","payments":[{"id":"6693a310-5223-88e3-2b77-052001705096","amount":{"value":"10","currency":"EUR"},"status":{"code":"100","action":"PAID"},"ipAddress":"","customerId":"NL93INGB0006700949","customerKey":"fd36c8fb62a554e1bd7be3a7fd7485a6","customerName":"Hr W M Jonker","customerType":"","secureStatus":"1","supplierData":{"contactDetails":{"email":"wouterjonker@hotmail.com","lastName":"Jonker","firstName":"Wouter","phoneNumber":" 31652457521"},"invoiceAddress":{"city":"Sommelsdijk","street":"Kortewegje","addition":"","lastName":"Jonker","firstName":"Wouter","postalCode":"3245XM","companyName":"","countryName":"Netherlands","houseNumber":"19"},"shippingAddress":{"city":"Sommelsdijk","street":"Kortewegje","addition":"","lastName":"Jonker","firstName":"Wouter","postalCode":"3245XM","companyName":"","countryName":"Netherlands","houseNumber":"19"}},"paymentMethod":{"id":"10","input":{"issuerId":""}},"capturedAmount":{"value":"10","currency":"EUR"},"currencyAmount":{"value":"10","currency":"EUR"},"authorizedAmount":{"value":"0","currency":"EUR"},"paymentVerificationMethod":"21"}],"createdAt":"2024-07-14T10:05:40 00:00","createdBy":"AT-0045-3283","expiresAt":"2024-07-21T10:05:40 00:00","reference":"","serviceId":"SL-5261-6001","modifiedAt":"2024-07-14T12:07:18 02:00","modifiedBy":"","completedAt":"2024-07-14T12:07:18 02:00","customerKey":"fd36c8fb62a554e1bd7be3a7fd7485a6","description":"","integration":{"test":""},"checkoutData":{"customer":{"email":"wouterjonker@hotmail.com","phone":" 31652457521","gender":"","locale":"","company":"","lastname":"Jonker","firstname":"Wouter","ipAddress":"","reference":"NL93INGB0006700949","dateOfBirth":""},"billingAddress":{"city":"Sommelsdijk","zipCode":"3245XM","lastName":"Jonker","firstName":"Wouter","regionCode":"","streetName":"Kortewegje","countryCode":"NL","streetNumber":"19","streetNumberAddition":""},"shippingAddress":{"city":"Sommelsdijk","zipCode":"3245XM","lastName":"Jonker","firstName":"Wouter","regionCode":"","streetName":"Kortewegje","countryCode":"NL","streetNumber":"19","streetNumberAddition":""}},"capturedAmount":{"value":"10","currency":"EUR"},"authorizedAmount":{"value":"0","currency":"EUR"},"manualTransferCode":"1000 0520 0170 5096"}'); - - $customerData = $data->checkoutData->customer; - $billingAddressData = $data->checkoutData->billingAddress; - $shippingAddressData = $data->checkoutData->shippingAddress; - - $payOrderId = '2531784984X99580'; - - $connection = $this->resource->getConnection(); - $tableName = $this->resource->getTableName('pay_fast_checkout'); - - $select = $connection->select()->from([$tableName])->where('payOrderId = ?', $payOrderId); - $result = $connection->fetchAll($select); - - $products = json_decode($result[0]['products']); - - $productids=array(1); - $store = $this->_storeManager->getStore(); - $websiteId = $this->_storeManager->getStore()->getWebsiteId(); - - $quote=$this->quote->create(); - $quote->setStore($store); - - $email = $customerData->email; - $customer = $this->customerFactory->create() - ->setWebsiteId($websiteId) - ->loadByEmail($email); - - if(!$customer->getEntityId()){ - $customer->setWebsiteId($websiteId) - ->setStore($store) - ->setFirstname($customerData->firstname) - ->setLastname($customerData->lastname) - ->setEmail($email) - ->setPassword($email); - $customer->save(); - } - - $customer= $this->customerRepository->getById($customer->getEntityId()); - $quote->setCurrency(); - - $quote->assignCustomer($customer); - - $quote->setSendConfirmation(1); - foreach($products as $productArr){ - $product = $this->_product->load($productArr->id); - $quote->addProduct($product, intval(array('qty' => $productArr->qty))); - } - - $billingAddress = $quote->getBillingAddress()->addData(array( - 'customer_address_id' => '', - 'prefix' => '', - 'firstname' => $customerData->firstname, - 'middlename' => '', - 'lastname' => $customerData->lastname, - 'suffix' => '', - 'company' => $customerData->company, - 'street' => array( - '0' => $billingAddressData->streetName, - '1' => $billingAddressData->streetNumber . $billingAddressData->streetNumberAddition - ), - 'city' => $billingAddressData->city, - 'country_id' => $billingAddressData->countryCode, - 'region' => $billingAddressData->regionCode, - 'postcode' => $billingAddressData->zipCode, - 'telephone' => $customerData->phone, - 'fax' => '', - 'vat_id' => '', - 'save_in_address_book' => 1 - )); - - $shippingAddress = $quote->getShippingAddress()->addData(array( - 'customer_address_id' => '', - 'prefix' => '', - 'firstname' => $customerData->firstname, - 'middlename' => '', - 'lastname' => $customerData->lastname, - 'suffix' => '', - 'company' => $customerData->company, - 'street' => array( - '0' => $shippingAddressData->streetName, - '1' => $shippingAddressData->streetNumber . $shippingAddressData->streetNumberAddition - ), - 'city' => $shippingAddressData->city, - 'country_id' => $shippingAddressData->countryCode, - 'region' => $shippingAddressData->regionCode, - 'postcode' => $shippingAddressData->zipCode, - 'telephone' => $customerData->phone, - 'fax' => '', - 'vat_id' => '', - 'save_in_address_book' => 1 - )); - - $shippingAddress->setCollectShippingRates(true) - ->collectShippingRates() - ->setShippingMethod('flatrate_flatrate') - ->setPaymentMethod('paynl_payment_ideal'); - $quote->setPaymentMethod('paynl_payment_ideal'); - $quote->setInventoryProcessed(false); - $quote->save(); - - $quote->getPayment()->importData(array('method' => 'paynl_payment_ideal')); - - - $quote->collectTotals()->save(); - - $service = $this->quoteManagement->submit($quote); - $increment_id = $service->getRealOrderId(); - - $quote = $customer = $service = null; - - echo __('Order created successfully with order id '.$increment_id); - } -} diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index 8c653d77..b5448163 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -2,10 +2,10 @@ namespace Paynl\Payment\Controller\Checkout; -use Paynl\Payment\Model\PayPaymentCreateFastCheckout; use Magento\Payment\Helper\Data as PaymentHelper; use Magento\Store\Model\StoreManagerInterface; use Paynl\Payment\Helper\PayHelper; +use Paynl\Payment\Model\PayPaymentCreateFastCheckout; class FastCheckoutStart extends \Magento\Framework\App\Action\Action { @@ -69,9 +69,9 @@ private function getProducts() { $products = $this->cart->getItems(); $productArr = []; - - foreach ($products as $key => $product) { - if($product->getPrice() > 0){ + + foreach ($products as $key => $product) { + if ($product->getPrice() > 0) { $productArr[] = [ 'id' => $product->getProductId(), 'quantity' => $product->getQty(), @@ -79,11 +79,11 @@ private function getProducts() 'price' => $product->getPrice() * 100, 'currecny' => $this->storeManager->getStore()->getCurrentCurrencyCode(), 'type' => 'product', - 'vatPercentage' => ($product->getPriceInclTax() - $product->getBasePrice()) / $product->getBasePrice() * 100 + 'vatPercentage' => ($product->getPriceInclTax() - $product->getBasePrice()) / $product->getBasePrice() * 100, ]; } } - + return $productArr; } @@ -92,7 +92,7 @@ public function execute() $methodInstance = $this->paymentHelper->getMethodInstance('paynl_payment_ideal'); $arrProducts = $this->getProducts(); $fcAmount = $this->cart->getQuote()->getGrandTotal(); - try { + try { if (empty($fcAmount)) { throw new \Exception('empty amount', FastCheckoutStart::FC_EMPTY_BASKET); } @@ -113,22 +113,22 @@ public function execute() ); } catch (\Exception $e) { throw new \Exception($e->getMessage(), FastCheckoutStart::FC_DB_ERROR); - } + } $this->getResponse()->setNoCacheHeaders(); - $this->getResponse()->setRedirect($payTransaction->getRedirectUrl()); + $this->getResponse()->setRedirect($payTransaction->getRedirectUrl()); } catch (\Exception $e) { $message = __('Something went wrong, please try again later'); if ($e->getCode() == FastCheckoutStart::FC_EMPTY_BASKET) { - $message = __('Please put something in the basket'); - } elseif ($e->getCode() == FastCheckoutStart::FC_DB_ERROR) { + $message = __('Please put something in the basket'); + } elseif ($e->getCode() == FastCheckoutStart::FC_DB_ERROR) { $this->payHelper->logCritical('FC DB ERROR: ' . $e->getMessage(), []); - } else { + } else { $this->payHelper->logCritical('FC ERROR: ' . $e->getMessage(), []); } - - $this->messageManager->addExceptionMessage($e, $message); + + $this->messageManager->addExceptionMessage($e, $message); $this->_redirect('checkout/cart'); } } diff --git a/Model/PayPaymentCreateFastCheckout.php b/Model/PayPaymentCreateFastCheckout.php index fe3f8d17..390407df 100644 --- a/Model/PayPaymentCreateFastCheckout.php +++ b/Model/PayPaymentCreateFastCheckout.php @@ -3,7 +3,6 @@ namespace Paynl\Payment\Model; use Paynl\Payment\Model\PayPaymentCreate; -use PayNL\Sdk\Model\Order; class PayPaymentCreateFastCheckout extends PayPaymentCreate { @@ -123,12 +122,12 @@ private function getProductData() foreach ($this->products as $i => $arrProduct) { $product = []; - $product['id'] = $arrProduct['id'] ?? 'p'.$i; - $product['description'] = $arrProduct['description'] ?? ''; - $product['type'] = $arrProduct['type'] ?? ''; + $product['id'] = $arrProduct['id'] ?? 'p' . $i; + $product['description'] = $arrProduct['description'] ?? ''; + $product['type'] = $arrProduct['type'] ?? ''; $product['price'] = [ - 'value' => $arrProduct['price'], - 'currency' => $arrProduct['currecny'], + 'value' => $arrProduct['price'], + 'currency' => $arrProduct['currecny'], ]; $product['quantity'] = $arrProduct['quantity'] ?? 0; $product['vatPercentage'] = $arrProduct['vatPercentage'] ?? ''; @@ -153,7 +152,7 @@ public function create(): OrderCreateResponse #TODO: Make dynamic for failovergateway $url = 'https://connect.payments.nl/v1/orders'; - $rawResponse = (array)$this->sendCurlRequest($url, $payload, $this->payConfig->getTokencode(), $this->payConfig->getApiToken()); + $rawResponse = (array) $this->sendCurlRequest($url, $payload, $this->payConfig->getTokencode(), $this->payConfig->getApiToken()); $redirectURL = $rawResponse['links']->redirect ?? ''; @@ -212,6 +211,6 @@ public function sendCurlRequest($requestUrl, $payload, $tokenCode, $apiToken, $m throw new \Exception($field . ': ' . ($response->violations[0]->message ?? '')); } - return (array)$response; + return (array) $response; } } diff --git a/ViewModel/QuickCheckout.php b/ViewModel/FastCheckout.php similarity index 82% rename from ViewModel/QuickCheckout.php rename to ViewModel/FastCheckout.php index 9a67b236..ae0c5906 100644 --- a/ViewModel/QuickCheckout.php +++ b/ViewModel/FastCheckout.php @@ -4,9 +4,8 @@ use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\View\Element\Block\ArgumentInterface; -use Magento\Store\Model\ScopeInterface; -class QuickCheckout implements ArgumentInterface +class FastCheckout implements ArgumentInterface { /** * @var ScopeConfigInterface @@ -21,5 +20,5 @@ public function __construct( ScopeConfigInterface $scopeConfig ) { $this->scopeConfig = $scopeConfig; - } -} \ No newline at end of file + } +} diff --git a/view/frontend/layout/checkout_cart_index.xml b/view/frontend/layout/checkout_cart_index.xml index 7d50478c..44b86acc 100644 --- a/view/frontend/layout/checkout_cart_index.xml +++ b/view/frontend/layout/checkout_cart_index.xml @@ -2,9 +2,9 @@ - + - Paynl\Payment\ViewModel\QuickCheckout + Paynl\Payment\ViewModel\FastCheckout diff --git a/view/frontend/templates/pay_fast_checkout_cart.phtml b/view/frontend/templates/pay_fast_checkout_cart.phtml new file mode 100644 index 00000000..34b3a9be --- /dev/null +++ b/view/frontend/templates/pay_fast_checkout_cart.phtml @@ -0,0 +1,14 @@ + + + +
+
+ +
+
diff --git a/view/frontend/templates/pay_quick_checkout_cart.phtml b/view/frontend/templates/pay_quick_checkout_cart.phtml deleted file mode 100644 index 10deef9e..00000000 --- a/view/frontend/templates/pay_quick_checkout_cart.phtml +++ /dev/null @@ -1,14 +0,0 @@ - - - -
-
- -
-
diff --git a/view/frontend/web/css/payQuickCheckout.css b/view/frontend/web/css/payFastCheckout.css similarity index 58% rename from view/frontend/web/css/payQuickCheckout.css rename to view/frontend/web/css/payFastCheckout.css index aa8a5409..e76ced4b 100644 --- a/view/frontend/web/css/payQuickCheckout.css +++ b/view/frontend/web/css/payFastCheckout.css @@ -1,10 +1,10 @@ -#paynl_quick_checkout_cart{ - display:block; - width:100%; +#paynl_fast_checkout_cart { + display: block; + width: 100%; } -#paynl_quick_checkout_cart button, -#top-cart-quick-checkout{ +#paynl_fast_checkout_cart button, +#top-cart-fast-checkout { width: 100%; line-height: 2.2rem; padding: 14px 17px; @@ -12,7 +12,7 @@ margin-top: -10px; background: #c90066; border-color: #c90066; - background-image: url("../images/quickCheckoutIdeal.png"); + background-image: url("../images/fastCheckoutIdeal.png"); background-repeat: no-repeat; background-size: 51px; background-position: 8px center; diff --git a/view/frontend/web/images/fastCheckoutIdeal.png b/view/frontend/web/images/fastCheckoutIdeal.png new file mode 100644 index 0000000000000000000000000000000000000000..ecd289029976c4f425c0d75d42c56483b9162190 GIT binary patch literal 11866 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 F{|^FAm#Y8( literal 0 HcmV?d00001 diff --git a/view/frontend/web/images/quickCheckoutIdeal.png b/view/frontend/web/images/quickCheckoutIdeal.png deleted file mode 100644 index 644f1c3bcea38176362f108dfab40cbb34cca696..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12107 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 Date: Mon, 29 Jul 2024 16:19:19 +0200 Subject: [PATCH 04/47] Remove Database, Use dummyData at start and use Quote for exchange --- Controller/Checkout/Exchange.php | 64 ++-- Controller/Checkout/FastCheckoutStart.php | 166 +++++++--- Controller/Checkout/Finish.php | 5 +- Controller/Order/FinishFC.php | 30 ++ Model/Config.php | 1 + Model/PayPaymentCreateFastCheckout.php | 7 +- Model/PayPaymentProcessFastCheckout.php | 299 +++++++++--------- etc/db_schema.xml | 16 +- view/frontend/layout/paynl_order_finishfc.xml | 25 ++ view/frontend/templates/pay_finish_fc.phtml | 19 ++ 10 files changed, 388 insertions(+), 244 deletions(-) create mode 100644 Controller/Order/FinishFC.php create mode 100644 view/frontend/layout/paynl_order_finishfc.xml create mode 100644 view/frontend/templates/pay_finish_fc.phtml diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index e701d9a4..93cbdaa3 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -2,8 +2,8 @@ namespace Paynl\Payment\Controller\Checkout; -use Magento\Framework\App\RequestInterface; use Magento\Framework\App\Request\InvalidRequestException; +use Magento\Framework\App\RequestInterface; use Magento\Sales\Model\Order; use Magento\Sales\Model\OrderRepository; use Paynl\Payment\Controller\CsrfAwareActionInterface; @@ -97,6 +97,7 @@ public function __construct( parent::__construct($context); } + /** * @return array|false */ @@ -133,7 +134,7 @@ private function getPayLoad($_request) $action = $request->action ?? null; $paymentProfile = $request->payment_profile_id ?? null; $payOrderId = $request->order_id ?? null; - $orderId = $request->extra1 ?? null; + $orderId = $request->extra1 ?? null; $data = null; } else { # TGU @@ -167,7 +168,7 @@ private function getPayLoad($_request) 'internalStateId' => $internalStateId ?? null, 'internalStateName' => $internalStateName ?? null, 'checkoutData' => $checkoutData ?? null, - 'orgData' => $data, + 'orgData' => $data ]; } @@ -176,9 +177,9 @@ private function getPayLoad($_request) * @return bool */ private function isFastCheckout($params) - { - return $params['orderId'] == 'fastcheckout' && !empty($params['checkoutData'] ?? ''); - } + { + return str_contains($params['orderId'], 'fastcheckout') && !empty($params['checkoutData'] ?? ''); + } /** * @return \Magento\Framework\Controller\Result\Raw @@ -190,39 +191,20 @@ public function execute() $payOrderId = isset($params['payOrderId']) ? $params['payOrderId'] : null; $orderEntityId = isset($params['orderId']) ? $params['orderId'] : null; $paymentProfileId = isset($params['paymentProfile']) ? $params['paymentProfile'] : null; + $order = null; if ($action == 'pending') { return $this->result->setContents('TRUE| Ignore pending'); } if ($this->isFastCheckout($params)) { - - $checkoutData = $params['checkoutData']; - - $fcOrder = $this->payPaymentProcessFastCheckout->processFastCheckout($params); - - $this->config->setStore($fcOrder->getStore()); - - try { - $this->config->configureSDK(true); - $transaction = Transaction::get($payOrderId); - } catch (\Exception $e) { - $this->payHelper->logCritical($e, $params, $fcOrder->getStore()); - return $this->result->setContents('FALSE| Error fetching transaction. ' . $e->getMessage()); - } - try { - $result = $this->payPayment->processPaidOrder($transaction, $fcOrder, $paymentProfileId); - if (!$result) { - throw new \Exception('Cannot process order'); - } - - $message = 'TRUE| ' . (($transaction->isPaid()) ? "PAID" : "AUTHORIZED"); + $checkoutData = $params['checkoutData']; + $order = $this->payPaymentProcessFastCheckout->processFastCheckout($params); } catch (\Exception $e) { - $message = 'FALSE| ' . $e->getMessage(); - } - - return $this->result->setContents($message); + $this->payHelper->logCritical($e, $params); + return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); + } } if (empty($payOrderId) || empty($orderEntityId)) { @@ -230,15 +212,17 @@ public function execute() return $this->result->setContents('FALSE| order_id is not set in the request'); } - try { - $order = $this->orderRepository->get($orderEntityId); - if (empty($order)) { - $this->payHelper->logCritical('Cannot load order: ' . $orderEntityId); - throw new \Exception('Cannot load order: ' . $orderEntityId); + if(empty($order)){ + try { + $order = $this->orderRepository->get($orderEntityId); + if (empty($order)) { + $this->payHelper->logCritical('Cannot load order: ' . $orderEntityId); + throw new \Exception('Cannot load order: ' . $orderEntityId); + } + } catch (\Exception $e) { + $this->payHelper->logCritical($e, $params); + return $this->result->setContents('FALSE| Error loading order. ' . $e->getMessage()); } - } catch (\Exception $e) { - $this->payHelper->logCritical($e, $params); - return $this->result->setContents('FALSE| Error loading order. ' . $e->getMessage()); } if ($action == 'new_ppt') { @@ -289,7 +273,7 @@ public function execute() $payment = $order->getPayment(); $orderEntityIdTransaction = $transaction->getExtra3(); - if ($orderEntityId != $orderEntityIdTransaction) { + if ($orderEntityId != $orderEntityIdTransaction && !$this->isFastCheckout($params)) { $this->payHelper->logCritical('Transaction mismatch ' . $orderEntityId . ' / ' . $orderEntityIdTransaction, $params, $order->getStore()); $this->removeProcessing($payOrderId, $action); return $this->result->setContents('FALSE|Transaction mismatch'); diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index b5448163..a090e795 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -2,6 +2,12 @@ namespace Paynl\Payment\Controller\Checkout; +use Magento\Checkout\Model\Cart; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Model\CustomerFactory; +use Magento\Framework\App\Action\Context; +use Magento\Framework\App\ResourceConnection; +use Magento\Framework\HTTP\PhpEnvironment\RemoteAddress; use Magento\Payment\Helper\Data as PaymentHelper; use Magento\Store\Model\StoreManagerInterface; use Paynl\Payment\Helper\PayHelper; @@ -10,58 +16,137 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action { const FC_GENERAL_ERROR = 8000; - const FC_DB_ERROR = 8001; const FC_EMPTY_BASKET = 8005; + /** + * @var Cart + */ private $cart; - private $payConfig; - private $resource; - private $remoteAddress; - private $paymentHelper; /** - * @var \Magento\Store\Model\StoreManagerInterface + * @var paymentHelper */ - public $storeManager; + private $paymentHelper; /** - * @var \Paynl\Payment\Helper\PayHelper; + * @var PayHelper; */ private $payHelper; /** - * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\Framework\View\Result\PageFactory $pageFactory - * @param \Magento\Checkout\Model\Cart $cart - * @param \Paynl\Payment\Model\Config $payConfig - * @param \Magento\Framework\App\ResourceConnection $resource - * @param \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress + * @var StoreManagerInterface + */ + private $storeManager; + + /** + * @var CustomerFactory + */ + private $customerFactory; + + /** + * @var CustomerRepositoryInterface + */ + private $customerRepository; + + /** + * @param Context $context + * @param Cart $cart + * @param ResourceConnection $resource + * @param RemoteAddress $remoteAddress * @param PaymentHelper $paymentHelper * @param PayHelper $payHelper * @param StoreManagerInterface $storeManager + * @param CustomerFactory $customerFactory + * @param CustomerRepositoryInterface $customerRepository, */ public function __construct( - \Magento\Framework\App\Action\Context $context, - \Magento\Framework\View\Result\PageFactory $pageFactory, - \Magento\Checkout\Model\Cart $cart, - \Paynl\Payment\Model\Config $payConfig, - \Magento\Framework\App\ResourceConnection $resource, - \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress, + Context $context, + Cart $cart, + ResourceConnection $resource, + RemoteAddress $remoteAddress, PaymentHelper $paymentHelper, PayHelper $payHelper, - StoreManagerInterface $storeManager + StoreManagerInterface $storeManager, + CustomerFactory $customerFactory, + CustomerRepositoryInterface $customerRepository ) { $this->cart = $cart; - $this->payConfig = $payConfig; $this->remoteAddress = $remoteAddress; $this->resource = $resource; $this->paymentHelper = $paymentHelper; $this->storeManager = $storeManager; $this->payHelper = $payHelper; + $this->customerFactory = $customerFactory; + $this->customerRepository = $customerRepository; return parent::__construct($context); } + /** + * @param quote $qoute + * @return void + */ + private function quoteSetDummyData($quote) + { + $store = $this->storeManager->getStore(); + $websiteId = $store->getWebsiteId(); + + $email = 'fastcheckout@pay.nl'; + $customer = $this->customerFactory->create() + ->setWebsiteId($websiteId) + ->loadByEmail($email); + + if (!$customer->getEntityId()) { + $customer->setWebsiteId($websiteId) + ->setStore($store) + ->setFirstname('firstname') + ->setLastname('lastname') + ->setEmail($email) + ->setPassword($email); + $customer->save(); + } + + $customer = $this->customerRepository->getById($customer->getEntityId()); + + $quote->assignCustomer($customer); + $quote->setSendConfirmation(1); + + $dummyData = array( + 'customer_address_id' => '', + 'prefix' => '', + 'firstname' => 'firstname', + 'middlename' => '', + 'lastname' => 'lastname', + 'suffix' => '', + 'company' => '', + 'street' => array( + '0' => 'streetname', + '1' => 'streetnumber', + ), + 'city' => 'city', + 'country_id' => 'NL', + 'region' => '', + 'postcode' => '1234AB', + 'telephone' => 'phone', + 'fax' => '', + 'vat_id' => '', + 'save_in_address_book' => 0, + ); + + $billingAddress = $quote->getBillingAddress()->addData($dummyData); + $shippingAddress = $quote->getShippingAddress()->addData($dummyData); + + $shippingAddress = $quote->getShippingAddress(); + $shippingAddress->setCollectShippingRates(true)->collectShippingRates()->setShippingMethod($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')); + + $quote->setPaymentMethod('paynl_payment_ideal'); + $quote->setInventoryProcessed(false); + $quote->save(); + + $quote->getPayment()->importData(['method' => 'paynl_payment_ideal']); + $quote->collectTotals()->save(); + } + /** * @return array */ @@ -78,19 +163,37 @@ private function getProducts() 'description' => $product->getName(), 'price' => $product->getPrice() * 100, 'currecny' => $this->storeManager->getStore()->getCurrentCurrencyCode(), - 'type' => 'product', + 'type' => \Paynl\Transaction::PRODUCT_TYPE_ARTICLE, 'vatPercentage' => ($product->getPriceInclTax() - $product->getBasePrice()) / $product->getBasePrice() * 100, ]; } } + if ($this->cart->getQuote()->getShippingAddress()->getShippingAmount() > 0) { + $shippingMethodArr = explode('_', $this->cart->getQuote()->getShippingAddress()->getShippingMethod()); + $productArr[] = [ + 'id' => $shippingMethodArr[0], + 'quantity' => 1, + 'description' => $shippingMethodArr[1], + 'price' => $this->cart->getQuote()->getShippingAddress()->getShippingAmount() * 100, + 'currecny' => $this->storeManager->getStore()->getCurrentCurrencyCode(), + 'type' => \Paynl\Transaction::PRODUCT_TYPE_SHIPPING, + 'vatPercentage' => ($this->cart->getQuote()->getShippingAddress()->getBaseShippingInclTax() - $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount()) / $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount() * 100, + ]; + } + return $productArr; } public function execute() { $methodInstance = $this->paymentHelper->getMethodInstance('paynl_payment_ideal'); + + $quote = $this->cart->getQuote(); + $this->quoteSetDummyData($quote); + $arrProducts = $this->getProducts(); + $fcAmount = $this->cart->getQuote()->getGrandTotal(); try { if (empty($fcAmount)) { @@ -101,20 +204,11 @@ public function execute() $methodInstance, $fcAmount * 100, $arrProducts, - $this->storeManager->getStore()->getBaseUrl() + $this->storeManager->getStore()->getBaseUrl(), + $this->cart->getQuote()->getId(), + $this->storeManager->getStore()->getCurrentCurrencyCode() ))->create(); - try { - $connection = $this->resource->getConnection(); - $tableName = $this->resource->getTableName('pay_fast_checkout'); - - $connection->insertOnDuplicate( - $tableName, ['payOrderId' => $payTransaction->getTransactionId(), 'products' => json_encode($arrProducts), 'storeId' => $this->storeManager->getStore()->getId(), 'orderId' => null], ['payOrderId', 'products', 'storeId', 'orderId', 'created_at'] - ); - } catch (\Exception $e) { - throw new \Exception($e->getMessage(), FastCheckoutStart::FC_DB_ERROR); - } - $this->getResponse()->setNoCacheHeaders(); $this->getResponse()->setRedirect($payTransaction->getRedirectUrl()); @@ -122,8 +216,6 @@ public function execute() $message = __('Something went wrong, please try again later'); if ($e->getCode() == FastCheckoutStart::FC_EMPTY_BASKET) { $message = __('Please put something in the basket'); - } elseif ($e->getCode() == FastCheckoutStart::FC_DB_ERROR) { - $this->payHelper->logCritical('FC DB ERROR: ' . $e->getMessage(), []); } else { $this->payHelper->logCritical('FC ERROR: ' . $e->getMessage(), []); } diff --git a/Controller/Checkout/Finish.php b/Controller/Checkout/Finish.php index fdc189ad..293ce39a 100644 --- a/Controller/Checkout/Finish.php +++ b/Controller/Checkout/Finish.php @@ -153,9 +153,8 @@ public function execute() try { if ($magOrderId == 'fc') { - if($bSuccess){ - # Make the cart inactive - $resultRedirect->setPath(Config::FINISH_PAY, ['_query' => ['utm_nooverride' => '1']]); + if($bSuccess){ + $resultRedirect->setPath(Config::FINISH_PAY_FC, ['_query' => ['utm_nooverride' => '1']]); } elseif($bPending){ $resultRedirect->setPath(Config::PENDING_PAY, ['_query' => ['utm_nooverride' => '1']]); } else { diff --git a/Controller/Order/FinishFC.php b/Controller/Order/FinishFC.php new file mode 100644 index 00000000..403fb048 --- /dev/null +++ b/Controller/Order/FinishFC.php @@ -0,0 +1,30 @@ +_pageFactory = $pageFactory; + return parent::__construct($context); + } + + /** + * @return object + */ + public function execute() + { + return $this->_pageFactory->create(); + } +} diff --git a/Model/Config.php b/Model/Config.php index 4d2b0987..6f713d46 100755 --- a/Model/Config.php +++ b/Model/Config.php @@ -13,6 +13,7 @@ class Config { public const FINISH_PAY = 'paynl/order/finish'; + public const FINISH_PAY_FC = 'paynl/order/finishfc'; public const PENDING_PAY = 'paynl/order/pending'; public const CANCEL_PAY = 'paynl/order/cancel'; public const FINISH_STANDARD = 'checkout/onepage/success'; diff --git a/Model/PayPaymentCreateFastCheckout.php b/Model/PayPaymentCreateFastCheckout.php index 390407df..7e4c6508 100644 --- a/Model/PayPaymentCreateFastCheckout.php +++ b/Model/PayPaymentCreateFastCheckout.php @@ -28,7 +28,7 @@ class PayPaymentCreateFastCheckout extends PayPaymentCreate * @param $baseUrl * @throws \Exception */ - public function __construct($methodInstance, $amount, $products, $baseUrl) + public function __construct($methodInstance, $amount, $products, $baseUrl, $quoteId, $currency) { $fastCheckout = parent::__construct(null, $methodInstance); @@ -36,11 +36,11 @@ public function __construct($methodInstance, $amount, $products, $baseUrl) $exchangeUrl = $baseUrl . 'paynl/checkout/exchange/'; $fastCheckout->setAmount($amount); - $fastCheckout->setCurrency('EUR'); // todo: make variable + $fastCheckout->setCurrency('EUR'); $fastCheckout->setFinishURL($finishUrl); $fastCheckout->setExchangeURL($exchangeUrl); $fastCheckout->setProducts($products); - $fastCheckout->reference = 'fastcheckout'; + $fastCheckout->reference = 'fastcheckout' . $quoteId; } /** @@ -149,7 +149,6 @@ public function create(): OrderCreateResponse $payload = $this->getData(); $payload = json_encode($payload); - #TODO: Make dynamic for failovergateway $url = 'https://connect.payments.nl/v1/orders'; $rawResponse = (array) $this->sendCurlRequest($url, $payload, $this->payConfig->getTokencode(), $this->payConfig->getApiToken()); diff --git a/Model/PayPaymentProcessFastCheckout.php b/Model/PayPaymentProcessFastCheckout.php index 3839d1d3..33513f94 100644 --- a/Model/PayPaymentProcessFastCheckout.php +++ b/Model/PayPaymentProcessFastCheckout.php @@ -2,58 +2,88 @@ namespace Paynl\Payment\Model; +use Magento\Customer\Api\CustomerRepositoryInterface; +use Magento\Customer\Model\CustomerFactory; +use Magento\Framework\App\Action\Context; +use Magento\Framework\View\Result\PageFactory; +use Magento\Quote\Model\QuoteFactory; +use Magento\Quote\Model\QuoteManagement; +use Magento\Sales\Model\OrderFactory; +use Magento\Store\Model\StoreManagerInterface; +use Paynl\Payment\Helper\PayHelper; +use Paynl\Payment\Model\Config; + class PayPaymentProcessFastCheckout { - protected $_pageFactory; - protected $context; - protected $_storeManager; - protected $_product; - protected $_formkey; + /** + * @var Config + */ + protected $pageFactory; + + /** + * @var StoreManagerInterface + */ + protected $storeManager; + + /** + * @var QuoteFactory + */ protected $quote; + + /** + * @var QuoteManagement + */ protected $quoteManagement; + + /** + * @var CustomerFactory + */ protected $customerFactory; + + /** + * @var CustomerRepositoryInterface + */ protected $customerRepository; - protected $remoteAddress; - protected $resource; - protected $orderService; + + /** + * @var OrderFactory + */ protected $orderFactory; - protected $paynlConfig; - protected $payPayment; + + /** + * @var PayHelper + */ + protected $payHelper; + + /** + * @var OrderRepositoryInterface + */ + protected $orderRepository; public function __construct( - \Magento\Framework\App\Action\Context $context, - \Magento\Framework\View\Result\PageFactory $pageFactory, - \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Catalog\Model\Product $product, - \Magento\Framework\Data\Form\FormKey $formkey, - \Magento\Quote\Model\QuoteFactory $quote, - \Magento\Quote\Model\QuoteManagement $quoteManagement, - \Magento\Customer\Model\CustomerFactory $customerFactory, - \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, - \Magento\Framework\App\ResourceConnection $resource, - \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $remoteAddress, - \Magento\Sales\Model\OrderFactory $orderFactory, - \Paynl\Payment\Model\Config $paynlConfig, - \Paynl\Payment\Model\PayPayment $payPayment + Context $context, + PageFactory $pageFactory, + StoreManagerInterface $storeManager, + QuoteFactory $quote, + QuoteManagement $quoteManagement, + CustomerFactory $customerFactory, + CustomerRepositoryInterface $customerRepository, + OrderFactory $orderFactory, + PayHelper $payHelper ) { - $this->_pageFactory = $pageFactory; - $this->_storeManager = $storeManager; - $this->_product = $product; - $this->_formkey = $formkey; + $this->pageFactory = $pageFactory; + $this->storeManager = $storeManager; $this->quote = $quote; $this->quoteManagement = $quoteManagement; $this->customerFactory = $customerFactory; $this->customerRepository = $customerRepository; - $this->remoteAddress = $remoteAddress; - $this->resource = $resource; $this->orderFactory = $orderFactory; - $this->paynlConfig = $paynlConfig; - $this->payPayment = $payPayment; + $this->payHelper = $payHelper; } /** * @param array $params - * @return boolean + * @return Order */ public function processFastCheckout($params) { @@ -65,120 +95,99 @@ public function processFastCheckout($params) $payOrderId = $params['payOrderId']; - $connection = $this->resource->getConnection(); - $tableName = $this->resource->getTableName('pay_fast_checkout'); - - $select = $connection->select()->from([$tableName])->where('payOrderId = ?', $payOrderId); - $result = $connection->fetchAll($select); - - if ($result[0]['orderId'] == null) { - $products = json_decode($result[0]['products']); - - $store = $this->_storeManager->getStore($result[0]['storeId']); - $websiteId = $store->getWebsiteId(); - - $this->paynlConfig->setStore($store); - - $quote = $this->quote->create(); - $quote->setStore($store); - - $email = $customerData['email']; - $customer = $this->customerFactory->create() - ->setWebsiteId($websiteId) - ->loadByEmail($email); - - if (!$customer->getEntityId()) { - $customer->setWebsiteId($websiteId) - ->setStore($store) - ->setFirstname($customerData['firstName']) - ->setLastname($customerData['lastName']) - ->setEmail($email) - ->setPassword($email); - $customer->save(); - } - - $customer = $this->customerRepository->getById($customer->getEntityId()); - $quote->setCurrency(); - - $quote->assignCustomer($customer); - $quote->setSendConfirmation(1); - - foreach ($products as $productArr) { - $product = $this->_product->load($productArr->id); - $product->setPrice($product->getPrice()); - $quote->addProduct($product, intval($productArr->quantity)); - } - - $billingAddress = $quote->getBillingAddress()->addData(array( - 'customer_address_id' => '', - 'prefix' => '', - 'firstname' => $customerData['firstName'], - 'middlename' => '', - 'lastname' => $customerData['lastName'], - 'suffix' => '', - 'company' => $customerData['company'] ?? '', - 'street' => array( - '0' => $billingAddressData['streetName'], - '1' => $billingAddressData['streetNumber'] . $billingAddressData['streetNumberAddition'], - ), - 'city' => $billingAddressData['city'], - 'country_id' => $billingAddressData['countryCode'], - 'region' => $billingAddressData['regionCode'] ?? '', - 'postcode' => $billingAddressData['zipCode'], - 'telephone' => $customerData['phone'], - 'fax' => '', - 'vat_id' => '', - 'save_in_address_book' => 0, - )); - - $shippingAddress = $quote->getShippingAddress()->addData(array( - 'customer_address_id' => '', - 'prefix' => '', - 'firstname' => $customerData['firstName'], - 'middlename' => '', - 'lastname' => $customerData['lastName'], - 'suffix' => '', - 'company' => $customerData['company'] ?? '', - 'street' => array( - '0' => $shippingAddressData['streetName'], - '1' => $shippingAddressData['streetNumber'] . $shippingAddressData['streetNumberAddition'], - ), - 'city' => $shippingAddressData['city'], - 'country_id' => $shippingAddressData['countryCode'], - 'region' => $shippingAddressData['regionCode'] ?? '', - 'postcode' => $shippingAddressData['zipCode'], - 'telephone' => $customerData['phone'], - 'fax' => '', - 'vat_id' => '', - 'save_in_address_book' => 0, - )); - - $shippingAddress->setCollectShippingRates(true) - ->collectShippingRates() - ->setShippingMethod($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')); - $quote->setPaymentMethod('paynl_payment_ideal'); - $quote->setInventoryProcessed(false); - $quote->save(); - $quote->getPayment()->importData(array('method' => 'paynl_payment_ideal')); - - $quote->collectTotals()->save(); - - $service = $this->quoteManagement->submit($quote); - $increment_id = $service->getRealOrderId(); - - $order = $this->orderFactory->create()->loadByIncrementId($increment_id); - $additionalData = $order->getPayment()->getAdditionalInformation(); - $additionalData['transactionId'] = $payOrderId; - $order->getPayment()->setAdditionalInformation($additionalData); - $order->save(); - - $connection->insertOnDuplicate( - $tableName, ['payOrderId' => $payOrderId, 'orderId' => $increment_id], ['payOrderId', 'orderId'] - ); - } else { - $order = $this->orderFactory->create()->loadByIncrementId($result[0]['orderId']); + $orderId = explode('fastcheckout', $params['orderId']); + $quoteId = $orderId[1]; + + $quote = $this->quote->create()->loadByIdWithoutStore($quoteId); + $storeId = $quote->getStoreId(); + + $store = $this->storeManager->getStore($storeId); + $websiteId = $store->getWebsiteId(); + + $email = $customerData['email']; + $customer = $this->customerFactory->create() + ->setWebsiteId($websiteId) + ->loadByEmail($email); + + if (!$customer->getEntityId()) { + $customer->setWebsiteId($websiteId) + ->setStore($store) + ->setFirstname($customerData['firstName']) + ->setLastname($customerData['lastName']) + ->setEmail($email) + ->setPassword($email); + $customer->save(); } + $customer = $this->customerRepository->getById($customer->getEntityId()); + + $quote->assignCustomer($customer); + $quote->setSendConfirmation(1); + + $billingAddress = $quote->getBillingAddress()->addData(array( + 'customer_address_id' => '', + 'prefix' => '', + 'firstname' => $customerData['firstName'], + 'middlename' => '', + 'lastname' => $customerData['lastName'], + 'suffix' => '', + 'company' => $customerData['company'] ?? '', + 'street' => array( + '0' => $billingAddressData['streetName'], + '1' => $billingAddressData['streetNumber'] . $billingAddressData['streetNumberAddition'], + ), + 'city' => $billingAddressData['city'], + 'country_id' => $billingAddressData['countryCode'], + 'region' => $billingAddressData['regionCode'] ?? '', + 'postcode' => $billingAddressData['zipCode'], + 'telephone' => $customerData['phone'], + 'fax' => '', + 'vat_id' => '', + 'save_in_address_book' => 1, + )); + + $shippingAddress = $quote->getShippingAddress()->addData(array( + 'customer_address_id' => '', + 'prefix' => '', + 'firstname' => $customerData['firstName'], + 'middlename' => '', + 'lastname' => $customerData['lastName'], + 'suffix' => '', + 'company' => $customerData['company'] ?? '', + 'street' => array( + '0' => $shippingAddressData['streetName'], + '1' => $shippingAddressData['streetNumber'] . $shippingAddressData['streetNumberAddition'], + ), + 'city' => $shippingAddressData['city'], + 'country_id' => $shippingAddressData['countryCode'], + 'region' => $shippingAddressData['regionCode'] ?? '', + 'postcode' => $shippingAddressData['zipCode'], + 'telephone' => $customerData['phone'], + 'fax' => '', + 'vat_id' => '', + 'save_in_address_book' => 1, + )); + + $shippingAddress = $quote->getShippingAddress(); + $shippingAddress->setCollectShippingRates(true)->collectShippingRates()->setShippingMethod($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')); + + $quote->setPaymentMethod('paynl_payment_ideal'); + $quote->setInventoryProcessed(false); + $quote->save(); + + // Set Sales Order Payment + $quote->getPayment()->importData(['method' => 'paynl_payment_ideal']); + $quote->collectTotals()->save(); + + $service = $this->quoteManagement->submit($quote); + $increment_id = $service->getRealOrderId(); + + $order = $this->orderFactory->create()->loadByIncrementId($increment_id); + $additionalData = $order->getPayment()->getAdditionalInformation(); + $additionalData['transactionId'] = $payOrderId; + $order->getPayment()->setAdditionalInformation($additionalData); + $order->save(); + return $order; } diff --git a/etc/db_schema.xml b/etc/db_schema.xml index fba94f84..238ecc76 100644 --- a/etc/db_schema.xml +++ b/etc/db_schema.xml @@ -9,19 +9,5 @@ - - - - - - - - - - - - - - -
+ \ No newline at end of file diff --git a/view/frontend/layout/paynl_order_finishfc.xml b/view/frontend/layout/paynl_order_finishfc.xml new file mode 100644 index 00000000..3ac6096c --- /dev/null +++ b/view/frontend/layout/paynl_order_finishfc.xml @@ -0,0 +1,25 @@ + + + + + Success Page + + + + + + Thank you for your purchase! + + + + + + + + + \ No newline at end of file diff --git a/view/frontend/templates/pay_finish_fc.phtml b/view/frontend/templates/pay_finish_fc.phtml new file mode 100644 index 00000000..f53999a3 --- /dev/null +++ b/view/frontend/templates/pay_finish_fc.phtml @@ -0,0 +1,19 @@ + + +
+

+ getAdditionalInfoHtml() ?> +
+
+ +
+
+
From df27e238e1e3ba3dd0432188f74b1c28dd4c4710 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:40:43 +0200 Subject: [PATCH 05/47] Code Polish --- Block/Checkout/FastCheckout.php | 3 +- Controller/Checkout/Exchange.php | 20 +++++++------ Controller/Checkout/FastCheckoutStart.php | 13 +++++---- Controller/Checkout/Finish.php | 12 ++++---- Model/OrderCreateResponse.php | 8 +++++- Model/PayPaymentCreate.php | 5 ++-- Model/PayPaymentCreateFastCheckout.php | 35 +++++++++++++---------- Model/PayPaymentProcessFastCheckout.php | 13 ++++++++- 8 files changed, 68 insertions(+), 41 deletions(-) diff --git a/Block/Checkout/FastCheckout.php b/Block/Checkout/FastCheckout.php index 6570500f..c45affc4 100644 --- a/Block/Checkout/FastCheckout.php +++ b/Block/Checkout/FastCheckout.php @@ -19,6 +19,8 @@ class FastCheckout extends Block * ListProduct constructor. * @param Context $context * @param UrlHelper $urlHelper + * @param Config $page + * @param Store $store * @param array $data */ public function __construct( @@ -32,5 +34,4 @@ public function __construct( $page->addPageAsset('Paynl_Payment::css/payFastCheckout.css'); parent::__construct($context, $data); } - } diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index 93cbdaa3..5d49899d 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -110,7 +110,7 @@ private function getHeaders() } /** - * @return bool + * @return boolean */ private function isSignExchange() { @@ -120,9 +120,10 @@ private function isSignExchange() } /** - * @param $request + * @param object $_request * @return array * @throws Exception + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ private function getPayLoad($_request) { @@ -134,7 +135,7 @@ private function getPayLoad($_request) $action = $request->action ?? null; $paymentProfile = $request->payment_profile_id ?? null; $payOrderId = $request->order_id ?? null; - $orderId = $request->extra1 ?? null; + $orderId = $request->extra1 ?? null; $data = null; } else { # TGU @@ -173,13 +174,14 @@ private function getPayLoad($_request) } /** - * @param $params - * @return bool + * @param array $params + * @return boolean + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ private function isFastCheckout($params) - { + { return str_contains($params['orderId'], 'fastcheckout') && !empty($params['checkoutData'] ?? ''); - } + } /** * @return \Magento\Framework\Controller\Result\Raw @@ -204,7 +206,7 @@ public function execute() } catch (\Exception $e) { $this->payHelper->logCritical($e, $params); return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); - } + } } if (empty($payOrderId) || empty($orderEntityId)) { @@ -212,7 +214,7 @@ public function execute() return $this->result->setContents('FALSE| order_id is not set in the request'); } - if(empty($order)){ + if (empty($order)) { try { $order = $this->orderRepository->get($orderEntityId); if (empty($order)) { diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index a090e795..2ea1daec 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -15,8 +15,8 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action { - const FC_GENERAL_ERROR = 8000; - const FC_EMPTY_BASKET = 8005; + public const FC_GENERAL_ERROR = 8000; + public const FC_EMPTY_BASKET = 8005; /** * @var Cart @@ -57,7 +57,7 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action * @param PayHelper $payHelper * @param StoreManagerInterface $storeManager * @param CustomerFactory $customerFactory - * @param CustomerRepositoryInterface $customerRepository, + * @param CustomerRepositoryInterface $customerRepository */ public function __construct( Context $context, @@ -83,8 +83,9 @@ public function __construct( } /** - * @param quote $qoute + * @param quote $quote * @return void + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ private function quoteSetDummyData($quote) { @@ -185,6 +186,9 @@ private function getProducts() return $productArr; } + /** + * @return void + */ public function execute() { $methodInstance = $this->paymentHelper->getMethodInstance('paynl_payment_ideal'); @@ -211,7 +215,6 @@ public function execute() $this->getResponse()->setNoCacheHeaders(); $this->getResponse()->setRedirect($payTransaction->getRedirectUrl()); - } catch (\Exception $e) { $message = __('Something went wrong, please try again later'); if ($e->getCode() == FastCheckoutStart::FC_EMPTY_BASKET) { diff --git a/Controller/Checkout/Finish.php b/Controller/Checkout/Finish.php index 293ce39a..f70f7ded 100644 --- a/Controller/Checkout/Finish.php +++ b/Controller/Checkout/Finish.php @@ -152,23 +152,23 @@ public function execute() $multiShipFinish = is_array($orderIds); try { - if ($magOrderId == 'fc') { - if($bSuccess){ + if ($magOrderId == 'fc') { + if ($bSuccess) { $resultRedirect->setPath(Config::FINISH_PAY_FC, ['_query' => ['utm_nooverride' => '1']]); - } elseif($bPending){ + } elseif ($bPending) { $resultRedirect->setPath(Config::PENDING_PAY, ['_query' => ['utm_nooverride' => '1']]); } else { $resultRedirect->setPath(Config::CANCEL_PAY, ['_query' => ['utm_nooverride' => '1']]); } - if($bSuccess || $bPending){ + if ($bSuccess || $bPending) { $session = $this->checkoutSession; $quote = $session->getQuote(); $quote->setIsActive(false); $this->quoteRepository->save($quote); } - - return $resultRedirect; + + return $resultRedirect; } $this->checkEmpty($magOrderId, 'magOrderId', 1012); $order = $this->orderRepository->get($magOrderId); diff --git a/Model/OrderCreateResponse.php b/Model/OrderCreateResponse.php index 115807d4..5c6f4323 100644 --- a/Model/OrderCreateResponse.php +++ b/Model/OrderCreateResponse.php @@ -19,6 +19,7 @@ public function getLinks() /** * @param mixed $links + * @return void */ public function setLinks($links) { @@ -26,8 +27,9 @@ public function setLinks($links) } /** - * @param $transactionId + * @param string $transactionId * @return void + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ public function setTransactionId($transactionId) { @@ -52,6 +54,8 @@ public function getRedirectUrl() /** * @param mixed $redirectUrl + * @return void + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ public function setRedirectUrl($redirectUrl) { @@ -68,6 +72,8 @@ public function getPaymentReference() /** * @param mixed $paymentReference + * @return void + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ public function setPaymentReference($paymentReference) { diff --git a/Model/PayPaymentCreate.php b/Model/PayPaymentCreate.php index f28c8954..8c4405fe 100644 --- a/Model/PayPaymentCreate.php +++ b/Model/PayPaymentCreate.php @@ -87,7 +87,7 @@ class PayPaymentCreate private $order; /** - * @param Order $order + * @param null|Order $order * @param PaymentMethod $methodInstance * @throws \Exception */ @@ -99,7 +99,7 @@ public function __construct(null|Order $order, PaymentMethod $methodInstance) $this->scopeConfig = $methodInstance->getScopeConfig(); $finishUrl = $exchangeUrl = ''; - if($order instanceof Order) { + if ($order instanceof Order) { $this->order = $order; $this->orderId = $order->getIncrementId(); $this->additionalData = $order->getPayment()->getAdditionalInformation(); @@ -196,7 +196,6 @@ public function setFinishURL(string $finishUrl) } /** - * @param string $finishUrl * @return $this */ public function getFinishURL() diff --git a/Model/PayPaymentCreateFastCheckout.php b/Model/PayPaymentCreateFastCheckout.php index 7e4c6508..29562378 100644 --- a/Model/PayPaymentCreateFastCheckout.php +++ b/Model/PayPaymentCreateFastCheckout.php @@ -22,11 +22,12 @@ class PayPaymentCreateFastCheckout extends PayPaymentCreate private $reference = ''; /** - * @param $methodInstance - * @param $amount Amount to start fastCheckout with - * @param $products Procucts to buy with fastCheckout - * @param $baseUrl + * @param \Paynl\Payment\Model\Paymentmethod\Paymentmethod $methodInstance + * @param string $amount Amount to start fastCheckout with + * @param array $products Procucts to buy with fastCheckout + * @param string $baseUrl * @throws \Exception + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ public function __construct($methodInstance, $amount, $products, $baseUrl, $quoteId, $currency) { @@ -44,8 +45,9 @@ public function __construct($methodInstance, $amount, $products, $baseUrl, $quot } /** - * @param $products + * @param array $products * @return void + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ public function setProducts($products) { @@ -101,12 +103,13 @@ public function getData() } /** - * @param $returnArr - * @param $field - * @param $value + * @param array $returnArr + * @param string $field + * @param string $value * @return void + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ - private function _add(&$returnArr, $field, $value) + private function _add(&$returnArr, $field, $value) // phpcs:ignore { if (!empty($value)) { $returnArr = array_merge($returnArr, [$field => $value]); @@ -165,13 +168,14 @@ public function create(): OrderCreateResponse } /** - * @param $requestUrl - * @param $payload - * @param $tokenCode - * @param $apiToken - * @param $method + * @param string $requestUrl + * @param string $payload + * @param string $tokenCode + * @param string $apiToken + * @param string $method * @return array * @throws \Exception + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ public function sendCurlRequest($requestUrl, $payload, $tokenCode, $apiToken, $method = 'POST') { @@ -179,7 +183,8 @@ public function sendCurlRequest($requestUrl, $payload, $tokenCode, $apiToken, $m $curl = curl_init(); curl_setopt_array( - $curl, [ + $curl, + [ CURLOPT_URL => $requestUrl, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", diff --git a/Model/PayPaymentProcessFastCheckout.php b/Model/PayPaymentProcessFastCheckout.php index 33513f94..d962c6d4 100644 --- a/Model/PayPaymentProcessFastCheckout.php +++ b/Model/PayPaymentProcessFastCheckout.php @@ -60,6 +60,17 @@ class PayPaymentProcessFastCheckout */ protected $orderRepository; + /** + * @param Context $context + * @param PageFactory $pageFactory + * @param StoreManagerInterface $storeManager + * @param QuoteFactory $quote + * @param QuoteManagement $quoteManagement + * @param CustomerFactory $customerFactory + * @param CustomerRepositoryInterface $customerRepository + * @param OrderFactory $orderFactory + * @param PayHelper $payHelper + */ public function __construct( Context $context, PageFactory $pageFactory, @@ -84,6 +95,7 @@ public function __construct( /** * @param array $params * @return Order + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ public function processFastCheckout($params) { @@ -190,5 +202,4 @@ public function processFastCheckout($params) return $order; } - } From 76e569abb85859516f0b58da525bd09964c5e52e Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:44:31 +0200 Subject: [PATCH 06/47] Code Polish --- Controller/Checkout/FastCheckoutStart.php | 2 +- Model/OrderCreateResponse.php | 1 + Model/PayPaymentCreateFastCheckout.php | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index 2ea1daec..775ad944 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -179,7 +179,7 @@ private function getProducts() 'price' => $this->cart->getQuote()->getShippingAddress()->getShippingAmount() * 100, 'currecny' => $this->storeManager->getStore()->getCurrentCurrencyCode(), 'type' => \Paynl\Transaction::PRODUCT_TYPE_SHIPPING, - 'vatPercentage' => ($this->cart->getQuote()->getShippingAddress()->getBaseShippingInclTax() - $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount()) / $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount() * 100, + 'vatPercentage' => ($this->cart->getQuote()->getShippingAddress()->getBaseShippingInclTax() - $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount()) / $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount() * 100, // phpcs:ignore ]; } diff --git a/Model/OrderCreateResponse.php b/Model/OrderCreateResponse.php index 5c6f4323..d8233775 100644 --- a/Model/OrderCreateResponse.php +++ b/Model/OrderCreateResponse.php @@ -20,6 +20,7 @@ public function getLinks() /** * @param mixed $links * @return void + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ public function setLinks($links) { diff --git a/Model/PayPaymentCreateFastCheckout.php b/Model/PayPaymentCreateFastCheckout.php index 29562378..754564ee 100644 --- a/Model/PayPaymentCreateFastCheckout.php +++ b/Model/PayPaymentCreateFastCheckout.php @@ -26,6 +26,8 @@ class PayPaymentCreateFastCheckout extends PayPaymentCreate * @param string $amount Amount to start fastCheckout with * @param array $products Procucts to buy with fastCheckout * @param string $baseUrl + * @param string $quoteId + * @param string $currency * @throws \Exception * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ @@ -37,7 +39,7 @@ public function __construct($methodInstance, $amount, $products, $baseUrl, $quot $exchangeUrl = $baseUrl . 'paynl/checkout/exchange/'; $fastCheckout->setAmount($amount); - $fastCheckout->setCurrency('EUR'); + $fastCheckout->setCurrency($currency); $fastCheckout->setFinishURL($finishUrl); $fastCheckout->setExchangeURL($exchangeUrl); $fastCheckout->setProducts($products); From b9508a06ad80166189a223a54f07c60e54a9a4ee Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Tue, 30 Jul 2024 16:41:02 +0200 Subject: [PATCH 07/47] Requested changes --- Block/Checkout/FastCheckout.php | 13 ---- Controller/Checkout/Exchange.php | 32 ++++---- Controller/Checkout/FastCheckoutStart.php | 27 +++---- Model/Config/Source/ActiveShippingMethods.php | 75 +++++++++++++++++++ Model/PayPaymentCreate.php | 3 +- Model/PayPaymentCreateFastCheckout.php | 2 +- ... => PayPaymentCreateFastCheckoutOrder.php} | 25 +------ etc/adminhtml/paymentmethods/ideal.xml | 2 +- 8 files changed, 110 insertions(+), 69 deletions(-) create mode 100644 Model/Config/Source/ActiveShippingMethods.php rename Model/{PayPaymentProcessFastCheckout.php => PayPaymentCreateFastCheckoutOrder.php} (91%) diff --git a/Block/Checkout/FastCheckout.php b/Block/Checkout/FastCheckout.php index c45affc4..45ed5940 100644 --- a/Block/Checkout/FastCheckout.php +++ b/Block/Checkout/FastCheckout.php @@ -4,33 +4,20 @@ use Magento\Catalog\Block\Product\Context; use Magento\Catalog\Block\Product\ProductList\Item\Block; -use Magento\Framework\Url\Helper\Data as UrlHelper; use Magento\Framework\View\Page\Config; -use Magento\Store\Model\Store; class FastCheckout extends Block { /** - * @var UrlHelper - */ - protected $urlHelper; - - /** - * ListProduct constructor. * @param Context $context - * @param UrlHelper $urlHelper * @param Config $page - * @param Store $store * @param array $data */ public function __construct( Context $context, - UrlHelper $urlHelper, Config $page, - Store $store, array $data = [] ) { - $this->urlHelper = $urlHelper; $page->addPageAsset('Paynl_Payment::css/payFastCheckout.css'); parent::__construct($context, $data); } diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index 5d49899d..e7777918 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -2,15 +2,15 @@ namespace Paynl\Payment\Controller\Checkout; -use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; +use Magento\Framework\App\Request\InvalidRequestException; use Magento\Sales\Model\Order; use Magento\Sales\Model\OrderRepository; use Paynl\Payment\Controller\CsrfAwareActionInterface; use Paynl\Payment\Controller\PayAction; use Paynl\Payment\Helper\PayHelper; use Paynl\Payment\Model\PayPayment; -use Paynl\Payment\Model\PayPaymentProcessFastCheckout; +use Paynl\Payment\Model\PayPaymentCreateFastCheckoutOrder; use Paynl\Transaction; class Exchange extends PayAction implements CsrfAwareActionInterface @@ -36,9 +36,9 @@ class Exchange extends PayAction implements CsrfAwareActionInterface private $payPayment; /** - * @var PayPaymentProcessFastCheckout + * @var PayPaymentCreateFastCheckoutOrder */ - private $payPaymentProcessFastCheckout; + private $payPaymentCreateFastCheckoutOrder; /** * @@ -76,7 +76,7 @@ public function validateForCsrf(RequestInterface $request): bool * @param \Magento\Framework\Controller\Result\Raw $result * @param OrderRepository $orderRepository * @param PayPayment $payPayment - * @param PayPaymentProcessFastCheckout $payPaymentProcessFastCheckout + * @param PayPaymentCreateFastCheckoutOrder $payPaymentCreateFastCheckoutOrder * @param PayHelper $payHelper */ public function __construct( @@ -85,19 +85,18 @@ public function __construct( \Magento\Framework\Controller\Result\Raw $result, OrderRepository $orderRepository, PayPayment $payPayment, - PayPaymentProcessFastCheckout $payPaymentProcessFastCheckout, + PayPaymentCreateFastCheckoutOrder $payPaymentCreateFastCheckoutOrder, PayHelper $payHelper ) { $this->result = $result; $this->config = $config; $this->orderRepository = $orderRepository; $this->payPayment = $payPayment; - $this->payPaymentProcessFastCheckout = $payPaymentProcessFastCheckout; + $this->payPaymentCreateFastCheckoutOrder = $payPaymentCreateFastCheckoutOrder; $this->payHelper = $payHelper; parent::__construct($context); } - /** * @return array|false */ @@ -140,7 +139,7 @@ private function getPayLoad($_request) } else { # TGU if ($_request->isGet() || !$this->isSignExchange()) { - $data['object'] = $request->object; + $data['object'] = $request->object ?? null; } else { $rawBody = file_get_contents('php://input'); $data = json_decode($rawBody, true, 512, 4194304); @@ -169,7 +168,7 @@ private function getPayLoad($_request) 'internalStateId' => $internalStateId ?? null, 'internalStateName' => $internalStateName ?? null, 'checkoutData' => $checkoutData ?? null, - 'orgData' => $data + 'orgData' => $data, ]; } @@ -180,7 +179,7 @@ private function getPayLoad($_request) */ private function isFastCheckout($params) { - return str_contains($params['orderId'], 'fastcheckout') && !empty($params['checkoutData'] ?? ''); + return strpos($params['orderId'], "fastcheckout") !== false && !empty($params['checkoutData'] ?? ''); } /** @@ -189,10 +188,10 @@ private function isFastCheckout($params) public function execute() { $params = $this->getPayLoad($this->getRequest()); - $action = !empty($params['action']) ? strtolower($params['action']) : ''; - $payOrderId = isset($params['payOrderId']) ? $params['payOrderId'] : null; - $orderEntityId = isset($params['orderId']) ? $params['orderId'] : null; - $paymentProfileId = isset($params['paymentProfile']) ? $params['paymentProfile'] : null; + $action = strtolower($params['action'] ?? ''); + $payOrderId = $params['payOrderId'] ?? null; + $orderEntityId = $params['orderId'] ?? null; + $paymentProfileId = $params['paymentProfile'] ?? null; $order = null; if ($action == 'pending') { @@ -201,8 +200,7 @@ public function execute() if ($this->isFastCheckout($params)) { try { - $checkoutData = $params['checkoutData']; - $order = $this->payPaymentProcessFastCheckout->processFastCheckout($params); + $order = $this->payPaymentCreateFastCheckoutOrder->create($params); } catch (\Exception $e) { $this->payHelper->logCritical($e, $params); return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index 775ad944..3b427281 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -6,8 +6,6 @@ use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Model\CustomerFactory; use Magento\Framework\App\Action\Context; -use Magento\Framework\App\ResourceConnection; -use Magento\Framework\HTTP\PhpEnvironment\RemoteAddress; use Magento\Payment\Helper\Data as PaymentHelper; use Magento\Store\Model\StoreManagerInterface; use Paynl\Payment\Helper\PayHelper; @@ -51,8 +49,6 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action /** * @param Context $context * @param Cart $cart - * @param ResourceConnection $resource - * @param RemoteAddress $remoteAddress * @param PaymentHelper $paymentHelper * @param PayHelper $payHelper * @param StoreManagerInterface $storeManager @@ -62,8 +58,6 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action public function __construct( Context $context, Cart $cart, - ResourceConnection $resource, - RemoteAddress $remoteAddress, PaymentHelper $paymentHelper, PayHelper $payHelper, StoreManagerInterface $storeManager, @@ -71,8 +65,6 @@ public function __construct( CustomerRepositoryInterface $customerRepository ) { $this->cart = $cart; - $this->remoteAddress = $remoteAddress; - $this->resource = $resource; $this->paymentHelper = $paymentHelper; $this->storeManager = $storeManager; $this->payHelper = $payHelper; @@ -179,7 +171,7 @@ private function getProducts() 'price' => $this->cart->getQuote()->getShippingAddress()->getShippingAmount() * 100, 'currecny' => $this->storeManager->getStore()->getCurrentCurrencyCode(), 'type' => \Paynl\Transaction::PRODUCT_TYPE_SHIPPING, - 'vatPercentage' => ($this->cart->getQuote()->getShippingAddress()->getBaseShippingInclTax() - $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount()) / $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount() * 100, // phpcs:ignore + 'vatPercentage' => ($this->cart->getQuote()->getShippingAddress()->getBaseShippingInclTax() - $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount()) / $this->cart->getQuote()->getShippingAddress()->getBaseShippingAmount() * 100, // phpcs:ignore ]; } @@ -191,15 +183,20 @@ private function getProducts() */ public function execute() { - $methodInstance = $this->paymentHelper->getMethodInstance('paynl_payment_ideal'); + try { + $methodInstance = $this->paymentHelper->getMethodInstance('paynl_payment_ideal'); + + $store = $this->storeManager->getStore(); + if (empty($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'))) { + throw new \Exception('No shipping method selected', FastCheckoutStart::FC_GENERAL_ERROR); + } - $quote = $this->cart->getQuote(); - $this->quoteSetDummyData($quote); + $quote = $this->cart->getQuote(); + $this->quoteSetDummyData($quote); - $arrProducts = $this->getProducts(); + $arrProducts = $this->getProducts(); + $fcAmount = $this->cart->getQuote()->getGrandTotal(); - $fcAmount = $this->cart->getQuote()->getGrandTotal(); - try { if (empty($fcAmount)) { throw new \Exception('empty amount', FastCheckoutStart::FC_EMPTY_BASKET); } diff --git a/Model/Config/Source/ActiveShippingMethods.php b/Model/Config/Source/ActiveShippingMethods.php new file mode 100644 index 00000000..9bd0df9a --- /dev/null +++ b/Model/Config/Source/ActiveShippingMethods.php @@ -0,0 +1,75 @@ +shipconfig = $shipconfig; + $this->scopeConfig = $scopeConfig; + } + + /** + * Options getter + * + * @return array + */ + public function toOptionArray() + { + $arrOptions = $this->getShippingMethods(); + + $arrResult = []; + foreach ($arrOptions as $value => $label) { + $arrResult[] = ['value' => $value, 'label' => $label]; + } + return $arrResult; + } + + /** + * Get options in "key-value" format + * + * @return array + */ + public function getShippingMethods() + { + $methods = []; + $activeCarriers = $this->shipconfig->getActiveCarriers(); + foreach ($activeCarriers as $carrierCode => $carrierModel) { + + if ($carrierMethods = $carrierModel->getAllowedMethods()) { + foreach ($carrierMethods as $methodCode => $method) { + $code = $carrierCode . '_' . $methodCode; + } + $carrierTitle = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/title'); + $carrierName = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/name'); + } + + $methods[$code] = '[' . $carrierTitle . '] ' . $carrierName; + } + + return $methods; + } +} diff --git a/Model/PayPaymentCreate.php b/Model/PayPaymentCreate.php index 8c4405fe..ebd0a791 100644 --- a/Model/PayPaymentCreate.php +++ b/Model/PayPaymentCreate.php @@ -90,8 +90,9 @@ class PayPaymentCreate * @param null|Order $order * @param PaymentMethod $methodInstance * @throws \Exception + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ - public function __construct(null|Order $order, PaymentMethod $methodInstance) + public function __construct($order, PaymentMethod $methodInstance) { $this->methodInstance = $methodInstance; $this->payConfig = $methodInstance->paynlConfig; diff --git a/Model/PayPaymentCreateFastCheckout.php b/Model/PayPaymentCreateFastCheckout.php index 754564ee..6b40f409 100644 --- a/Model/PayPaymentCreateFastCheckout.php +++ b/Model/PayPaymentCreateFastCheckout.php @@ -76,7 +76,7 @@ public function getData() $this->_add($parameters, 'reference', $this->reference); $this->_add($parameters, 'exchangeUrl', $this->paymentData['exchangeURL']); - $parameters['integration']['test'] = /*$this->testMode === */true; + $parameters['integration']['test'] = $this->testMode; $optimize['flow'] = 'fastCheckout'; $optimize['shippingAddress'] = true; diff --git a/Model/PayPaymentProcessFastCheckout.php b/Model/PayPaymentCreateFastCheckoutOrder.php similarity index 91% rename from Model/PayPaymentProcessFastCheckout.php rename to Model/PayPaymentCreateFastCheckoutOrder.php index d962c6d4..d382f28f 100644 --- a/Model/PayPaymentProcessFastCheckout.php +++ b/Model/PayPaymentCreateFastCheckoutOrder.php @@ -4,21 +4,14 @@ use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Model\CustomerFactory; -use Magento\Framework\App\Action\Context; -use Magento\Framework\View\Result\PageFactory; use Magento\Quote\Model\QuoteFactory; use Magento\Quote\Model\QuoteManagement; use Magento\Sales\Model\OrderFactory; use Magento\Store\Model\StoreManagerInterface; use Paynl\Payment\Helper\PayHelper; -use Paynl\Payment\Model\Config; -class PayPaymentProcessFastCheckout +class PayPaymentCreateFastCheckoutOrder { - /** - * @var Config - */ - protected $pageFactory; /** * @var StoreManagerInterface @@ -50,30 +43,20 @@ class PayPaymentProcessFastCheckout */ protected $orderFactory; - /** - * @var PayHelper - */ - protected $payHelper; - /** * @var OrderRepositoryInterface */ protected $orderRepository; /** - * @param Context $context - * @param PageFactory $pageFactory * @param StoreManagerInterface $storeManager * @param QuoteFactory $quote * @param QuoteManagement $quoteManagement * @param CustomerFactory $customerFactory * @param CustomerRepositoryInterface $customerRepository * @param OrderFactory $orderFactory - * @param PayHelper $payHelper */ public function __construct( - Context $context, - PageFactory $pageFactory, StoreManagerInterface $storeManager, QuoteFactory $quote, QuoteManagement $quoteManagement, @@ -82,14 +65,12 @@ public function __construct( OrderFactory $orderFactory, PayHelper $payHelper ) { - $this->pageFactory = $pageFactory; $this->storeManager = $storeManager; $this->quote = $quote; $this->quoteManagement = $quoteManagement; $this->customerFactory = $customerFactory; $this->customerRepository = $customerRepository; $this->orderFactory = $orderFactory; - $this->payHelper = $payHelper; } /** @@ -97,7 +78,7 @@ public function __construct( * @return Order * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ - public function processFastCheckout($params) + public function create($params) { $checkoutData = $params['checkoutData']; @@ -200,6 +181,8 @@ public function processFastCheckout($params) $order->getPayment()->setAdditionalInformation($additionalData); $order->save(); + $order->addStatusHistoryComment(__('PAY. - Fast checkout order created'))->save(); + return $order; } } diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 2c4ec4db..6c01b1ce 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -164,7 +164,7 @@ Business, BB2: Only show this payment method when the customer entered a company showInWebsite="1" showInStore="1"> - Magento\Shipping\Model\Config\Source\Allmethods + Paynl\Payment\Model\Config\Source\ActiveShippingMethods payment/paynl_payment_ideal/fast_checkout_shipping 1 From 3c9a3367e1a193a5a3a2e621113ab4e34362b042 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Tue, 30 Jul 2024 16:44:37 +0200 Subject: [PATCH 08/47] Code Polish --- Model/Config/Source/ActiveShippingMethods.php | 2 -- Model/PayPaymentCreateFastCheckoutOrder.php | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Model/Config/Source/ActiveShippingMethods.php b/Model/Config/Source/ActiveShippingMethods.php index 9bd0df9a..85c6b021 100644 --- a/Model/Config/Source/ActiveShippingMethods.php +++ b/Model/Config/Source/ActiveShippingMethods.php @@ -8,7 +8,6 @@ class ActiveShippingMethods implements ArrayInterface { - /** * @var Config */ @@ -58,7 +57,6 @@ public function getShippingMethods() $methods = []; $activeCarriers = $this->shipconfig->getActiveCarriers(); foreach ($activeCarriers as $carrierCode => $carrierModel) { - if ($carrierMethods = $carrierModel->getAllowedMethods()) { foreach ($carrierMethods as $methodCode => $method) { $code = $carrierCode . '_' . $methodCode; diff --git a/Model/PayPaymentCreateFastCheckoutOrder.php b/Model/PayPaymentCreateFastCheckoutOrder.php index d382f28f..59e89156 100644 --- a/Model/PayPaymentCreateFastCheckoutOrder.php +++ b/Model/PayPaymentCreateFastCheckoutOrder.php @@ -8,11 +8,9 @@ use Magento\Quote\Model\QuoteManagement; use Magento\Sales\Model\OrderFactory; use Magento\Store\Model\StoreManagerInterface; -use Paynl\Payment\Helper\PayHelper; class PayPaymentCreateFastCheckoutOrder { - /** * @var StoreManagerInterface */ @@ -62,8 +60,7 @@ public function __construct( QuoteManagement $quoteManagement, CustomerFactory $customerFactory, CustomerRepositoryInterface $customerRepository, - OrderFactory $orderFactory, - PayHelper $payHelper + OrderFactory $orderFactory ) { $this->storeManager = $storeManager; $this->quote = $quote; From f7c89c13f435aed6b022343a0d76e1f1d1fcea88 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:32:02 +0200 Subject: [PATCH 09/47] Fix live transaction --- Model/PayPaymentCreateFastCheckout.php | 2 +- Model/PayPaymentCreateFastCheckoutOrder.php | 22 ++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Model/PayPaymentCreateFastCheckout.php b/Model/PayPaymentCreateFastCheckout.php index 6b40f409..a8381f67 100644 --- a/Model/PayPaymentCreateFastCheckout.php +++ b/Model/PayPaymentCreateFastCheckout.php @@ -81,7 +81,7 @@ public function getData() $optimize['flow'] = 'fastCheckout'; $optimize['shippingAddress'] = true; $optimize['billingAddress'] = true; - $optimize['contactDetails'] = ''; + $optimize['contactDetails'] = true; $this->_add($parameters, 'optimize', $optimize); diff --git a/Model/PayPaymentCreateFastCheckoutOrder.php b/Model/PayPaymentCreateFastCheckoutOrder.php index 59e89156..47d75654 100644 --- a/Model/PayPaymentCreateFastCheckoutOrder.php +++ b/Model/PayPaymentCreateFastCheckoutOrder.php @@ -79,9 +79,13 @@ public function create($params) { $checkoutData = $params['checkoutData']; - $customerData = $checkoutData['customer']; - $billingAddressData = $checkoutData['billingAddress']; - $shippingAddressData = $checkoutData['shippingAddress']; + $customerData = $checkoutData['customer'] ?? null; + $billingAddressData = $checkoutData['billingAddress'] ?? null; + $shippingAddressData = $checkoutData['shippingAddress'] ?? null; + + if (empty($customerData) || empty($billingAddressData) || empty($shippingAddressData)) { + throw new \Exception("Missing data, cannot create order."); + } $payOrderId = $params['payOrderId']; @@ -117,14 +121,14 @@ public function create($params) $billingAddress = $quote->getBillingAddress()->addData(array( 'customer_address_id' => '', 'prefix' => '', - 'firstname' => $customerData['firstName'], + 'firstname' => $billingAddressData['firstName'] ?? $customerData['firstName'], 'middlename' => '', - 'lastname' => $customerData['lastName'], + 'lastname' => $billingAddressData['lastName'] ?? $customerData['lastName'], 'suffix' => '', 'company' => $customerData['company'] ?? '', 'street' => array( '0' => $billingAddressData['streetName'], - '1' => $billingAddressData['streetNumber'] . $billingAddressData['streetNumberAddition'], + '1' => $billingAddressData['streetNumber'] . ($billingAddressData['streetNumberAddition'] ?? ''), ), 'city' => $billingAddressData['city'], 'country_id' => $billingAddressData['countryCode'], @@ -139,14 +143,14 @@ public function create($params) $shippingAddress = $quote->getShippingAddress()->addData(array( 'customer_address_id' => '', 'prefix' => '', - 'firstname' => $customerData['firstName'], + 'firstname' => $shippingAddressData['firstName'] ?? $customerData['firstName'], 'middlename' => '', - 'lastname' => $customerData['lastName'], + 'lastname' => $shippingAddressData['lastName'] ?? $customerData['lastName'], 'suffix' => '', 'company' => $customerData['company'] ?? '', 'street' => array( '0' => $shippingAddressData['streetName'], - '1' => $shippingAddressData['streetNumber'] . $shippingAddressData['streetNumberAddition'], + '1' => $shippingAddressData['streetNumber'] . ($shippingAddressData['streetNumberAddition'] ?? ''), ), 'city' => $shippingAddressData['city'], 'country_id' => $shippingAddressData['countryCode'], From 85d7a6cc4964841d9c98e706644257eafdb9ae1a Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:35:01 +0200 Subject: [PATCH 10/47] Update with requested improvements --- Block/Adminhtml/Render/CacheButton.php | 48 ++++++++ Controller/Checkout/FastCheckoutProduct.php | 115 ++++++++++++++++++ Controller/Checkout/FastCheckoutStart.php | 63 +++++----- Controller/Checkout/Finish.php | 15 ++- Model/PayPaymentCreateFastCheckoutOrder.php | 32 ++++- etc/adminhtml/paymentmethods/ideal.xml | 66 ++++++---- view/adminhtml/web/css/configtab.css | 13 +- view/frontend/layout/catalog_product_view.xml | 18 +++ view/frontend/layout/checkout_cart_index.xml | 2 +- .../templates/pay_fast_checkout_cart.phtml | 4 +- .../templates/pay_fast_checkout_product.phtml | 13 ++ view/frontend/templates/pay_finish_fc.phtml | 2 +- view/frontend/web/css/payFastCheckout.css | 10 +- .../web/js/fast-checkout-product-view.js | 17 +++ view/frontend/web/js/reloadCart.js | 12 ++ 15 files changed, 360 insertions(+), 70 deletions(-) create mode 100644 Block/Adminhtml/Render/CacheButton.php create mode 100644 Controller/Checkout/FastCheckoutProduct.php create mode 100644 view/frontend/layout/catalog_product_view.xml create mode 100644 view/frontend/templates/pay_fast_checkout_product.phtml create mode 100644 view/frontend/web/js/fast-checkout-product-view.js create mode 100644 view/frontend/web/js/reloadCart.js diff --git a/Block/Adminhtml/Render/CacheButton.php b/Block/Adminhtml/Render/CacheButton.php new file mode 100644 index 00000000..d9521eb2 --- /dev/null +++ b/Block/Adminhtml/Render/CacheButton.php @@ -0,0 +1,48 @@ +urlInterface = $urlInterface; + parent::__construct($context); + } + + /** + * Render block: extension version + * + * @param AbstractElement $element + * + * @return string + */ + public function render(AbstractElement $element) + { + $currentUrl = $this->urlInterface->getCurrentUrl(); + $payUrl = str_replace("system_config/edit/section/paynl_paymentmethods", "cache", $currentUrl); + + $text = __('After enabling fast checkout on product page please flush the cache') . ' ' . __('here') . '.'; + $html = ''; + $html .= '' . $text . ''; + $html .= ''; + return $html; + } +} diff --git a/Controller/Checkout/FastCheckoutProduct.php b/Controller/Checkout/FastCheckoutProduct.php new file mode 100644 index 00000000..6f812ce1 --- /dev/null +++ b/Controller/Checkout/FastCheckoutProduct.php @@ -0,0 +1,115 @@ +resolverInterface = $resolverInterface; + $this->payHelper = $payHelper; + + return parent::__construct( + $context, + $scopeConfig, + $checkoutSession, + $storeManager, + $formKeyValidator, + $cart, + $productRepository, + $quantityProcessor + ); + } + + /** + * Add product to shopping cart action + * + * @return \Magento\Framework\Controller\Result\Redirect + */ + public function execute() + { + try { + if (!$this->_formKeyValidator->validate($this->getRequest())) { + throw new \Exception("Session has expired"); + } + + $params = $this->getRequest()->getParams(); + + if (isset($params['qty'])) { + $filter = new LocalizedToNormalized( + ['locale' => $this->resolverInterface->getLocale()] + ); + $params['qty'] = $filter->filter($params['qty']); + } + + $product = $this->_initProduct(); + $related = $this->getRequest()->getParam('related_product'); + + if (!$product) { + throw new \Exception("Product not found"); + } + + $this->cart->addProduct($product, $params); + if (!empty($related)) { + $this->cart->addProductsByIds(explode(',', $related)); + } + $this->cart->save(); + + $this->_eventManager->dispatch( + 'checkout_cart_add_product_complete', + ['product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse()] + ); + + $baseUrl = $this->_url->getBaseUrl(); + return $this->goBack($baseUrl . 'paynl/checkout/fastcheckoutstart/'); + + } catch (\Magento\Framework\Exception\LocalizedException $e) { + $this->payHelper->logCritical('FC Product ERROR: ' . $e->getMessage(), []); + if ($this->_checkoutSession->getUseNotice(true)) { + $this->messageManager->addNoticeMessage($e->getMessage()); + } + + return $this->goBack(); + } catch (\Exception $e) { + $this->payHelper->logCritical('FC Product ERROR: ' . $e->getMessage(), []); + $this->messageManager->addExceptionMessage($e, __('We can\'t add this item to your shopping cart right now.')); + + return $this->goBack(); + } + } +} diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index 3b427281..80cb93c5 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -7,6 +7,7 @@ use Magento\Customer\Model\CustomerFactory; use Magento\Framework\App\Action\Context; use Magento\Payment\Helper\Data as PaymentHelper; +use Magento\Quote\Api\ShippingMethodManagementInterface; use Magento\Store\Model\StoreManagerInterface; use Paynl\Payment\Helper\PayHelper; use Paynl\Payment\Model\PayPaymentCreateFastCheckout; @@ -46,6 +47,11 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action */ private $customerRepository; + /** + * @var ShippingMethodManagementInterface + */ + private $shippingMethodManagementInterface; + /** * @param Context $context * @param Cart $cart @@ -54,6 +60,7 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action * @param StoreManagerInterface $storeManager * @param CustomerFactory $customerFactory * @param CustomerRepositoryInterface $customerRepository + * @param ShippingMethodManagementInterface $shippingMethodManagementInterface */ public function __construct( Context $context, @@ -62,7 +69,8 @@ public function __construct( PayHelper $payHelper, StoreManagerInterface $storeManager, CustomerFactory $customerFactory, - CustomerRepositoryInterface $customerRepository + CustomerRepositoryInterface $customerRepository, + ShippingMethodManagementInterface $shippingMethodManagementInterface ) { $this->cart = $cart; $this->paymentHelper = $paymentHelper; @@ -70,6 +78,7 @@ public function __construct( $this->payHelper = $payHelper; $this->customerFactory = $customerFactory; $this->customerRepository = $customerRepository; + $this->shippingMethodManagementInterface = $shippingMethodManagementInterface; return parent::__construct($context); } @@ -84,26 +93,6 @@ private function quoteSetDummyData($quote) $store = $this->storeManager->getStore(); $websiteId = $store->getWebsiteId(); - $email = 'fastcheckout@pay.nl'; - $customer = $this->customerFactory->create() - ->setWebsiteId($websiteId) - ->loadByEmail($email); - - if (!$customer->getEntityId()) { - $customer->setWebsiteId($websiteId) - ->setStore($store) - ->setFirstname('firstname') - ->setLastname('lastname') - ->setEmail($email) - ->setPassword($email); - $customer->save(); - } - - $customer = $this->customerRepository->getById($customer->getEntityId()); - - $quote->assignCustomer($customer); - $quote->setSendConfirmation(1); - $dummyData = array( 'customer_address_id' => '', 'prefix' => '', @@ -123,20 +112,35 @@ private function quoteSetDummyData($quote) 'telephone' => 'phone', 'fax' => '', 'vat_id' => '', - 'save_in_address_book' => 0, + 'save_in_address_book' => 1, ); $billingAddress = $quote->getBillingAddress()->addData($dummyData); $shippingAddress = $quote->getShippingAddress()->addData($dummyData); + $quote->save(); + $shippingAddress = $quote->getShippingAddress(); - $shippingAddress->setCollectShippingRates(true)->collectShippingRates()->setShippingMethod($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')); + $shippingAddress->setCollectShippingRates(true)->collectShippingRates(); - $quote->setPaymentMethod('paynl_payment_ideal'); - $quote->setInventoryProcessed(false); - $quote->save(); + $shippingData = $this->shippingMethodManagementInterface->getList($quote->getId()); + $shippingMethodsAvaileble = []; + foreach ($shippingData as $shipping) { + $code = $shipping->getCarrierCode() . '_' . $shipping->getMethodCode(); + $shippingMethodsAvaileble[$code] = $code; + } + + if (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { + $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'); + } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup')])) { + $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup'); + } + + if (empty($shippingMethod)) { + throw new \Exception("No shipping method availeble"); + } - $quote->getPayment()->importData(['method' => 'paynl_payment_ideal']); + $shippingAddress->setShippingMethod($shippingMethod); $quote->collectTotals()->save(); } @@ -213,14 +217,13 @@ public function execute() $this->getResponse()->setNoCacheHeaders(); $this->getResponse()->setRedirect($payTransaction->getRedirectUrl()); } catch (\Exception $e) { - $message = __('Something went wrong, please try again later'); + $message = __('Unfortunately fast checkout is currently not possible.'); if ($e->getCode() == FastCheckoutStart::FC_EMPTY_BASKET) { $message = __('Please put something in the basket'); } else { $this->payHelper->logCritical('FC ERROR: ' . $e->getMessage(), []); } - - $this->messageManager->addExceptionMessage($e, $message); + $this->messageManager->addNoticeMessage($message); $this->_redirect('checkout/cart'); } } diff --git a/Controller/Checkout/Finish.php b/Controller/Checkout/Finish.php index f70f7ded..34be2f0b 100644 --- a/Controller/Checkout/Finish.php +++ b/Controller/Checkout/Finish.php @@ -3,7 +3,6 @@ namespace Paynl\Payment\Controller\Checkout; use Magento\Checkout\Model\Session; -use Magento\Framework\App\Action\Action; use Magento\Framework\App\Action\Context; use Magento\Framework\Event\ManagerInterface; use Magento\Quote\Model\QuoteFactory; @@ -138,8 +137,8 @@ public function execute() $resultRedirect = $this->resultRedirectFactory->create(); $params = $this->getRequest()->getParams(); $payOrderId = empty($params['orderId']) ? (empty($params['orderid']) ? null : $params['orderid']) : $params['orderId']; - $orderStatusId = empty($params['orderStatusId']) ? null : (int)$params['orderStatusId']; - $orderStatusId = (empty($orderStatusId) && !empty($params['statusCode'])) ? (int)$params['statusCode'] : $orderStatusId; + $orderStatusId = empty($params['orderStatusId']) ? null : (int) $params['orderStatusId']; + $orderStatusId = (empty($orderStatusId) && !empty($params['statusCode'])) ? (int) $params['statusCode'] : $orderStatusId; $magOrderId = empty($params['entityid']) ? null : $params['entityid']; $orderIds = empty($params['order_ids']) ? null : $params['order_ids']; $pickupMode = !empty($params['pickup']); @@ -158,14 +157,18 @@ public function execute() } elseif ($bPending) { $resultRedirect->setPath(Config::PENDING_PAY, ['_query' => ['utm_nooverride' => '1']]); } else { - $resultRedirect->setPath(Config::CANCEL_PAY, ['_query' => ['utm_nooverride' => '1']]); + $resultRedirect->setPath('checkout/cart', ['_query' => ['utm_nooverride' => '1']]); } + $session = $this->checkoutSession; + $quote = $session->getQuote(); if ($bSuccess || $bPending) { - $session = $this->checkoutSession; - $quote = $session->getQuote(); $quote->setIsActive(false); $this->quoteRepository->save($quote); + } else { + $quote->setIsActive(true); + $this->quoteRepository->save($quote); + $session->replaceQuote($quote); } return $resultRedirect; diff --git a/Model/PayPaymentCreateFastCheckoutOrder.php b/Model/PayPaymentCreateFastCheckoutOrder.php index 47d75654..b7b7ea69 100644 --- a/Model/PayPaymentCreateFastCheckoutOrder.php +++ b/Model/PayPaymentCreateFastCheckoutOrder.php @@ -4,6 +4,7 @@ use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Model\CustomerFactory; +use Magento\Quote\Api\ShippingMethodManagementInterface; use Magento\Quote\Model\QuoteFactory; use Magento\Quote\Model\QuoteManagement; use Magento\Sales\Model\OrderFactory; @@ -46,6 +47,11 @@ class PayPaymentCreateFastCheckoutOrder */ protected $orderRepository; + /** + * @var ShippingMethodManagementInterface + */ + private $shippingMethodManagementInterface; + /** * @param StoreManagerInterface $storeManager * @param QuoteFactory $quote @@ -53,6 +59,7 @@ class PayPaymentCreateFastCheckoutOrder * @param CustomerFactory $customerFactory * @param CustomerRepositoryInterface $customerRepository * @param OrderFactory $orderFactory + * @param ShippingMethodManagementInterface $shippingMethodManagementInterface */ public function __construct( StoreManagerInterface $storeManager, @@ -60,7 +67,8 @@ public function __construct( QuoteManagement $quoteManagement, CustomerFactory $customerFactory, CustomerRepositoryInterface $customerRepository, - OrderFactory $orderFactory + OrderFactory $orderFactory, + ShippingMethodManagementInterface $shippingMethodManagementInterface ) { $this->storeManager = $storeManager; $this->quote = $quote; @@ -68,6 +76,7 @@ public function __construct( $this->customerFactory = $customerFactory; $this->customerRepository = $customerRepository; $this->orderFactory = $orderFactory; + $this->shippingMethodManagementInterface = $shippingMethodManagementInterface; } /** @@ -163,7 +172,26 @@ public function create($params) )); $shippingAddress = $quote->getShippingAddress(); - $shippingAddress->setCollectShippingRates(true)->collectShippingRates()->setShippingMethod($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')); + $shippingAddress->setCollectShippingRates(true)->collectShippingRates(); + + $shippingData = $this->shippingMethodManagementInterface->getList($quote->getId()); + $shippingMethodsAvailable = []; + foreach ($shippingData as $shipping) { + $code = $shipping->getCarrierCode() . '_' . $shipping->getMethodCode(); + $shippingMethodsAvailable[$code] = $code; + } + + if (!empty($shippingMethodsAvailable[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { + $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'); + } elseif (!empty($shippingMethodsAvailable[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup')])) { + $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup'); + } + + if (empty($shippingMethod)) { + throw new \Exception("No shipping method availeble"); + } + + $shippingAddress->setShippingMethod($shippingMethod); $quote->setPaymentMethod('paynl_payment_ideal'); $quote->setInventoryProcessed(false); diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 6c01b1ce..0a000bce 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -148,29 +148,49 @@ Business, BB2: Only show this payment method when the customer entered a company payment/paynl_payment_ideal/showforgroup - - - - Paynl\Payment\Model\Config\Source\OffOn - payment/paynl_payment_ideal/fast_checkout_enabled - - 1 - - Allows users to checkout directly from the cart without the need to fill in their address. - - - - Paynl\Payment\Model\Config\Source\ActiveShippingMethods - payment/paynl_payment_ideal/fast_checkout_shipping - - 1 - 1 - - + + + + + + Paynl\Payment\Model\Config\Source\OffOn + payment/paynl_payment_ideal/fast_checkout_cart_enabled + + 1 + + Allows users to checkout directly from the cart without the need to fill in their address. + + + + Paynl\Payment\Model\Config\Source\OffOn + payment/paynl_payment_ideal/fast_checkout_product_enabled + + 1 + + Allows users to checkout directly from the product page without the need to fill in their address. + + + + Paynl\Payment\Block\Adminhtml\Render\CacheButton + + + + Paynl\Payment\Model\Config\Source\ActiveShippingMethods + payment/paynl_payment_ideal/fast_checkout_shipping + + 1 + + + + + Paynl\Payment\Model\Config\Source\ActiveShippingMethods + payment/paynl_payment_ideal/fast_checkout_shipping_backup + + 1 + + In case the selected default method is not applicable to the order the backup shiping method will be used. + + + + + + + Paynl\Payment\ViewModel\FastCheckout + + + + + + + Paynl\Payment\ViewModel\FastCheckout + + + + +
\ No newline at end of file diff --git a/view/frontend/layout/checkout_cart_index.xml b/view/frontend/layout/checkout_cart_index.xml index 44b86acc..483a3d86 100644 --- a/view/frontend/layout/checkout_cart_index.xml +++ b/view/frontend/layout/checkout_cart_index.xml @@ -2,7 +2,7 @@ - + Paynl\Payment\ViewModel\FastCheckout diff --git a/view/frontend/templates/pay_fast_checkout_cart.phtml b/view/frontend/templates/pay_fast_checkout_cart.phtml index 34b3a9be..cbc26a46 100644 --- a/view/frontend/templates/pay_fast_checkout_cart.phtml +++ b/view/frontend/templates/pay_fast_checkout_cart.phtml @@ -3,7 +3,7 @@ /** @var \Paynl\Payment\Block\Checkout\FastCheckout $block */ ?> -
+
-
+
\ No newline at end of file diff --git a/view/frontend/templates/pay_fast_checkout_product.phtml b/view/frontend/templates/pay_fast_checkout_product.phtml new file mode 100644 index 00000000..ce00e4b1 --- /dev/null +++ b/view/frontend/templates/pay_fast_checkout_product.phtml @@ -0,0 +1,13 @@ + + + +
+ +
\ No newline at end of file diff --git a/view/frontend/templates/pay_finish_fc.phtml b/view/frontend/templates/pay_finish_fc.phtml index f53999a3..bffd021c 100644 --- a/view/frontend/templates/pay_finish_fc.phtml +++ b/view/frontend/templates/pay_finish_fc.phtml @@ -11,7 +11,7 @@

getAdditionalInfoHtml() ?> -
+
diff --git a/view/frontend/web/css/payFastCheckout.css b/view/frontend/web/css/payFastCheckout.css index e76ced4b..714ab1c6 100644 --- a/view/frontend/web/css/payFastCheckout.css +++ b/view/frontend/web/css/payFastCheckout.css @@ -3,7 +3,15 @@ width: 100%; } +#paynl_fast_checkout_product { + display: block; + margin-bottom: 0; + margin-right: 1%; + width: 49%; +} + #paynl_fast_checkout_cart button, +#paynl_fast_checkout_product button, #top-cart-fast-checkout { width: 100%; line-height: 2.2rem; @@ -16,4 +24,4 @@ background-repeat: no-repeat; background-size: 51px; background-position: 8px center; -} \ No newline at end of file +} diff --git a/view/frontend/web/js/fast-checkout-product-view.js b/view/frontend/web/js/fast-checkout-product-view.js new file mode 100644 index 00000000..6d0bb326 --- /dev/null +++ b/view/frontend/web/js/fast-checkout-product-view.js @@ -0,0 +1,17 @@ +define([ + 'jquery' +], function ($) { + 'use strict'; + + return function (config, element) { + $(element).click(function () { + var form = $(element.form), + baseUrl = form.attr('action'), + fastCheckoutUrl = baseUrl.replace('checkout/cart/add', 'paynl/checkout/fastcheckoutproduct'); + form.attr('action', fastCheckoutUrl); + form.trigger('submit'); + form.attr('action', baseUrl); + return false; + }); + } +}); \ No newline at end of file diff --git a/view/frontend/web/js/reloadCart.js b/view/frontend/web/js/reloadCart.js new file mode 100644 index 00000000..134efb83 --- /dev/null +++ b/view/frontend/web/js/reloadCart.js @@ -0,0 +1,12 @@ +define([ + 'jquery', + 'Magento_Customer/js/customer-data' +], function ($,customerData) { + 'use strict'; + + return function (config, element) { + var sections = ['cart']; + customerData.invalidate(sections); + customerData.reload(sections, true); + } +}); \ No newline at end of file From bed99bfa1d2128310c649aa68c204bef471e0de3 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:39:51 +0200 Subject: [PATCH 11/47] Code Polish --- Controller/Checkout/FastCheckoutProduct.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Controller/Checkout/FastCheckoutProduct.php b/Controller/Checkout/FastCheckoutProduct.php index 6f812ce1..f8b39bae 100644 --- a/Controller/Checkout/FastCheckoutProduct.php +++ b/Controller/Checkout/FastCheckoutProduct.php @@ -28,6 +28,15 @@ class FastCheckoutProduct extends \Magento\Checkout\Controller\Cart\Add /** * @param Context $context + * @param ResolverInterface $resolverInterface + * @param PayHelper $payHelper + * @param ScopeConfigInterface $scopeConfig + * @param Session $checkoutSession + * @param StoreManagerInterface $storeManager + * @param Validator $formKeyValidator + * @param CustomerCart $cart + * @param ProductRepositoryInterface $productRepository + * @param RequestQuantityProcessor $quantityProcessor */ public function __construct( Context $context, @@ -96,8 +105,8 @@ public function execute() ); $baseUrl = $this->_url->getBaseUrl(); - return $this->goBack($baseUrl . 'paynl/checkout/fastcheckoutstart/'); + return $this->goBack($baseUrl . 'paynl/checkout/fastcheckoutstart/'); } catch (\Magento\Framework\Exception\LocalizedException $e) { $this->payHelper->logCritical('FC Product ERROR: ' . $e->getMessage(), []); if ($this->_checkoutSession->getUseNotice(true)) { From 293682339107f70e7ab0c874a00c27d7e48163b3 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:07:36 +0200 Subject: [PATCH 12/47] Add guest checkout only setting --- ViewModel/FastCheckout.php | 30 +++++++++++++++---- etc/adminhtml/paymentmethods/ideal.xml | 6 ++++ .../templates/pay_fast_checkout_cart.phtml | 22 +++++++------- 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/ViewModel/FastCheckout.php b/ViewModel/FastCheckout.php index ae0c5906..5e0b318b 100644 --- a/ViewModel/FastCheckout.php +++ b/ViewModel/FastCheckout.php @@ -2,23 +2,43 @@ namespace Paynl\Payment\ViewModel; -use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\View\Element\Block\ArgumentInterface; +use Magento\Store\Model\StoreManagerInterface; +use Magento\Customer\Model\Session; class FastCheckout implements ArgumentInterface { /** - * @var ScopeConfigInterface + * @var StoreManagerInterface */ - protected $scopeConfig; + protected $storeManager; + + /** + * @var Session + */ + protected $session; /** * BuyNow constructor. * @param ScopeConfigInterface $scopeConfig */ public function __construct( - ScopeConfigInterface $scopeConfig + StoreManagerInterface $storeManager, + Session $session ) { - $this->scopeConfig = $scopeConfig; + $this->storeManager = $storeManager; + $this->session = $session; + } + + /** + * @return string + */ + public function getVisibility() + { + $store = $this->storeManager->getStore(); + if($this->session->isLoggedIn() && $store->getConfig('payment/paynl_payment_ideal/fast_checkout_guest_only') == 1) { + return false; + } + return true; } } diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 0a000bce..a66a6867 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -190,6 +190,12 @@ Business, BB2: Only show this payment method when the customer entered a company In case the selected default method is not applicable to the order the backup shiping method will be used. + + + Paynl\Payment\Block\Adminhtml\Render\Checkbox + payment/paynl_payment_ideal/fast_checkout_guest_only + Only shows the fast checkout button on cart page for guest users. + diff --git a/view/frontend/templates/pay_fast_checkout_cart.phtml b/view/frontend/templates/pay_fast_checkout_cart.phtml index cbc26a46..4c4d5ddf 100644 --- a/view/frontend/templates/pay_fast_checkout_cart.phtml +++ b/view/frontend/templates/pay_fast_checkout_cart.phtml @@ -1,14 +1,16 @@ getViewModel(); ?> - -
-
- -
-
\ No newline at end of file +getVisibility()): ?> +
+
+ +
+
+ \ No newline at end of file From 2bfb3d642d29fb2958530bc682ee42ac0f388539 Mon Sep 17 00:00:00 2001 From: woutse Date: Wed, 7 Aug 2024 11:22:00 +0200 Subject: [PATCH 13/47] Updated texts --- Block/Adminhtml/Render/CacheButton.php | 2 +- etc/adminhtml/paymentmethods/ideal.xml | 34 ++++++++++++++++---------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Block/Adminhtml/Render/CacheButton.php b/Block/Adminhtml/Render/CacheButton.php index d9521eb2..6a32c6f9 100644 --- a/Block/Adminhtml/Render/CacheButton.php +++ b/Block/Adminhtml/Render/CacheButton.php @@ -39,7 +39,7 @@ public function render(AbstractElement $element) $currentUrl = $this->urlInterface->getCurrentUrl(); $payUrl = str_replace("system_config/edit/section/paynl_paymentmethods", "cache", $currentUrl); - $text = __('After enabling fast checkout on product page please flush the cache') . ' ' . __('here') . '.'; + $text = __('When updating this setting, please flush Magento\'s cache afterwards ') . ' ' . __('here') . '.'; $html = ''; $html .= '' . $text . ''; $html .= ''; diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index a66a6867..2a5da955 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -148,53 +148,62 @@ Business, BB2: Only show this payment method when the customer entered a company payment/paynl_payment_ideal/showforgroup - + - + Paynl\Payment\Model\Config\Source\OffOn payment/paynl_payment_ideal/fast_checkout_cart_enabled 1 - Allows users to checkout directly from the cart without the need to fill in their address. + Show the fastcheckout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address. - + Paynl\Payment\Model\Config\Source\OffOn payment/paynl_payment_ideal/fast_checkout_product_enabled 1 - Allows users to checkout directly from the product page without the need to fill in their address. + Show the fastcheckout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address. Paynl\Payment\Block\Adminhtml\Render\CacheButton - + - + Paynl\Payment\Model\Config\Source\ActiveShippingMethods payment/paynl_payment_ideal/fast_checkout_shipping - 1 + 1 + Select the shipping method that should be applied first. - + Paynl\Payment\Model\Config\Source\ActiveShippingMethods payment/paynl_payment_ideal/fast_checkout_shipping_backup - 1 + 1 - In case the selected default method is not applicable to the order the backup shiping method will be used. + Select the fallback shipping method, which will be applied when the default shipping method could not be applied. + In case the priority shipping method could not by applied, this shiping method will be used. Paynl\Payment\Block\Adminhtml\Render\Checkbox payment/paynl_payment_ideal/fast_checkout_guest_only - Only shows the fast checkout button on cart page for guest users. + When enabled, the fastCheckout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fastCheckout is enabled for the product page, the fastCheckout button will always be shown. + Show the fastCheckout button on cart, only for guest customers. @@ -209,4 +218,3 @@ Business, BB2: Only show this payment method when the customer entered a company
- \ No newline at end of file From c59fac388f3d608c0b933e6728420f47975762be Mon Sep 17 00:00:00 2001 From: woutse Date: Wed, 7 Aug 2024 11:24:20 +0200 Subject: [PATCH 14/47] Updated texts --- etc/adminhtml/paymentmethods/ideal.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 2a5da955..4229d078 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -203,7 +203,7 @@ This button allows users to checkout directly from the cart without the need to When enabled, the fastCheckout button will only be shown on the cart page for guest users. This setting does not effect the product page. If fastCheckout is enabled for the product page, the fastCheckout button will always be shown. - Show the fastCheckout button on cart, only for guest customers. + Show the fastCheckout button on the cart page, only for guest customers. From e816a31caa1d27433ddc81fda92b819f81dd96e4 Mon Sep 17 00:00:00 2001 From: woutse Date: Wed, 7 Aug 2024 11:25:28 +0200 Subject: [PATCH 15/47] Updated texts --- etc/adminhtml/paymentmethods/ideal.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 4229d078..87293874 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -194,7 +194,7 @@ This button allows users to checkout directly from the cart without the need to 1 Select the fallback shipping method, which will be applied when the default shipping method could not be applied. - In case the priority shipping method could not by applied, this shiping method will be used. + In case the default shipping method could not by applied, this shiping method will be used. From c0bfbede7c3f061453c1387499a3c325c9a2f14d Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:31:17 +0200 Subject: [PATCH 16/47] Add estimate shipping selection --- Controller/Checkout/FastCheckoutStart.php | 53 ++++++++++--------- Model/PayPaymentCreateFastCheckoutOrder.php | 12 +++-- etc/adminhtml/paymentmethods/ideal.xml | 9 ++++ .../templates/pay_fast_checkout_cart.phtml | 10 ++-- .../web/js/fast-checkout-cart-view.js | 16 ++++++ 5 files changed, 68 insertions(+), 32 deletions(-) create mode 100644 view/frontend/web/js/fast-checkout-cart-view.js diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index 80cb93c5..bfbeeb2d 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -3,8 +3,6 @@ namespace Paynl\Payment\Controller\Checkout; use Magento\Checkout\Model\Cart; -use Magento\Customer\Api\CustomerRepositoryInterface; -use Magento\Customer\Model\CustomerFactory; use Magento\Framework\App\Action\Context; use Magento\Payment\Helper\Data as PaymentHelper; use Magento\Quote\Api\ShippingMethodManagementInterface; @@ -16,6 +14,8 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action { public const FC_GENERAL_ERROR = 8000; public const FC_EMPTY_BASKET = 8005; + public const FC_ESITMATE_ERROR = 8006; + public const FC_SHIPPING_ERROR = 8006; /** * @var Cart @@ -37,16 +37,6 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action */ private $storeManager; - /** - * @var CustomerFactory - */ - private $customerFactory; - - /** - * @var CustomerRepositoryInterface - */ - private $customerRepository; - /** * @var ShippingMethodManagementInterface */ @@ -58,8 +48,6 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action * @param PaymentHelper $paymentHelper * @param PayHelper $payHelper * @param StoreManagerInterface $storeManager - * @param CustomerFactory $customerFactory - * @param CustomerRepositoryInterface $customerRepository * @param ShippingMethodManagementInterface $shippingMethodManagementInterface */ public function __construct( @@ -68,16 +56,12 @@ public function __construct( PaymentHelper $paymentHelper, PayHelper $payHelper, StoreManagerInterface $storeManager, - CustomerFactory $customerFactory, - CustomerRepositoryInterface $customerRepository, ShippingMethodManagementInterface $shippingMethodManagementInterface ) { $this->cart = $cart; $this->paymentHelper = $paymentHelper; $this->storeManager = $storeManager; $this->payHelper = $payHelper; - $this->customerFactory = $customerFactory; - $this->customerRepository = $customerRepository; $this->shippingMethodManagementInterface = $shippingMethodManagementInterface; return parent::__construct($context); @@ -88,7 +72,7 @@ public function __construct( * @return void * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ - private function quoteSetDummyData($quote) + private function quoteSetDummyData($quote, $params) { $store = $this->storeManager->getStore(); $websiteId = $store->getWebsiteId(); @@ -106,9 +90,9 @@ private function quoteSetDummyData($quote) '1' => 'streetnumber', ), 'city' => 'city', - 'country_id' => 'NL', + 'country_id' => $params['selected_estimate_country'] ?? 'NL', 'region' => '', - 'postcode' => '1234AB', + 'postcode' => $params['selected_estimate_zip'] ?? '1234AB', 'telephone' => 'phone', 'fax' => '', 'vat_id' => '', @@ -130,7 +114,15 @@ private function quoteSetDummyData($quote) $shippingMethodsAvaileble[$code] = $code; } - if (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { + if ($store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_estimate_selection') == 2) { + if (empty($shippingMethodsAvaileble[$params['selected_estimate_shipping']])) { + throw new \Exception('Shipping method not availeble', FastCheckoutStart::FC_SHIPPING_ERROR); + } + } + + if (isset($params['selected_estimate_shipping']) && !empty($params['selected_estimate_shipping']) && !empty($shippingMethodsAvaileble[$params['selected_estimate_shipping']]) && $store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_estimate_selection') > 0) { + $shippingMethod = $params['selected_estimate_shipping']; + } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'); } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup')])) { $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup'); @@ -189,14 +181,21 @@ public function execute() { try { $methodInstance = $this->paymentHelper->getMethodInstance('paynl_payment_ideal'); - $store = $this->storeManager->getStore(); - if (empty($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'))) { + $params = $this->getRequest()->getParams(); + + if ($store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_estimate_selection') == 2) { + if (isset($params['selected_estimate_shipping']) && empty($params['selected_estimate_shipping'])) { + throw new \Exception('No estimate shipping method selected', FastCheckoutStart::FC_ESITMATE_ERROR); + } + } + + if (empty($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')) && empty($params['selected_estimate_shipping'])) { throw new \Exception('No shipping method selected', FastCheckoutStart::FC_GENERAL_ERROR); } $quote = $this->cart->getQuote(); - $this->quoteSetDummyData($quote); + $this->quoteSetDummyData($quote, $params); $arrProducts = $this->getProducts(); $fcAmount = $this->cart->getQuote()->getGrandTotal(); @@ -220,6 +219,10 @@ public function execute() $message = __('Unfortunately fast checkout is currently not possible.'); if ($e->getCode() == FastCheckoutStart::FC_EMPTY_BASKET) { $message = __('Please put something in the basket'); + } elseif ($e->getCode() == FastCheckoutStart::FC_ESITMATE_ERROR) { + $message = __('Please select a shipping method from the estimate.'); + } elseif ($e->getCode() == FastCheckoutStart::FC_SHIPPING_ERROR) { + $message = __('Selected shipping method is not available.'); } else { $this->payHelper->logCritical('FC ERROR: ' . $e->getMessage(), []); } diff --git a/Model/PayPaymentCreateFastCheckoutOrder.php b/Model/PayPaymentCreateFastCheckoutOrder.php index b7b7ea69..fbd84362 100644 --- a/Model/PayPaymentCreateFastCheckoutOrder.php +++ b/Model/PayPaymentCreateFastCheckoutOrder.php @@ -104,6 +104,8 @@ public function create($params) $quote = $this->quote->create()->loadByIdWithoutStore($quoteId); $storeId = $quote->getStoreId(); + $shippingMethodQuote = $quote->getShippingAddress()->getShippingMethod(); + $store = $this->storeManager->getStore($storeId); $websiteId = $store->getWebsiteId(); @@ -175,15 +177,17 @@ public function create($params) $shippingAddress->setCollectShippingRates(true)->collectShippingRates(); $shippingData = $this->shippingMethodManagementInterface->getList($quote->getId()); - $shippingMethodsAvailable = []; + $shippingMethodsAvaileble = []; foreach ($shippingData as $shipping) { $code = $shipping->getCarrierCode() . '_' . $shipping->getMethodCode(); - $shippingMethodsAvailable[$code] = $code; + $shippingMethodsAvaileble[$code] = $code; } - if (!empty($shippingMethodsAvailable[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { + if (!empty($shippingMethodsAvaileble[$shippingMethodQuote])) { + $shippingMethod = $shippingMethodQuote; + } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'); - } elseif (!empty($shippingMethodsAvailable[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup')])) { + } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup')])) { $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup'); } diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 87293874..9503932e 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -196,6 +196,15 @@ This button allows users to checkout directly from the cart without the need to Select the fallback shipping method, which will be applied when the default shipping method could not be applied. In case the default shipping method could not by applied, this shiping method will be used. + + + Paynl\Payment\Model\Config\Source\UseEstimate + payment/paynl_payment_ideal/fast_checkout_use_estimate_selection + + 1 + + When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout. + Paynl\Payment\Block\Adminhtml\Render\Checkbox diff --git a/view/frontend/templates/pay_fast_checkout_cart.phtml b/view/frontend/templates/pay_fast_checkout_cart.phtml index 4c4d5ddf..2cca9869 100644 --- a/view/frontend/templates/pay_fast_checkout_cart.phtml +++ b/view/frontend/templates/pay_fast_checkout_cart.phtml @@ -3,12 +3,16 @@ /** @var \Paynl\Payment\Block\Checkout\FastCheckout $block */ $viewModel = $block->getViewModel(); ?> -getVisibility()): ?> +getVisibility()): ?>
-
+ + + +
diff --git a/view/frontend/web/js/fast-checkout-cart-view.js b/view/frontend/web/js/fast-checkout-cart-view.js new file mode 100644 index 00000000..cb9648d9 --- /dev/null +++ b/view/frontend/web/js/fast-checkout-cart-view.js @@ -0,0 +1,16 @@ +define([ + 'jquery' +], function ($) { + 'use strict'; + + return function (config, element) { + $(element).click(function () { + var form = $(element.form); + $('#selected_estimate_shipping').val($('#co-shipping-method-form input:checked').val()); + $('#selected_estimate_country').val($('select[name="country_id"]').val()); + $('#selected_estimate_zip').val($('input[name="postcode"]').val()); + form.trigger('submit'); + return false; + }); + } +}); \ No newline at end of file From 04f75eeef532c814f0ba62f3ad117a4ba8b39121 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Thu, 8 Aug 2024 09:18:29 +0200 Subject: [PATCH 17/47] Add config file --- Model/Config/Source/UseEstimate.php | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Model/Config/Source/UseEstimate.php diff --git a/Model/Config/Source/UseEstimate.php b/Model/Config/Source/UseEstimate.php new file mode 100644 index 00000000..842f1da3 --- /dev/null +++ b/Model/Config/Source/UseEstimate.php @@ -0,0 +1,38 @@ +toArray(); + + $arrResult = []; + foreach ($arrOptions as $value => $label) { + $arrResult[] = ['value' => $value, 'label' => $label]; + } + return $arrResult; + } + + /** + * Get options in "key-value" format + * + * @return array + */ + public function toArray() + { + return [ + 0 => __('Off'), + 1 => __('On - as Optional'), + 2 => __('On - as Required') + ]; + } +} From 0dd596118354789ccd2e097e3f29ecb4b9a01b08 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:46:24 +0200 Subject: [PATCH 18/47] Add fallback setting --- Block/Page/FastCheckoutFallback.php | 106 ++++++++++++++++++ Controller/Checkout/FastCheckoutFallback.php | 30 +++++ Controller/Checkout/FastCheckoutStart.php | 85 ++++++++++---- etc/adminhtml/paymentmethods/ideal.xml | 13 ++- .../paynl_checkout_fastcheckoutfallback.xml | 25 +++++ .../pay_fast_checkout_fallback.phtml | 28 +++++ .../templates/pay_fast_checkout_product.phtml | 2 +- view/frontend/web/css/payFastCheckout.css | 5 + 8 files changed, 270 insertions(+), 24 deletions(-) create mode 100644 Block/Page/FastCheckoutFallback.php create mode 100644 Controller/Checkout/FastCheckoutFallback.php create mode 100644 view/frontend/layout/paynl_checkout_fastcheckoutfallback.xml create mode 100644 view/frontend/templates/pay_fast_checkout_fallback.phtml diff --git a/Block/Page/FastCheckoutFallback.php b/Block/Page/FastCheckoutFallback.php new file mode 100644 index 00000000..85314d02 --- /dev/null +++ b/Block/Page/FastCheckoutFallback.php @@ -0,0 +1,106 @@ +addPageAsset('Paynl_Payment::css/payFastCheckout.css'); + parent::__construct($context, $data); + $this->cart = $cart; + $this->request = $request; + $this->response = $response; + $this->cache = $cache; + $this->messageManager = $messageManager; + } + + /** + * Initialize data and prepare it for output + * + * @return string + */ + protected function _beforeToHtml() // phpcs:ignore + + { + return parent::_beforeToHtml(); + } + + /** + * @return array + */ + public function getShippingMethods() + { + $cacheName = 'shipping_methods_' . $this->cart->getQuote()->getId(); + $shippingMethodJson = $this->cache->load($cacheName); + + if (empty($shippingMethodJson)) { + $this->messageManager->addNoticeMessage(__('Unfortunately fast checkout is currently not possible.')); + $this->response->setRedirect('/checkout/cart'); + } else { + return json_decode($shippingMethodJson); + } + } + + /** + * @param string $param + * @return string|null + */ + public function getParam($param) + { + $params = $this->request->getParams(); + return (isset($params[$param])) ? $params[$param] : null; + } +} diff --git a/Controller/Checkout/FastCheckoutFallback.php b/Controller/Checkout/FastCheckoutFallback.php new file mode 100644 index 00000000..35f59d68 --- /dev/null +++ b/Controller/Checkout/FastCheckoutFallback.php @@ -0,0 +1,30 @@ +_pageFactory = $pageFactory; + return parent::__construct($context); + } + + /** + * @return object + */ + public function execute() + { + return $this->_pageFactory->create(); + } +} diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index bfbeeb2d..52cbbcbe 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -4,6 +4,7 @@ use Magento\Checkout\Model\Cart; use Magento\Framework\App\Action\Context; +use Magento\Framework\App\CacheInterface; use Magento\Payment\Helper\Data as PaymentHelper; use Magento\Quote\Api\ShippingMethodManagementInterface; use Magento\Store\Model\StoreManagerInterface; @@ -15,7 +16,7 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action public const FC_GENERAL_ERROR = 8000; public const FC_EMPTY_BASKET = 8005; public const FC_ESITMATE_ERROR = 8006; - public const FC_SHIPPING_ERROR = 8006; + public const FC_SHIPPING_ERROR = 8007; /** * @var Cart @@ -42,6 +43,11 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action */ private $shippingMethodManagementInterface; + /** + * @var CacheInterface + */ + public $cache; + /** * @param Context $context * @param Cart $cart @@ -49,6 +55,7 @@ class FastCheckoutStart extends \Magento\Framework\App\Action\Action * @param PayHelper $payHelper * @param StoreManagerInterface $storeManager * @param ShippingMethodManagementInterface $shippingMethodManagementInterface + * @param CacheInterface $cache */ public function __construct( Context $context, @@ -56,13 +63,15 @@ public function __construct( PaymentHelper $paymentHelper, PayHelper $payHelper, StoreManagerInterface $storeManager, - ShippingMethodManagementInterface $shippingMethodManagementInterface + ShippingMethodManagementInterface $shippingMethodManagementInterface, + CacheInterface $cache ) { $this->cart = $cart; $this->paymentHelper = $paymentHelper; $this->storeManager = $storeManager; $this->payHelper = $payHelper; $this->shippingMethodManagementInterface = $shippingMethodManagementInterface; + $this->cache = $cache; return parent::__construct($context); } @@ -114,22 +123,25 @@ private function quoteSetDummyData($quote, $params) $shippingMethodsAvaileble[$code] = $code; } - if ($store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_estimate_selection') == 2) { - if (empty($shippingMethodsAvaileble[$params['selected_estimate_shipping']])) { - throw new \Exception('Shipping method not availeble', FastCheckoutStart::FC_SHIPPING_ERROR); + if (isset($params['fallbackShippingMethod']) && !empty($params['fallbackShippingMethod']) && !empty($shippingMethodsAvaileble[$params['fallbackShippingMethod']])) { + $shippingMethod = $params['fallbackShippingMethod']; + } else { + if ($store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_estimate_selection') == 2) { + if (isset($params['selected_estimate_shipping']) && empty($shippingMethodsAvaileble[$params['selected_estimate_shipping']])) { + throw new \Exception('Shipping method not availeble', FastCheckoutStart::FC_ESITMATE_ERROR); + } + } + if (isset($params['selected_estimate_shipping']) && !empty($params['selected_estimate_shipping']) && !empty($shippingMethodsAvaileble[$params['selected_estimate_shipping']]) && $store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_estimate_selection') > 0) { + $shippingMethod = $params['selected_estimate_shipping']; + } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { + $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'); + } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup')])) { + $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup'); } - } - - if (isset($params['selected_estimate_shipping']) && !empty($params['selected_estimate_shipping']) && !empty($shippingMethodsAvaileble[$params['selected_estimate_shipping']]) && $store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_estimate_selection') > 0) { - $shippingMethod = $params['selected_estimate_shipping']; - } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { - $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'); - } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup')])) { - $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup'); } if (empty($shippingMethod)) { - throw new \Exception("No shipping method availeble"); + throw new \Exception("No shipping method availeble", FastCheckoutStart::FC_SHIPPING_ERROR); } $shippingAddress->setShippingMethod($shippingMethod); @@ -174,6 +186,29 @@ private function getProducts() return $productArr; } + /** + * @param quote $quote + * @return void + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing + */ + public function cacheShippingMethods() + { + $quote = $this->cart->getQuote(); + $rates = $quote->getShippingAddress()->getAllShippingRates(); + $currency = $this->storeManager->getStore()->getCurrentCurrency(); + $shippingRates = []; + foreach ($rates as $rate) { + $shippingRates[$rate->getCode()] = [ + 'code' => $rate->getCode(), + 'method' => $rate->getCarrierTitle(), + 'title' => $rate->getMethodTitle(), + 'price' => number_format($rate->getPrice(), 2, '.', ''), + 'currency' => $currency->getCurrencySymbol(), + ]; + } + $this->cache->save(json_encode($shippingRates), 'shipping_methods_' . $this->cart->getQuote()->getId()); + } + /** * @return void */ @@ -184,14 +219,16 @@ public function execute() $store = $this->storeManager->getStore(); $params = $this->getRequest()->getParams(); - if ($store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_estimate_selection') == 2) { - if (isset($params['selected_estimate_shipping']) && empty($params['selected_estimate_shipping'])) { - throw new \Exception('No estimate shipping method selected', FastCheckoutStart::FC_ESITMATE_ERROR); + if (!isset($params['fallbackShippingMethod'])) { + if ($store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_estimate_selection') == 2) { + if (isset($params['selected_estimate_shipping']) && empty($params['selected_estimate_shipping'])) { + throw new \Exception('No estimate shipping method selected', FastCheckoutStart::FC_ESITMATE_ERROR); + } } } - if (empty($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')) && empty($params['selected_estimate_shipping'])) { - throw new \Exception('No shipping method selected', FastCheckoutStart::FC_GENERAL_ERROR); + if (empty($store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')) && (!isset($params['fallbackShippingMethod']) || empty($params['fallbackShippingMethod'])) && (!isset($params['selected_estimate_shipping']) || empty($params['selected_estimate_shipping']))) { + throw new \Exception('No shipping method selected', FastCheckoutStart::FC_SHIPPING_ERROR); } $quote = $this->cart->getQuote(); @@ -226,8 +263,14 @@ public function execute() } else { $this->payHelper->logCritical('FC ERROR: ' . $e->getMessage(), []); } - $this->messageManager->addNoticeMessage($message); - $this->_redirect('checkout/cart'); + + if ($store->getConfig('payment/paynl_payment_ideal/fast_checkout_use_fallback') == 1 && $e->getCode() == FastCheckoutStart::FC_SHIPPING_ERROR) { + $this->cacheShippingMethods(); + $this->_redirect('paynl/checkout/fastcheckoutfallback'); + } else { + $this->messageManager->addNoticeMessage($message); + $this->_redirect('checkout/cart'); + } } } } diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 9503932e..f7435be0 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -204,8 +204,17 @@ This button allows users to checkout directly from the cart without the need to 1 When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout. - - + + + + Paynl\Payment\Model\Config\Source\OffOn + payment/paynl_payment_ideal/fast_checkout_use_fallback + + 1 + + Allows users to select a shipping method themselves, in case the selected shipping method isn't available for the order. + + Paynl\Payment\Block\Adminhtml\Render\Checkbox payment/paynl_payment_ideal/fast_checkout_guest_only diff --git a/view/frontend/layout/paynl_checkout_fastcheckoutfallback.xml b/view/frontend/layout/paynl_checkout_fastcheckoutfallback.xml new file mode 100644 index 00000000..f3d2a9a3 --- /dev/null +++ b/view/frontend/layout/paynl_checkout_fastcheckoutfallback.xml @@ -0,0 +1,25 @@ + + + + + Fast Checkout Shipping + + + + + + Fast Checkout Shipping + + + + + + + + + \ No newline at end of file diff --git a/view/frontend/templates/pay_fast_checkout_fallback.phtml b/view/frontend/templates/pay_fast_checkout_fallback.phtml new file mode 100644 index 00000000..52f0ce12 --- /dev/null +++ b/view/frontend/templates/pay_fast_checkout_fallback.phtml @@ -0,0 +1,28 @@ + + +
+

+
+
+ getShippingMethods() as $key => $method) : ?> +
+ + +
+ +
+ +
+
diff --git a/view/frontend/templates/pay_fast_checkout_product.phtml b/view/frontend/templates/pay_fast_checkout_product.phtml index ce00e4b1..0c54752c 100644 --- a/view/frontend/templates/pay_fast_checkout_product.phtml +++ b/view/frontend/templates/pay_fast_checkout_product.phtml @@ -3,7 +3,7 @@ /** @var \Paynl\Payment\Block\Checkout\FastCheckout $block */ ?> -
+
\ No newline at end of file From cd1db672cbfa22bfa9bf6e52fbd5d8d79264d38b Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:10:24 +0200 Subject: [PATCH 23/47] Code Polish --- ViewModel/FastCheckout.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ViewModel/FastCheckout.php b/ViewModel/FastCheckout.php index 72f7a50c..a8ce4d52 100644 --- a/ViewModel/FastCheckout.php +++ b/ViewModel/FastCheckout.php @@ -2,9 +2,9 @@ namespace Paynl\Payment\ViewModel; +use Magento\Customer\Model\Session; use Magento\Framework\View\Element\Block\ArgumentInterface; use Magento\Store\Model\StoreManagerInterface; -use Magento\Customer\Model\Session; class FastCheckout implements ArgumentInterface { @@ -19,8 +19,8 @@ class FastCheckout implements ArgumentInterface protected $session; /** - * BuyNow constructor. - * @param ScopeConfigInterface $scopeConfig + * @param StoreManagerInterface $storeManager + * @param Session $session */ public function __construct( StoreManagerInterface $storeManager, @@ -30,27 +30,27 @@ public function __construct( $this->session = $session; } - /** - * @return string + /** + * @return boolean */ public function getVisibility() { $store = $this->storeManager->getStore(); - if($this->session->isLoggedIn() && $store->getConfig('payment/paynl_payment_ideal/fast_checkout_guest_only') == 1) { + if ($this->session->isLoggedIn() && $store->getConfig('payment/paynl_payment_ideal/fast_checkout_guest_only') == 1) { return false; } - return true; + return true; } - /** - * @return string + /** + * @return boolean */ public function minicartEnabled() { $store = $this->storeManager->getStore(); - if($store->getConfig('payment/paynl_payment_ideal/fast_checkout_minicart_enabled') == 1 && $this->getVisibility()) { + if ($store->getConfig('payment/paynl_payment_ideal/fast_checkout_minicart_enabled') == 1 && $this->getVisibility()) { return true; } - return false; + return false; } } From 77b28d9f8736bd233ab54481cede36443b8e4439 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Tue, 13 Aug 2024 11:04:14 +0200 Subject: [PATCH 24/47] Fix number format null notice --- Controller/Checkout/FastCheckoutStart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index 92e5820a..24d17abc 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -201,7 +201,7 @@ public function cacheShippingMethods() 'code' => $rate->getCode(), 'method' => $rate->getCarrierTitle(), 'title' => $rate->getMethodTitle(), - 'price' => number_format($rate->getPrice(), 2, '.', ''), + 'price' => number_format($rate->getPrice() ?? 0, 2, '.', ''), 'currency' => $currency->getCurrencySymbol(), ]; } From 9946df03f194cc7128ae49c2aced79817a46c821 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:49:22 +0200 Subject: [PATCH 25/47] Fix intermediate screen --- Controller/Checkout/FastCheckoutStart.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index 24d17abc..fb27e596 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -197,13 +197,15 @@ public function cacheShippingMethods() $currency = $this->storeManager->getStore()->getCurrentCurrency(); $shippingRates = []; foreach ($rates as $rate) { - $shippingRates[$rate->getCode()] = [ - 'code' => $rate->getCode(), - 'method' => $rate->getCarrierTitle(), - 'title' => $rate->getMethodTitle(), - 'price' => number_format($rate->getPrice() ?? 0, 2, '.', ''), - 'currency' => $currency->getCurrencySymbol(), - ]; + if(strpos($rate->getCode(), 'error') === false) { + $shippingRates[$rate->getCode()] = [ + 'code' => $rate->getCode(), + 'method' => $rate->getCarrierTitle(), + 'title' => $rate->getMethodTitle(), + 'price' => number_format($rate->getPrice() ?? 0, 2, '.', ''), + 'currency' => $currency->getCurrencySymbol(), + ]; + } } $this->cache->save(json_encode($shippingRates), 'shipping_methods_' . $this->cart->getQuote()->getId()); } From 663782abc689fff898d263fe3da779b498faac26 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:47:02 +0200 Subject: [PATCH 26/47] Code Polish --- Controller/Checkout/FastCheckoutStart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index fb27e596..a07e3aa2 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -197,7 +197,7 @@ public function cacheShippingMethods() $currency = $this->storeManager->getStore()->getCurrentCurrency(); $shippingRates = []; foreach ($rates as $rate) { - if(strpos($rate->getCode(), 'error') === false) { + if (strpos($rate->getCode(), 'error') === false) { $shippingRates[$rate->getCode()] = [ 'code' => $rate->getCode(), 'method' => $rate->getCarrierTitle(), From 3b4ab591981449bd013b0d1d622da04f0abb069e Mon Sep 17 00:00:00 2001 From: Anne Date: Mon, 19 Aug 2024 11:00:09 +0200 Subject: [PATCH 27/47] Added tooltips to base iDEAL settings --- etc/adminhtml/paymentmethods/ideal.xml | 8 +++++++- i18n/de_AT.csv | 11 +++++++++++ i18n/de_CH.csv | 11 +++++++++++ i18n/de_DE.csv | 11 +++++++++++ i18n/de_LU.csv | 11 +++++++++++ i18n/en_US.csv | 11 +++++++++++ i18n/fr_BE.csv | 10 ++++++++++ i18n/fr_CA.csv | 10 ++++++++++ i18n/fr_CH.csv | 10 ++++++++++ i18n/fr_FR.csv | 10 ++++++++++ i18n/fr_LU.csv | 10 ++++++++++ i18n/nl_BE.csv | 10 ++++++++++ i18n/nl_NL.csv | 10 ++++++++++ 13 files changed, 132 insertions(+), 1 deletion(-) diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 85dd15db..597861f0 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -54,6 +54,7 @@ 1 + Doesn't apply to fastcheckout. @@ -89,6 +90,7 @@ 1 + Doesn't apply to fastcheckout. @@ -97,6 +99,7 @@ 1 + Doesn't apply to fastcheckout. @@ -137,7 +140,9 @@ payment/paynl_payment_ideal/showforcompany By default payment methods are available in the checkout for all customer types. Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout. @@ -147,6 +152,7 @@ Business, BB2: Only show this payment method when the customer entered a company 1 payment/paynl_payment_ideal/showforgroup + Doesn't apply to fastcheckout. diff --git a/i18n/de_AT.csv b/i18n/de_AT.csv index 5bbcab74..b48be414 100644 --- a/i18n/de_AT.csv +++ b/i18n/de_AT.csv @@ -218,3 +218,14 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direkte Zahlung an der Kasse: Die PIN-Transaktion wird direkt gestartet, wenn die Zahlungsmethode an der Kasse ausgewählt wird. Die Zahlung erfolgt am Abholort: Die Bestellung wird in der Magento-Verwaltung erstellt, die PIN-Transaktion kann von dort aus gestartet werden, wenn der Kunde die Bestellung abholt. Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwischen den oben angegebenen Optionen wählen." +"Doesn't apply to fastcheckout.","Gilt nicht für Fastcheckout." + +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Gilt nicht für Fastcheckout." diff --git a/i18n/de_CH.csv b/i18n/de_CH.csv index 741ac9fa..7b0c54b9 100644 --- a/i18n/de_CH.csv +++ b/i18n/de_CH.csv @@ -220,3 +220,14 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direkte Zahlung an der Kasse: Die PIN-Transaktion wird direkt gestartet, wenn die Zahlungsmethode an der Kasse ausgewählt wird. Die Zahlung erfolgt am Abholort: Die Bestellung wird in der Magento-Verwaltung erstellt, die PIN-Transaktion kann von dort aus gestartet werden, wenn der Kunde die Bestellung abholt. Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwischen den oben angegebenen Optionen wählen." +"Doesn't apply to fastcheckout.","Gilt nicht für Fastcheckout." + +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Gilt nicht für Fastcheckout." diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index 741ac9fa..7b0c54b9 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -220,3 +220,14 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direkte Zahlung an der Kasse: Die PIN-Transaktion wird direkt gestartet, wenn die Zahlungsmethode an der Kasse ausgewählt wird. Die Zahlung erfolgt am Abholort: Die Bestellung wird in der Magento-Verwaltung erstellt, die PIN-Transaktion kann von dort aus gestartet werden, wenn der Kunde die Bestellung abholt. Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwischen den oben angegebenen Optionen wählen." +"Doesn't apply to fastcheckout.","Gilt nicht für Fastcheckout." + +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Gilt nicht für Fastcheckout." diff --git a/i18n/de_LU.csv b/i18n/de_LU.csv index a8232d63..83e9ecc3 100644 --- a/i18n/de_LU.csv +++ b/i18n/de_LU.csv @@ -221,3 +221,14 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direkte Zahlung an der Kasse: Die PIN-Transaktion wird direkt gestartet, wenn die Zahlungsmethode an der Kasse ausgewählt wird. Die Zahlung erfolgt am Abholort: Die Bestellung wird in der Magento-Verwaltung erstellt, die PIN-Transaktion kann von dort aus gestartet werden, wenn der Kunde die Bestellung abholt. Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwischen den oben angegebenen Optionen wählen." +"Doesn't apply to fastcheckout.","Gilt nicht für Fastcheckout." + +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Gilt nicht für Fastcheckout." diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 8def9192..deae0d68 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -272,3 +272,14 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direct checkout payment: pin transaction will be started right when the instore is selected in the checkout. Payment takes place at the pickup location: the order is created in the Magento admin, the pin transaction can be started from there when the customer comes to pick up the order. Provide this choice in the checkout: the customer can choose in the checkout between the options given above." +"Doesn't apply to fastcheckout.","Doesn't apply to fastcheckout." + +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Doesn't apply to fastcheckout." diff --git a/i18n/fr_BE.csv b/i18n/fr_BE.csv index 04063c42..7eb3c42f 100644 --- a/i18n/fr_BE.csv +++ b/i18n/fr_BE.csv @@ -220,3 +220,13 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." +"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Ne s'applique pas au paiement rapide." diff --git a/i18n/fr_CA.csv b/i18n/fr_CA.csv index 04063c42..7eb3c42f 100644 --- a/i18n/fr_CA.csv +++ b/i18n/fr_CA.csv @@ -220,3 +220,13 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." +"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Ne s'applique pas au paiement rapide." diff --git a/i18n/fr_CH.csv b/i18n/fr_CH.csv index 04063c42..7eb3c42f 100644 --- a/i18n/fr_CH.csv +++ b/i18n/fr_CH.csv @@ -220,3 +220,13 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." +"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Ne s'applique pas au paiement rapide." diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index a67f3deb..e998ef51 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -220,3 +220,13 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." +"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Ne s'applique pas au paiement rapide." diff --git a/i18n/fr_LU.csv b/i18n/fr_LU.csv index 7e364697..18ead48b 100644 --- a/i18n/fr_LU.csv +++ b/i18n/fr_LU.csv @@ -219,3 +219,13 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." +"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Ne s'applique pas au paiement rapide." diff --git a/i18n/nl_BE.csv b/i18n/nl_BE.csv index 2d8ab7c6..333bd68b 100644 --- a/i18n/nl_BE.csv +++ b/i18n/nl_BE.csv @@ -276,3 +276,13 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Directe betaling: de pintransactie wordt gestart zodra instore is geselecteerd bij het afrekenen. Betaling vindt plaats op de afhaallocatie: de bestelling wordt aangemaakt in de Magento admin, van daaruit kan de pintransactie gestart worden als de klant de bestelling komt ophalen. Geef deze keuze op bij het afrekenen: de klant kan bij het afrekenen kiezen tussen bovenstaande opties." +"Doesn't apply to fastcheckout.","Geldt niet voor fastcheckout." +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Geldt niet voor fastcheckout." diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index cddf68f0..57bdd40e 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -269,3 +269,13 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Directe betaling: de pintransactie wordt gestart zodra instore is geselecteerd bij het afrekenen. Betaling vindt plaats op de afhaallocatie: de bestelling wordt aangemaakt in de Magento admin, van daaruit kan de pintransactie gestart worden als de klant de bestelling komt ophalen. Geef deze keuze op bij het afrekenen: de klant kan bij het afrekenen kiezen tussen bovenstaande opties." +"Doesn't apply to fastcheckout.","Geldt niet voor fastcheckout." +"By default payment methods are available in the checkout for all customer types. +Private, B2C: Only show this payment method when the customer didn't enter a company name. +Business, BB2: Only show this payment method when the customer entered a company name. + +Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. +Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. + +Geldt niet voor fastcheckout." From 69ef1dfe4080914b043463119e3d3bf26c35fed7 Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 19 Aug 2024 12:05:31 +0200 Subject: [PATCH 28/47] Updated texts --- etc/adminhtml/paymentmethods/ideal.xml | 35 +++++++++++++------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 597861f0..bc35efe5 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -46,15 +46,14 @@ payment/paynl_payment_ideal/order_status_processing - + Magento\Payment\Model\Config\Source\Allspecificcountries payment/paynl_payment_ideal/allowspecific 1 - Doesn't apply to fastcheckout. + Determine in which country iDEAL should be available. This settings doesn't apply to Fastcheckout. @@ -90,19 +89,17 @@ 1 - Doesn't apply to fastcheckout. + Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout. - + payment/paynl_payment_ideal/max_order_total 1 - Doesn't apply to fastcheckout. + Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout. - + validate-number payment/paynl_payment_ideal/sort_order @@ -110,9 +107,7 @@ 1 - + Paynl\Payment\Model\Config\Source\SendNewOrderEmail payment/paynl_payment_ideal/send_new_order_email @@ -138,11 +133,13 @@ 1 payment/paynl_payment_ideal/showforcompany - By default payment methods are available in the checkout for all customer types. + By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + Private, B2C: Only show this payment method when the customer didn't enter a company name. + Business, BB2: Only show this payment method when the customer entered a company name. -Doesn't apply to fastcheckout. +This setting doesn't apply to Fastcheckout. @@ -152,7 +149,9 @@ Doesn't apply to fastcheckout. 1 payment/paynl_payment_ideal/showforgroup - Doesn't apply to fastcheckout. + Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting Doesn't apply to Fastcheckout. @@ -220,11 +219,11 @@ This button allows users to checkout directly from the cart without the need to 1 - + Select what should happen when both shipping methods could not be applied: Show notice and abort fastcheckout: -When This option is selected the fastcheckout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When This option is selected the fastcheckout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order. @@ -234,7 +233,7 @@ Using the intermediate screen will allow uses to select their own shipping metho Paynl\Payment\Model\Config\Source\UseEstimate payment/paynl_payment_ideal/fast_checkout_use_estimate_selection - 1 + 1 When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout. From 23ea8a6acad9b9c94f23acc0b4ea1c4aa40cbbf2 Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 19 Aug 2024 12:07:31 +0200 Subject: [PATCH 29/47] Updated texts --- etc/adminhtml/paymentmethods/ideal.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index bc35efe5..efbe90b2 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -151,7 +151,7 @@ This setting doesn't apply to Fastcheckout. payment/paynl_payment_ideal/showforgroup Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting Doesn't apply to Fastcheckout. +This setting doesn't apply to Fastcheckout. From 7b01d2211c04895a63abb9bfa801a3cccd2e9646 Mon Sep 17 00:00:00 2001 From: Anne Date: Mon, 19 Aug 2024 15:08:30 +0200 Subject: [PATCH 30/47] Updated translations --- etc/adminhtml/paymentmethods/ideal.xml | 2 +- i18n/de_AT.csv | 30 ++++++++++++++++--------- i18n/de_CH.csv | 30 ++++++++++++++++--------- i18n/de_DE.csv | 30 ++++++++++++++++--------- i18n/de_LU.csv | 30 ++++++++++++++++--------- i18n/en_US.csv | 21 +++++++++++++++++ i18n/fr_BE.csv | 31 +++++++++++++++++--------- i18n/fr_CA.csv | 31 +++++++++++++++++--------- i18n/fr_CH.csv | 31 +++++++++++++++++--------- i18n/fr_FR.csv | 31 +++++++++++++++++--------- i18n/fr_LU.csv | 31 +++++++++++++++++--------- i18n/nl_BE.csv | 30 +++++++++++++++++-------- i18n/nl_NL.csv | 31 +++++++++++++++++--------- 13 files changed, 245 insertions(+), 114 deletions(-) diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index efbe90b2..6b0ed566 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -53,7 +53,7 @@ 1 - Determine in which country iDEAL should be available. This settings doesn't apply to Fastcheckout. + Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout. diff --git a/i18n/de_AT.csv b/i18n/de_AT.csv index e9e4bfaf..a003e83e 100644 --- a/i18n/de_AT.csv +++ b/i18n/de_AT.csv @@ -218,20 +218,28 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direkte Zahlung an der Kasse: Die PIN-Transaktion wird direkt gestartet, wenn die Zahlungsmethode an der Kasse ausgewählt wird. Die Zahlung erfolgt am Abholort: Die Bestellung wird in der Magento-Verwaltung erstellt, die PIN-Transaktion kann von dort aus gestartet werden, wenn der Kunde die Bestellung abholt. Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwischen den oben angegebenen Optionen wählen." -"Doesn't apply to fastcheckout.","Gilt nicht für Fastcheckout." - -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Gilt nicht für Fastcheckout." "Pay. Refund by card","Pay. Rückholstift" "Amount","Menge" "Terminal","Terminal" "Refund amount must be greater than 0.00","Der Betrag muss größer als 0,00 sein" "Refund amount must not exceed ","Der Betrag darf nicht höher sein als " "Select a terminal","Wählen Sie ein Terminal aus" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: + +Privat, B2C: Diese Zahlungsmethode nur anzeigen, wenn der Kunde keinen Firmennamen eingegeben hat. + +Geschäftlich, BB2: Diese Zahlungsmethode nur anzeigen, wenn der Kunde einen Firmennamen eingegeben hat. + +Diese Einstellung gilt nicht für Fastcheckout." +"Wählen Sie aus, für welche Kundengruppe iDEAL verfügbar ist. Kundengruppen werden in Magento definiert (Menü: Kunden->Kundengruppen). + +Diese Einstellung gilt nicht für Fastcheckout." diff --git a/i18n/de_CH.csv b/i18n/de_CH.csv index 78192a51..b6cac79f 100644 --- a/i18n/de_CH.csv +++ b/i18n/de_CH.csv @@ -220,20 +220,28 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direkte Zahlung an der Kasse: Die PIN-Transaktion wird direkt gestartet, wenn die Zahlungsmethode an der Kasse ausgewählt wird. Die Zahlung erfolgt am Abholort: Die Bestellung wird in der Magento-Verwaltung erstellt, die PIN-Transaktion kann von dort aus gestartet werden, wenn der Kunde die Bestellung abholt. Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwischen den oben angegebenen Optionen wählen." -"Doesn't apply to fastcheckout.","Gilt nicht für Fastcheckout." - -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Gilt nicht für Fastcheckout." "Pay. Refund by card","Pay. Rückholstift" "Amount","Menge" "Terminal","Terminal" "Refund amount must be greater than 0.00","Der Betrag muss größer als 0,00 sein" "Refund amount must not exceed ","Der Betrag darf nicht höher sein als " "Select a terminal","Wählen Sie ein Terminal aus" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: + +Privat, B2C: Diese Zahlungsmethode nur anzeigen, wenn der Kunde keinen Firmennamen eingegeben hat. + +Geschäftlich, BB2: Diese Zahlungsmethode nur anzeigen, wenn der Kunde einen Firmennamen eingegeben hat. + +Diese Einstellung gilt nicht für Fastcheckout." +"Wählen Sie aus, für welche Kundengruppe iDEAL verfügbar ist. Kundengruppen werden in Magento definiert (Menü: Kunden->Kundengruppen). + +Diese Einstellung gilt nicht für Fastcheckout." diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index 78192a51..b6cac79f 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -220,20 +220,28 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direkte Zahlung an der Kasse: Die PIN-Transaktion wird direkt gestartet, wenn die Zahlungsmethode an der Kasse ausgewählt wird. Die Zahlung erfolgt am Abholort: Die Bestellung wird in der Magento-Verwaltung erstellt, die PIN-Transaktion kann von dort aus gestartet werden, wenn der Kunde die Bestellung abholt. Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwischen den oben angegebenen Optionen wählen." -"Doesn't apply to fastcheckout.","Gilt nicht für Fastcheckout." - -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Gilt nicht für Fastcheckout." "Pay. Refund by card","Pay. Rückholstift" "Amount","Menge" "Terminal","Terminal" "Refund amount must be greater than 0.00","Der Betrag muss größer als 0,00 sein" "Refund amount must not exceed ","Der Betrag darf nicht höher sein als " "Select a terminal","Wählen Sie ein Terminal aus" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: + +Privat, B2C: Diese Zahlungsmethode nur anzeigen, wenn der Kunde keinen Firmennamen eingegeben hat. + +Geschäftlich, BB2: Diese Zahlungsmethode nur anzeigen, wenn der Kunde einen Firmennamen eingegeben hat. + +Diese Einstellung gilt nicht für Fastcheckout." +"Wählen Sie aus, für welche Kundengruppe iDEAL verfügbar ist. Kundengruppen werden in Magento definiert (Menü: Kunden->Kundengruppen). + +Diese Einstellung gilt nicht für Fastcheckout." diff --git a/i18n/de_LU.csv b/i18n/de_LU.csv index 29e56100..c0a03c12 100644 --- a/i18n/de_LU.csv +++ b/i18n/de_LU.csv @@ -221,20 +221,28 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direkte Zahlung an der Kasse: Die PIN-Transaktion wird direkt gestartet, wenn die Zahlungsmethode an der Kasse ausgewählt wird. Die Zahlung erfolgt am Abholort: Die Bestellung wird in der Magento-Verwaltung erstellt, die PIN-Transaktion kann von dort aus gestartet werden, wenn der Kunde die Bestellung abholt. Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwischen den oben angegebenen Optionen wählen." -"Doesn't apply to fastcheckout.","Gilt nicht für Fastcheckout." - -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Gilt nicht für Fastcheckout." "Pay. Refund by card","Pay. Rückholstift" "Amount","Menge" "Terminal","Terminal" "Refund amount must be greater than 0.00","Der Betrag muss größer als 0,00 sein" "Refund amount must not exceed ","Der Betrag darf nicht höher sein als " "Select a terminal","Wählen Sie ein Terminal aus" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: + +Privat, B2C: Diese Zahlungsmethode nur anzeigen, wenn der Kunde keinen Firmennamen eingegeben hat. + +Geschäftlich, BB2: Diese Zahlungsmethode nur anzeigen, wenn der Kunde einen Firmennamen eingegeben hat. + +Diese Einstellung gilt nicht für Fastcheckout." +"Wählen Sie aus, für welche Kundengruppe iDEAL verfügbar ist. Kundengruppen werden in Magento definiert (Menü: Kunden->Kundengruppen). + +Diese Einstellung gilt nicht für Fastcheckout." diff --git a/i18n/en_US.csv b/i18n/en_US.csv index e57c1dd0..babc73e8 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -289,3 +289,24 @@ Doesn't apply to fastcheckout." "Refund amount must be greater than 0.00","Refund amount must be greater than 0.00" "Refund amount must not exceed ","Refund amount must not exceed " "Select a terminal","Select a terminal" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout." +"Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting doesn't apply to Fastcheckout.","Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting doesn't apply to Fastcheckout." diff --git a/i18n/fr_BE.csv b/i18n/fr_BE.csv index c8c5635f..64aa0c0d 100644 --- a/i18n/fr_BE.csv +++ b/i18n/fr_BE.csv @@ -220,19 +220,30 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." -"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Ne s'applique pas au paiement rapide." "Pay. Refund by card","Pay. Goupille de retour" "Amount","Montant" "Terminal","Terminal" "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: + +Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. + +Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a saisi un nom d'entreprise. + +Ce paramètre ne s'applique pas à Fastcheckout." +"Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). + +Ce paramètre ne s'applique pas à Fastcheckout." diff --git a/i18n/fr_CA.csv b/i18n/fr_CA.csv index c8c5635f..64aa0c0d 100644 --- a/i18n/fr_CA.csv +++ b/i18n/fr_CA.csv @@ -220,19 +220,30 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." -"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Ne s'applique pas au paiement rapide." "Pay. Refund by card","Pay. Goupille de retour" "Amount","Montant" "Terminal","Terminal" "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: + +Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. + +Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a saisi un nom d'entreprise. + +Ce paramètre ne s'applique pas à Fastcheckout." +"Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). + +Ce paramètre ne s'applique pas à Fastcheckout." diff --git a/i18n/fr_CH.csv b/i18n/fr_CH.csv index c8c5635f..64aa0c0d 100644 --- a/i18n/fr_CH.csv +++ b/i18n/fr_CH.csv @@ -220,19 +220,30 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." -"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Ne s'applique pas au paiement rapide." "Pay. Refund by card","Pay. Goupille de retour" "Amount","Montant" "Terminal","Terminal" "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: + +Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. + +Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a saisi un nom d'entreprise. + +Ce paramètre ne s'applique pas à Fastcheckout." +"Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). + +Ce paramètre ne s'applique pas à Fastcheckout." diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index c0e265d5..7f18c1cc 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -220,19 +220,30 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." -"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Ne s'applique pas au paiement rapide." "Pay. Refund by card","Pay. Goupille de retour" "Amount","Montant" "Terminal","Terminal" "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: + +Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. + +Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a saisi un nom d'entreprise. + +Ce paramètre ne s'applique pas à Fastcheckout." +"Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). + +Ce paramètre ne s'applique pas à Fastcheckout." diff --git a/i18n/fr_LU.csv b/i18n/fr_LU.csv index 0a92f2cc..d7f6c218 100644 --- a/i18n/fr_LU.csv +++ b/i18n/fr_LU.csv @@ -219,19 +219,30 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Paiement direct à la caisse : la transaction par code PIN sera lancée dès que le mode de paiement est sélectionné lors du paiement. Le paiement s'effectue au lieu de retrait : la commande est créée dans l'admin Magento, la transaction PIN peut être lancée à partir de là lorsque le client vient récupérer la commande. Proposer ce choix lors du paiement : le client peut choisir lors du paiement entre les options indiquées ci-dessus." -"Doesn't apply to fastcheckout.","Ne s'applique pas au paiement rapide." -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Ne s'applique pas au paiement rapide." "Pay. Refund by card","Pay. Goupille de retour" "Amount","Montant" "Terminal","Terminal" "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: + +Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. + +Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a saisi un nom d'entreprise. + +Ce paramètre ne s'applique pas à Fastcheckout." +"Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). + +Ce paramètre ne s'applique pas à Fastcheckout." diff --git a/i18n/nl_BE.csv b/i18n/nl_BE.csv index e6f4f75f..602ef7ab 100644 --- a/i18n/nl_BE.csv +++ b/i18n/nl_BE.csv @@ -277,18 +277,30 @@ Directe betaling: de pintransactie wordt gestart zodra instore is geselecteerd b Betaling vindt plaats op de afhaallocatie: de bestelling wordt aangemaakt in de Magento admin, van daaruit kan de pintransactie gestart worden als de klant de bestelling komt ophalen. Geef deze keuze op bij het afrekenen: de klant kan bij het afrekenen kiezen tussen bovenstaande opties." "Doesn't apply to fastcheckout.","Geldt niet voor fastcheckout." -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Geldt niet voor fastcheckout." "Pay. Refund by card","Pay. Retourpin" "Amount","Bedrag" "Terminal","Terminal" "Refund amount must be greater than 0.00","Het bedrag moet groter zijn dan 0,00" "Refund amount must not exceed ","Het bedrag mag niet hoger zijn dan " "Select a terminal","Selecteer een terminal" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Bepaal in welk land iDEAL beschikbaar moet zijn. Deze instelling is niet van toepassing op Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Stel het minimale bestelbedrag in voor iDEAL. Laat leeg als u geen minimumbedrag wilt instellen. Deze instelling is niet van toepassing op Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Stel het maximale orderbedrag in voor iDEAL dat beschikbaar moet zijn. Laat dit leeg als u geen maximumbedrag wilt instellen. Deze instelling is niet van toepassing op Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Standaard zijn betaalmethoden beschikbaar voor alle klanttypen. Om dit te beperken tot een klanttype, gebruikt u een van de volgende opties: + +Privé, B2C: Toon deze betaalmethode alleen als de klant geen bedrijfsnaam heeft ingevoerd. + +Zakelijk, BB2: Toon deze betaalmethode alleen als de klant een bedrijfsnaam heeft ingevoerd. + +Deze instelling is niet van toepassing op Fastcheckout." +"Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting doesn't apply to Fastcheckout.","Selecteer voor welke klantgroep iDEAL beschikbaar is. Klantgroepen worden gedefinieerd in Magento (Menu: Customers->Customer Groups). + +Deze instelling is niet van toepassing op Fastcheckout." diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index 9d5b85d0..deb7eb0c 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -269,19 +269,30 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Directe betaling: de pintransactie wordt gestart zodra instore is geselecteerd bij het afrekenen. Betaling vindt plaats op de afhaallocatie: de bestelling wordt aangemaakt in de Magento admin, van daaruit kan de pintransactie gestart worden als de klant de bestelling komt ophalen. Geef deze keuze op bij het afrekenen: de klant kan bij het afrekenen kiezen tussen bovenstaande opties." -"Doesn't apply to fastcheckout.","Geldt niet voor fastcheckout." -"By default payment methods are available in the checkout for all customer types. -Private, B2C: Only show this payment method when the customer didn't enter a company name. -Business, BB2: Only show this payment method when the customer entered a company name. - -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. -Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. -Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. - -Geldt niet voor fastcheckout." "Pay. Refund by card","Pay. Retourpin" "Amount","Bedrag" "Terminal","Terminal" "Refund amount must be greater than 0.00","Het bedrag moet groter zijn dan 0,00" "Refund amount must not exceed ","Het bedrag mag niet hoger zijn dan " "Select a terminal","Selecteer een terminal" +"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Bepaal in welk land iDEAL beschikbaar moet zijn. Deze instelling is niet van toepassing op Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Stel het minimale bestelbedrag in voor iDEAL. Laat leeg als u geen minimumbedrag wilt instellen. Deze instelling is niet van toepassing op Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Stel het maximale orderbedrag in voor iDEAL dat beschikbaar moet zijn. Laat dit leeg als u geen maximumbedrag wilt instellen. Deze instelling is niet van toepassing op Fastcheckout." +"By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: + +Private, B2C: Only show this payment method when the customer didn't enter a company name. + +Business, BB2: Only show this payment method when the customer entered a company name. + +This setting doesn't apply to Fastcheckout.","Standaard zijn betaalmethoden beschikbaar voor alle klanttypen. Om dit te beperken tot een klanttype, gebruikt u een van de volgende opties: + +Privé, B2C: Toon deze betaalmethode alleen als de klant geen bedrijfsnaam heeft ingevoerd. + +Zakelijk, BB2: Toon deze betaalmethode alleen als de klant een bedrijfsnaam heeft ingevoerd. + +Deze instelling is niet van toepassing op Fastcheckout." +"Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). + +This setting doesn't apply to Fastcheckout.","Selecteer voor welke klantgroep iDEAL beschikbaar is. Klantgroepen worden gedefinieerd in Magento (Menu: Customers->Customer Groups). + +Deze instelling is niet van toepassing op Fastcheckout." From e0a33e277bf7e70aba1dbb985f5d87e8afa8cd0b Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:54:42 +0200 Subject: [PATCH 31/47] Remove Pickup option --- Controller/Checkout/FastCheckoutStart.php | 6 ++++-- Model/Config/Source/ActiveShippingMethods.php | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index a07e3aa2..3ce2159b 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -121,7 +121,9 @@ private function quoteSetDummyData($quote, $params) $shippingMethodsAvaileble = []; foreach ($shippingData as $shipping) { $code = $shipping->getCarrierCode() . '_' . $shipping->getMethodCode(); - $shippingMethodsAvaileble[$code] = $code; + if ($code != 'instore_pickup') { + $shippingMethodsAvaileble[$code] = $code; + } } if (isset($params['fallbackShippingMethod']) && !empty($params['fallbackShippingMethod']) && !empty($shippingMethodsAvaileble[$params['fallbackShippingMethod']])) { @@ -197,7 +199,7 @@ public function cacheShippingMethods() $currency = $this->storeManager->getStore()->getCurrentCurrency(); $shippingRates = []; foreach ($rates as $rate) { - if (strpos($rate->getCode(), 'error') === false) { + if (strpos($rate->getCode(), 'error') === false && $rate->getCode() != 'instore_pickup') { $shippingRates[$rate->getCode()] = [ 'code' => $rate->getCode(), 'method' => $rate->getCarrierTitle(), diff --git a/Model/Config/Source/ActiveShippingMethods.php b/Model/Config/Source/ActiveShippingMethods.php index 85c6b021..a11d27ab 100644 --- a/Model/Config/Source/ActiveShippingMethods.php +++ b/Model/Config/Source/ActiveShippingMethods.php @@ -64,8 +64,9 @@ public function getShippingMethods() $carrierTitle = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/title'); $carrierName = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/name'); } - - $methods[$code] = '[' . $carrierTitle . '] ' . $carrierName; + if ($code != 'instore_pickup') { + $methods[$code] = '[' . $carrierTitle . '] ' . $carrierName; + } } return $methods; From 4e4bd04067c4c0b1a59f4115e30b7fbaa6799e99 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:09:33 +0200 Subject: [PATCH 32/47] Add translations, Mobile Support & Textual changes --- etc/adminhtml/paymentmethods/ideal.xml | 32 ++++++------ i18n/de_AT.csv | 51 +++++++++++++++++++ i18n/de_CH.csv | 51 +++++++++++++++++++ i18n/de_DE.csv | 51 +++++++++++++++++++ i18n/de_LU.csv | 51 +++++++++++++++++++ i18n/en_US.csv | 51 +++++++++++++++++++ i18n/fr_BE.csv | 51 +++++++++++++++++++ i18n/fr_CA.csv | 51 +++++++++++++++++++ i18n/fr_CH.csv | 51 +++++++++++++++++++ i18n/fr_FR.csv | 51 +++++++++++++++++++ i18n/fr_LU.csv | 51 +++++++++++++++++++ i18n/nl_BE.csv | 51 +++++++++++++++++++ i18n/nl_NL.csv | 51 +++++++++++++++++++ .../templates/pay_fast_checkout_cart.phtml | 2 +- .../templates/pay_fast_checkout_product.phtml | 2 +- view/frontend/web/css/payFastCheckout.css | 35 +++++++++---- 16 files changed, 655 insertions(+), 28 deletions(-) diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 6b0ed566..2331d1eb 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -53,7 +53,7 @@ 1 - Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout. + Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout. @@ -89,7 +89,7 @@ 1 - Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout. + Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout. @@ -97,7 +97,7 @@ 1 - Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout. + Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout. @@ -139,7 +139,7 @@ Private, B2C: Only show this payment method when the customer didn't enter a com Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout. +This setting doesn't apply to fast checkout. @@ -151,11 +151,11 @@ This setting doesn't apply to Fastcheckout. payment/paynl_payment_ideal/showforgroup Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout. +This setting doesn't apply to fast checkout. - + Paynl\Payment\Model\Config\Source\OffOn @@ -163,7 +163,7 @@ This setting doesn't apply to Fastcheckout. 1 - Show the fastcheckout button on the cart page. + Show the fast checkout button on the cart page. This button allows users to checkout directly from the cart without the need to fill in their address. @@ -174,7 +174,7 @@ This button allows users to checkout directly from the cart without the need to 1 - Show the fastcheckout button on the minicart. + Show the fast checkout button on the minicart. This button allows users to checkout directly from the minicart without the need to fill in their address. @@ -185,7 +185,7 @@ This button allows users to checkout directly from the minicart without the need 1 - Show the fastcheckout button on every product page. + Show the fast checkout button on every product page. This button allows users to checkout directly from the cart without the need to fill in their address. @@ -201,6 +201,7 @@ This button allows users to checkout directly from the cart without the need to 1 Select the shipping method that should be applied first. + The default shipping method will be applied to fast checkout orders. @@ -219,14 +220,13 @@ This button allows users to checkout directly from the cart without the need to 1 - Select what should happen when both shipping methods could not be applied: -Show notice and abort fastcheckout: -When This option is selected the fastcheckout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order. +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order. @@ -241,10 +241,10 @@ Using the intermediate screen will allow uses to select their own shipping metho Paynl\Payment\Block\Adminhtml\Render\Checkbox payment/paynl_payment_ideal/fast_checkout_guest_only - When enabled, the fastCheckout button will only be shown on the cart page for guest users. + When enabled, the fast checkout button will only be shown on the cart page for guest users. -This setting does not effect the product page. If fastCheckout is enabled for the product page, the fastCheckout button will always be shown. - Show the fastCheckout button on the cart page, only for guest customers. +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown. + Show the fast checkout button on the cart page, only for guest customers. diff --git a/i18n/de_AT.csv b/i18n/de_AT.csv index a003e83e..6876a1c6 100644 --- a/i18n/de_AT.csv +++ b/i18n/de_AT.csv @@ -243,3 +243,54 @@ Diese Einstellung gilt nicht für Fastcheckout." "Wählen Sie aus, für welche Kundengruppe iDEAL verfügbar ist. Kundengruppen werden in Magento definiert (Menü: Kunden->Kundengruppen). Diese Einstellung gilt nicht für Fastcheckout." +"Fast Checkout","Fastcheckout" +"iDEAL Fast Checkout","iDEAL Fastcheckout" +"Cart page","Warenkorbseite" +"Minicart","Mini-Warenkorb" +"Product page","Produktseite" +"Default shipping method","Standardversandmethode" +"Fallback shipping method","Zurückgreifen-Versandmethode" +"Fallback","Zurückgreifen" +"Use estimate selection","Schätzauswahl verwenden" +"Guest checkout only","Nur als Gast zur Kasse gehen" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Zeigen Sie die Schaltfläche für die fastcheckout auf der Warenkorbseite an. + +Mit dieser Schaltfläche können Benutzer direkt vom Warenkorb aus zur Kasse gehen, ohne ihre Adresse eingeben zu müssen." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Zeigen Sie die Schaltfläche für die fastcheckout im Mini-Warenkorb an. + +Mit dieser Schaltfläche können Benutzer direkt vom Mini-Warenkorb aus bezahlen, ohne ihre Adresse eingeben zu müssen." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Zeigen Sie auf jeder Produktseite den Button für die fastcheckout an. + +Mit diesem Button können Benutzer direkt vom Warenkorb aus zur Kaufabwicklung gehen, ohne ihre Adresse eingeben zu müssen." +"Select the shipping method that should be applied first.","Wählen Sie die Versandart aus, die zuerst angewendet werden soll." +"The default shipping method will be applied to fast checkout orders.","Für Bestellungen mit fastcheckout wird die Standardversandmethode angewendet." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Wählen Sie die Fallback-Versandmethode aus, die angewendet wird, wenn die Standardversandmethode nicht angewendet werden konnte." +"In case the default shipping method could not by applied, this shiping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: + +Hinweis anzeigen und Schnellkauf abbrechen: +Wenn diese Option ausgewählt ist, wird der Schnellkauf abgebrochen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert. Der Kunde wird zurück zur Warenkorbseite geleitet und erhält einen Hinweis. + +Zwischenbildschirm zur Auswahl der Versandmethode anzeigen: +Über den Zwischenbildschirm können Benutzer ihre eigene Versandmethode auswählen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Wenn der Benutzer im Kostenvoranschlag auf der Warenkorbseite eine Versandmethode auswählt, wird diese Versandmethode für den fastcheckout verwendet." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Wenn aktiviert, wird die Schaltfläche für den fastcheckout nur auf der Warenkorbseite für Gastbenutzer angezeigt. + +Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle Checkout für die Produktseite aktiviert ist, wird die Schaltfläche für den fastcheckout immer angezeigt.." +"Show the fast checkout button on the cart page, only for guest customers.","Zeigen Sie die Schaltfläche fastcheckout auf der Warenkorbseite nur für Gastkunden an." +"When updating this setting, please flush Magento's cache afterwards ","Wenn Sie diese Einstellung aktualisieren, leeren Sie bitte anschließend den Magento-Cache " +"Continue","Weitermachen" \ No newline at end of file diff --git a/i18n/de_CH.csv b/i18n/de_CH.csv index b6cac79f..f833f9e5 100644 --- a/i18n/de_CH.csv +++ b/i18n/de_CH.csv @@ -245,3 +245,54 @@ Diese Einstellung gilt nicht für Fastcheckout." "Wählen Sie aus, für welche Kundengruppe iDEAL verfügbar ist. Kundengruppen werden in Magento definiert (Menü: Kunden->Kundengruppen). Diese Einstellung gilt nicht für Fastcheckout." +"Fast Checkout","Fastcheckout" +"iDEAL Fast Checkout","iDEAL Fastcheckout" +"Cart page","Warenkorbseite" +"Minicart","Mini-Warenkorb" +"Product page","Produktseite" +"Default shipping method","Standardversandmethode" +"Fallback shipping method","Zurückgreifen-Versandmethode" +"Fallback","Zurückgreifen" +"Use estimate selection","Schätzauswahl verwenden" +"Guest checkout only","Nur als Gast zur Kasse gehen" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Zeigen Sie die Schaltfläche für die fastcheckout auf der Warenkorbseite an. + +Mit dieser Schaltfläche können Benutzer direkt vom Warenkorb aus zur Kasse gehen, ohne ihre Adresse eingeben zu müssen." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Zeigen Sie die Schaltfläche für die fastcheckout im Mini-Warenkorb an. + +Mit dieser Schaltfläche können Benutzer direkt vom Mini-Warenkorb aus bezahlen, ohne ihre Adresse eingeben zu müssen." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Zeigen Sie auf jeder Produktseite den Button für die fastcheckout an. + +Mit diesem Button können Benutzer direkt vom Warenkorb aus zur Kaufabwicklung gehen, ohne ihre Adresse eingeben zu müssen." +"Select the shipping method that should be applied first.","Wählen Sie die Versandart aus, die zuerst angewendet werden soll." +"The default shipping method will be applied to fast checkout orders.","Für Bestellungen mit fastcheckout wird die Standardversandmethode angewendet." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Wählen Sie die Fallback-Versandmethode aus, die angewendet wird, wenn die Standardversandmethode nicht angewendet werden konnte." +"In case the default shipping method could not by applied, this shiping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: + +Hinweis anzeigen und Schnellkauf abbrechen: +Wenn diese Option ausgewählt ist, wird der Schnellkauf abgebrochen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert. Der Kunde wird zurück zur Warenkorbseite geleitet und erhält einen Hinweis. + +Zwischenbildschirm zur Auswahl der Versandmethode anzeigen: +Über den Zwischenbildschirm können Benutzer ihre eigene Versandmethode auswählen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Wenn der Benutzer im Kostenvoranschlag auf der Warenkorbseite eine Versandmethode auswählt, wird diese Versandmethode für den fastcheckout verwendet." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Wenn aktiviert, wird die Schaltfläche für den fastcheckout nur auf der Warenkorbseite für Gastbenutzer angezeigt. + +Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle Checkout für die Produktseite aktiviert ist, wird die Schaltfläche für den fastcheckout immer angezeigt.." +"Show the fast checkout button on the cart page, only for guest customers.","Zeigen Sie die Schaltfläche fastcheckout auf der Warenkorbseite nur für Gastkunden an." +"When updating this setting, please flush Magento's cache afterwards ","Wenn Sie diese Einstellung aktualisieren, leeren Sie bitte anschließend den Magento-Cache " +"Continue","Weitermachen" diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index b6cac79f..f833f9e5 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -245,3 +245,54 @@ Diese Einstellung gilt nicht für Fastcheckout." "Wählen Sie aus, für welche Kundengruppe iDEAL verfügbar ist. Kundengruppen werden in Magento definiert (Menü: Kunden->Kundengruppen). Diese Einstellung gilt nicht für Fastcheckout." +"Fast Checkout","Fastcheckout" +"iDEAL Fast Checkout","iDEAL Fastcheckout" +"Cart page","Warenkorbseite" +"Minicart","Mini-Warenkorb" +"Product page","Produktseite" +"Default shipping method","Standardversandmethode" +"Fallback shipping method","Zurückgreifen-Versandmethode" +"Fallback","Zurückgreifen" +"Use estimate selection","Schätzauswahl verwenden" +"Guest checkout only","Nur als Gast zur Kasse gehen" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Zeigen Sie die Schaltfläche für die fastcheckout auf der Warenkorbseite an. + +Mit dieser Schaltfläche können Benutzer direkt vom Warenkorb aus zur Kasse gehen, ohne ihre Adresse eingeben zu müssen." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Zeigen Sie die Schaltfläche für die fastcheckout im Mini-Warenkorb an. + +Mit dieser Schaltfläche können Benutzer direkt vom Mini-Warenkorb aus bezahlen, ohne ihre Adresse eingeben zu müssen." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Zeigen Sie auf jeder Produktseite den Button für die fastcheckout an. + +Mit diesem Button können Benutzer direkt vom Warenkorb aus zur Kaufabwicklung gehen, ohne ihre Adresse eingeben zu müssen." +"Select the shipping method that should be applied first.","Wählen Sie die Versandart aus, die zuerst angewendet werden soll." +"The default shipping method will be applied to fast checkout orders.","Für Bestellungen mit fastcheckout wird die Standardversandmethode angewendet." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Wählen Sie die Fallback-Versandmethode aus, die angewendet wird, wenn die Standardversandmethode nicht angewendet werden konnte." +"In case the default shipping method could not by applied, this shiping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: + +Hinweis anzeigen und Schnellkauf abbrechen: +Wenn diese Option ausgewählt ist, wird der Schnellkauf abgebrochen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert. Der Kunde wird zurück zur Warenkorbseite geleitet und erhält einen Hinweis. + +Zwischenbildschirm zur Auswahl der Versandmethode anzeigen: +Über den Zwischenbildschirm können Benutzer ihre eigene Versandmethode auswählen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Wenn der Benutzer im Kostenvoranschlag auf der Warenkorbseite eine Versandmethode auswählt, wird diese Versandmethode für den fastcheckout verwendet." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Wenn aktiviert, wird die Schaltfläche für den fastcheckout nur auf der Warenkorbseite für Gastbenutzer angezeigt. + +Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle Checkout für die Produktseite aktiviert ist, wird die Schaltfläche für den fastcheckout immer angezeigt.." +"Show the fast checkout button on the cart page, only for guest customers.","Zeigen Sie die Schaltfläche fastcheckout auf der Warenkorbseite nur für Gastkunden an." +"When updating this setting, please flush Magento's cache afterwards ","Wenn Sie diese Einstellung aktualisieren, leeren Sie bitte anschließend den Magento-Cache " +"Continue","Weitermachen" diff --git a/i18n/de_LU.csv b/i18n/de_LU.csv index c0a03c12..ec9fb16b 100644 --- a/i18n/de_LU.csv +++ b/i18n/de_LU.csv @@ -246,3 +246,54 @@ Diese Einstellung gilt nicht für Fastcheckout." "Wählen Sie aus, für welche Kundengruppe iDEAL verfügbar ist. Kundengruppen werden in Magento definiert (Menü: Kunden->Kundengruppen). Diese Einstellung gilt nicht für Fastcheckout." +"Fast Checkout","Fastcheckout" +"iDEAL Fast Checkout","iDEAL Fastcheckout" +"Cart page","Warenkorbseite" +"Minicart","Mini-Warenkorb" +"Product page","Produktseite" +"Default shipping method","Standardversandmethode" +"Fallback shipping method","Zurückgreifen-Versandmethode" +"Fallback","Zurückgreifen" +"Use estimate selection","Schätzauswahl verwenden" +"Guest checkout only","Nur als Gast zur Kasse gehen" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Zeigen Sie die Schaltfläche für die fastcheckout auf der Warenkorbseite an. + +Mit dieser Schaltfläche können Benutzer direkt vom Warenkorb aus zur Kasse gehen, ohne ihre Adresse eingeben zu müssen." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Zeigen Sie die Schaltfläche für die fastcheckout im Mini-Warenkorb an. + +Mit dieser Schaltfläche können Benutzer direkt vom Mini-Warenkorb aus bezahlen, ohne ihre Adresse eingeben zu müssen." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Zeigen Sie auf jeder Produktseite den Button für die fastcheckout an. + +Mit diesem Button können Benutzer direkt vom Warenkorb aus zur Kaufabwicklung gehen, ohne ihre Adresse eingeben zu müssen." +"Select the shipping method that should be applied first.","Wählen Sie die Versandart aus, die zuerst angewendet werden soll." +"The default shipping method will be applied to fast checkout orders.","Für Bestellungen mit fastcheckout wird die Standardversandmethode angewendet." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Wählen Sie die Fallback-Versandmethode aus, die angewendet wird, wenn die Standardversandmethode nicht angewendet werden konnte." +"In case the default shipping method could not by applied, this shiping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: + +Hinweis anzeigen und Schnellkauf abbrechen: +Wenn diese Option ausgewählt ist, wird der Schnellkauf abgebrochen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert. Der Kunde wird zurück zur Warenkorbseite geleitet und erhält einen Hinweis. + +Zwischenbildschirm zur Auswahl der Versandmethode anzeigen: +Über den Zwischenbildschirm können Benutzer ihre eigene Versandmethode auswählen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Wenn der Benutzer im Kostenvoranschlag auf der Warenkorbseite eine Versandmethode auswählt, wird diese Versandmethode für den fastcheckout verwendet." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Wenn aktiviert, wird die Schaltfläche für den fastcheckout nur auf der Warenkorbseite für Gastbenutzer angezeigt. + +Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle Checkout für die Produktseite aktiviert ist, wird die Schaltfläche für den fastcheckout immer angezeigt.." +"Show the fast checkout button on the cart page, only for guest customers.","Zeigen Sie die Schaltfläche fastcheckout auf der Warenkorbseite nur für Gastkunden an." +"When updating this setting, please flush Magento's cache afterwards ","Wenn Sie diese Einstellung aktualisieren, leeren Sie bitte anschließend den Magento-Cache " +"Continue","Weitermachen" diff --git a/i18n/en_US.csv b/i18n/en_US.csv index babc73e8..e3710f83 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -310,3 +310,54 @@ This setting doesn't apply to Fastcheckout." This setting doesn't apply to Fastcheckout.","Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). This setting doesn't apply to Fastcheckout." +"Fast Checkout","Fast Checkout" +"iDEAL Fast Checkout","iDEAL Fast Checkout" +"Cart page","Cart page" +"Minicart","Minicart" +"Product page","Product page" +"Default shipping method","Default shipping method" +"Fallback shipping method","Fallback shipping method" +"Fallback","Fallback" +"Use estimate selection","Use estimate selection" +"Guest checkout only","Guest checkout only" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address." +"Select the shipping method that should be applied first.","Select the shipping method that should be applied first." +"The default shipping method will be applied to fast checkout orders.","The default shipping method will be applied to fast checkout orders." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Select the fallback shipping method, which will be applied when the default shipping method could not be applied." +"In case the default shipping method could not by applied, this shiping method will be used.","In case the default shipping method could not by applied, this shiping method will be used." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown." +"Show the fast checkout button on the cart page, only for guest customers.","Show the fast checkout button on the cart page, only for guest customers." +"When updating this setting, please flush Magento's cache afterwards ","When updating this setting, please flush Magento's cache afterwards " +"Continue","Continue" diff --git a/i18n/fr_BE.csv b/i18n/fr_BE.csv index 64aa0c0d..70dd1036 100644 --- a/i18n/fr_BE.csv +++ b/i18n/fr_BE.csv @@ -247,3 +247,54 @@ Ce paramètre ne s'applique pas à Fastcheckout." This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." +"Fast Checkout","Fastcheckout" +"iDEAL Fast Checkout","iDEAL Fastcheckout" +"Cart page","Page du panier" +"Minicart","Mini-panier" +"Product page","Page produit" +"Default shipping method","Méthode d'expédition par défaut" +"Fallback shipping method","Méthode d'expédition de secours" +"Fallback","Retomber" +"Use estimate selection","Utiliser la sélection d'estimation" +"Guest checkout only","Paiement réservé aux invités uniquement" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Afficher le bouton de paiement rapide sur la page du panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Afficher le bouton de paiement rapide sur le mini-panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le mini-panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Affichez le bouton de paiement rapide sur chaque page produit. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." +"The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." +"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : + +Afficher un avis et abandonner le paiement rapide : +Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. + +Afficher l'écran intermédiaire pour sélectionner le mode d'expédition : +L'utilisation de l'écran intermédiaire permettra aux utilisateurs de sélectionner leur propre mode d'expédition au cas où le mode d'expédition sélectionné ne fonctionnerait pas pour la commande." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Lorsque l'utilisateur sélectionne un mode d'expédition dans l'estimation sur la page du panier, ce mode d'expédition sera utilisé pour un paiement rapide." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Lorsque cette option est activée, le bouton de paiement rapide ne s'affiche sur la page du panier que pour les utilisateurs invités. + +Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé pour la page produit, le bouton de paiement rapide sera toujours affiché." +"Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." +"When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " +"Continue","Continuer" diff --git a/i18n/fr_CA.csv b/i18n/fr_CA.csv index 64aa0c0d..70dd1036 100644 --- a/i18n/fr_CA.csv +++ b/i18n/fr_CA.csv @@ -247,3 +247,54 @@ Ce paramètre ne s'applique pas à Fastcheckout." This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." +"Fast Checkout","Fastcheckout" +"iDEAL Fast Checkout","iDEAL Fastcheckout" +"Cart page","Page du panier" +"Minicart","Mini-panier" +"Product page","Page produit" +"Default shipping method","Méthode d'expédition par défaut" +"Fallback shipping method","Méthode d'expédition de secours" +"Fallback","Retomber" +"Use estimate selection","Utiliser la sélection d'estimation" +"Guest checkout only","Paiement réservé aux invités uniquement" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Afficher le bouton de paiement rapide sur la page du panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Afficher le bouton de paiement rapide sur le mini-panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le mini-panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Affichez le bouton de paiement rapide sur chaque page produit. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." +"The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." +"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : + +Afficher un avis et abandonner le paiement rapide : +Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. + +Afficher l'écran intermédiaire pour sélectionner le mode d'expédition : +L'utilisation de l'écran intermédiaire permettra aux utilisateurs de sélectionner leur propre mode d'expédition au cas où le mode d'expédition sélectionné ne fonctionnerait pas pour la commande." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Lorsque l'utilisateur sélectionne un mode d'expédition dans l'estimation sur la page du panier, ce mode d'expédition sera utilisé pour un paiement rapide." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Lorsque cette option est activée, le bouton de paiement rapide ne s'affiche sur la page du panier que pour les utilisateurs invités. + +Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé pour la page produit, le bouton de paiement rapide sera toujours affiché." +"Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." +"When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " +"Continue","Continuer" diff --git a/i18n/fr_CH.csv b/i18n/fr_CH.csv index 64aa0c0d..70dd1036 100644 --- a/i18n/fr_CH.csv +++ b/i18n/fr_CH.csv @@ -247,3 +247,54 @@ Ce paramètre ne s'applique pas à Fastcheckout." This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." +"Fast Checkout","Fastcheckout" +"iDEAL Fast Checkout","iDEAL Fastcheckout" +"Cart page","Page du panier" +"Minicart","Mini-panier" +"Product page","Page produit" +"Default shipping method","Méthode d'expédition par défaut" +"Fallback shipping method","Méthode d'expédition de secours" +"Fallback","Retomber" +"Use estimate selection","Utiliser la sélection d'estimation" +"Guest checkout only","Paiement réservé aux invités uniquement" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Afficher le bouton de paiement rapide sur la page du panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Afficher le bouton de paiement rapide sur le mini-panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le mini-panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Affichez le bouton de paiement rapide sur chaque page produit. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." +"The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." +"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : + +Afficher un avis et abandonner le paiement rapide : +Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. + +Afficher l'écran intermédiaire pour sélectionner le mode d'expédition : +L'utilisation de l'écran intermédiaire permettra aux utilisateurs de sélectionner leur propre mode d'expédition au cas où le mode d'expédition sélectionné ne fonctionnerait pas pour la commande." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Lorsque l'utilisateur sélectionne un mode d'expédition dans l'estimation sur la page du panier, ce mode d'expédition sera utilisé pour un paiement rapide." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Lorsque cette option est activée, le bouton de paiement rapide ne s'affiche sur la page du panier que pour les utilisateurs invités. + +Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé pour la page produit, le bouton de paiement rapide sera toujours affiché." +"Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." +"When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " +"Continue","Continuer" diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 7f18c1cc..395ab85a 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -247,3 +247,54 @@ Ce paramètre ne s'applique pas à Fastcheckout." This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." +"Fast Checkout","Fastcheckout" +"iDEAL Fast Checkout","iDEAL Fastcheckout" +"Cart page","Page du panier" +"Minicart","Mini-panier" +"Product page","Page produit" +"Default shipping method","Méthode d'expédition par défaut" +"Fallback shipping method","Méthode d'expédition de secours" +"Fallback","Retomber" +"Use estimate selection","Utiliser la sélection d'estimation" +"Guest checkout only","Paiement réservé aux invités uniquement" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Afficher le bouton de paiement rapide sur la page du panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Afficher le bouton de paiement rapide sur le mini-panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le mini-panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Affichez le bouton de paiement rapide sur chaque page produit. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." +"The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." +"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : + +Afficher un avis et abandonner le paiement rapide : +Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. + +Afficher l'écran intermédiaire pour sélectionner le mode d'expédition : +L'utilisation de l'écran intermédiaire permettra aux utilisateurs de sélectionner leur propre mode d'expédition au cas où le mode d'expédition sélectionné ne fonctionnerait pas pour la commande." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Lorsque l'utilisateur sélectionne un mode d'expédition dans l'estimation sur la page du panier, ce mode d'expédition sera utilisé pour un paiement rapide." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Lorsque cette option est activée, le bouton de paiement rapide ne s'affiche sur la page du panier que pour les utilisateurs invités. + +Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé pour la page produit, le bouton de paiement rapide sera toujours affiché." +"Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." +"When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " +"Continue","Continuer" diff --git a/i18n/fr_LU.csv b/i18n/fr_LU.csv index d7f6c218..dfa7189c 100644 --- a/i18n/fr_LU.csv +++ b/i18n/fr_LU.csv @@ -246,3 +246,54 @@ Ce paramètre ne s'applique pas à Fastcheckout." This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." +"Fast Checkout","Fastcheckout" +"iDEAL Fast Checkout","iDEAL Fastcheckout" +"Cart page","Page du panier" +"Minicart","Mini-panier" +"Product page","Page produit" +"Default shipping method","Méthode d'expédition par défaut" +"Fallback shipping method","Méthode d'expédition de secours" +"Fallback","Retomber" +"Use estimate selection","Utiliser la sélection d'estimation" +"Guest checkout only","Paiement réservé aux invités uniquement" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Afficher le bouton de paiement rapide sur la page du panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Afficher le bouton de paiement rapide sur le mini-panier. + +Ce bouton permet aux utilisateurs de payer directement depuis le mini-panier sans avoir à renseigner leur adresse." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Affichez le bouton de paiement rapide sur chaque page produit. + +Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avoir à renseigner leur adresse." +"Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." +"The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." +"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : + +Afficher un avis et abandonner le paiement rapide : +Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. + +Afficher l'écran intermédiaire pour sélectionner le mode d'expédition : +L'utilisation de l'écran intermédiaire permettra aux utilisateurs de sélectionner leur propre mode d'expédition au cas où le mode d'expédition sélectionné ne fonctionnerait pas pour la commande." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Lorsque l'utilisateur sélectionne un mode d'expédition dans l'estimation sur la page du panier, ce mode d'expédition sera utilisé pour un paiement rapide." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Lorsque cette option est activée, le bouton de paiement rapide ne s'affiche sur la page du panier que pour les utilisateurs invités. + +Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé pour la page produit, le bouton de paiement rapide sera toujours affiché." +"Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." +"When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " +"Continue","Continuer" diff --git a/i18n/nl_BE.csv b/i18n/nl_BE.csv index 602ef7ab..35faca04 100644 --- a/i18n/nl_BE.csv +++ b/i18n/nl_BE.csv @@ -304,3 +304,54 @@ Deze instelling is niet van toepassing op Fastcheckout." This setting doesn't apply to Fastcheckout.","Selecteer voor welke klantgroep iDEAL beschikbaar is. Klantgroepen worden gedefinieerd in Magento (Menu: Customers->Customer Groups). Deze instelling is niet van toepassing op Fastcheckout." +"Fast Checkout","Snel bestellen" +"iDEAL Fast Checkout","iDEAL Snel bestellen" +"Cart page","Winkelwagenpagina" +"Minicart","Minicart" +"Product page","Productpagina" +"Default shipping method","Standaardverzendmethode" +"Fallback shipping method","Terugvalverzendmethode" +"Fallback","Terugvaloptie" +"Use estimate selection","Gebruik schattings selectie" +"Guest checkout only","Alleen voor gasten toestaan" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Toon de 'snel bestellen' knop op de winkelwagenpagina. + +Met deze knop kunnen gebruikers direct afrekenen vanuit de winkelwagen zonder dat ze hun adres hoeven in te vullen." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Toon de 'snel bestellen' knop op de minicart. + +Met deze knop kunnen gebruikers direct afrekenen vanuit de minicart zonder dat ze hun adres hoeven in te vullen." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Toon de 'snel bestellen' knop op elke productpagina. + +Met deze knop kunnen gebruikers direct afrekenen vanuit de productpagina zonder dat ze hun adres hoeven in te vullen." +"Select the shipping method that should be applied first.","Selecteer de verzendmethode die als eerste moet worden toegepast." +"The default shipping method will be applied to fast checkout orders.","Voor bestellingen met snel bestellen wordt de standaardverzendmethode toegepast." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Selecteer de alternatieve verzendmethode die wordt toegepast als de standaardverzendmethode niet kan worden toegepast." +"In case the default shipping method could not by applied, this shiping method will be used.","Indien de standaard verzendmethode niet kan worden toegepast, wordt deze verzendmethode gebruikt." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Selecteer wat er moet gebeuren als beide verzendmethoden niet kunnen worden toegepast: + +Melding weergeven en snel bestellen afbreken: +Wanneer deze optie is geselecteerd, wordt het snel bestellen afgebroken als de geselecteerde verzendmethode niet werkt voor de bestelling. De klant wordt teruggeleid naar de winkelwagenpagina en krijgt een melding te zien. + +Tussenscherm weergeven om verzendmethode te selecteren: +Als u het tussenscherm gebruikt, kunnen gebruikers hun eigen verzendmethode selecteren als de geselecteerde verzendmethode niet werkt voor de bestelling." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Wanneer de gebruiker een verzendmethode selecteert in de offerte op de winkelwagenpagina, wordt deze verzendmethode gebruikt voor snel bestellen." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Wanneer ingeschakeld, wordt de knop voor snel bestellen alleen weergegeven op de winkelwagenpagina voor gastgebruikers. + +Deze instelling heeft geen effect op de productpagina. Als snel bestellen is ingeschakeld voor de productpagina, wordt de knop voor snel bestellen altijd weergegeven." +"Show the fast checkout button on the cart page, only for guest customers.","Toon de knop voor snel bestellen op de winkelwagenpagina, alleen voor gastklanten." +"When updating this setting, please flush Magento's cache afterwards ","Wanneer u deze instelling bijwerkt, moet u de cache van Magento daarna leegmaken " +"Continue","Verder" diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index deb7eb0c..50eed47e 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -296,3 +296,54 @@ Deze instelling is niet van toepassing op Fastcheckout." This setting doesn't apply to Fastcheckout.","Selecteer voor welke klantgroep iDEAL beschikbaar is. Klantgroepen worden gedefinieerd in Magento (Menu: Customers->Customer Groups). Deze instelling is niet van toepassing op Fastcheckout." +"Fast Checkout","Snel bestellen" +"iDEAL Fast Checkout","iDEAL Snel bestellen" +"Cart page","Winkelwagenpagina" +"Minicart","Minicart" +"Product page","Productpagina" +"Default shipping method","Standaardverzendmethode" +"Fallback shipping method","Terugvalverzendmethode" +"Fallback","Terugvaloptie" +"Use estimate selection","Gebruik schattings selectie" +"Guest checkout only","Alleen voor gasten toestaan" +"Show the fast checkout button on the cart page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Toon de 'snel bestellen' knop op de winkelwagenpagina. + +Met deze knop kunnen gebruikers direct afrekenen vanuit de winkelwagen zonder dat ze hun adres hoeven in te vullen." +"Show the fast checkout button on the minicart. + +This button allows users to checkout directly from the minicart without the need to fill in their address.","Toon de 'snel bestellen' knop op de minicart. + +Met deze knop kunnen gebruikers direct afrekenen vanuit de minicart zonder dat ze hun adres hoeven in te vullen." +"Show the fast checkout button on every product page. + +This button allows users to checkout directly from the cart without the need to fill in their address.","Toon de 'snel bestellen' knop op elke productpagina. + +Met deze knop kunnen gebruikers direct afrekenen vanuit de productpagina zonder dat ze hun adres hoeven in te vullen." +"Select the shipping method that should be applied first.","Selecteer de verzendmethode die als eerste moet worden toegepast." +"The default shipping method will be applied to fast checkout orders.","Voor bestellingen met snel bestellen wordt de standaardverzendmethode toegepast." +"Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Selecteer de alternatieve verzendmethode die wordt toegepast als de standaardverzendmethode niet kan worden toegepast." +"In case the default shipping method could not by applied, this shiping method will be used.","Indien de standaard verzendmethode niet kan worden toegepast, wordt deze verzendmethode gebruikt." +"Select what should happen when both shipping methods could not be applied: + +Show notice and abort fast checkout: +When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. + +Show intermediate screen to select shipping method: +Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Selecteer wat er moet gebeuren als beide verzendmethoden niet kunnen worden toegepast: + +Melding weergeven en snel bestellen afbreken: +Wanneer deze optie is geselecteerd, wordt het snel bestellen afgebroken als de geselecteerde verzendmethode niet werkt voor de bestelling. De klant wordt teruggeleid naar de winkelwagenpagina en krijgt een melding te zien. + +Tussenscherm weergeven om verzendmethode te selecteren: +Als u het tussenscherm gebruikt, kunnen gebruikers hun eigen verzendmethode selecteren als de geselecteerde verzendmethode niet werkt voor de bestelling." +"When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","Wanneer de gebruiker een verzendmethode selecteert in de offerte op de winkelwagenpagina, wordt deze verzendmethode gebruikt voor snel bestellen." +"When enabled, the fast checkout button will only be shown on the cart page for guest users. + +This setting does not effect the product page. If fast checkout is enabled for the product page, the fast checkout button will always be shown.","Wanneer ingeschakeld, wordt de knop voor snel bestellen alleen weergegeven op de winkelwagenpagina voor gastgebruikers. + +Deze instelling heeft geen effect op de productpagina. Als snel bestellen is ingeschakeld voor de productpagina, wordt de knop voor snel bestellen altijd weergegeven." +"Show the fast checkout button on the cart page, only for guest customers.","Toon de knop voor snel bestellen op de winkelwagenpagina, alleen voor gastklanten." +"When updating this setting, please flush Magento's cache afterwards ","Wanneer u deze instelling bijwerkt, moet u de cache van Magento daarna leegmaken " +"Continue","Verder" diff --git a/view/frontend/templates/pay_fast_checkout_cart.phtml b/view/frontend/templates/pay_fast_checkout_cart.phtml index 2cca9869..19a8e4a4 100644 --- a/view/frontend/templates/pay_fast_checkout_cart.phtml +++ b/view/frontend/templates/pay_fast_checkout_cart.phtml @@ -13,7 +13,7 @@ title="Fast Checkout" class="action tocart primary paynl-fast_checkout-btn" data-mage-init='{"Paynl_Payment/js/fast-checkout-cart-view": {}}'> - Fast Checkout +
diff --git a/view/frontend/templates/pay_fast_checkout_product.phtml b/view/frontend/templates/pay_fast_checkout_product.phtml index 0c54752c..e9ffc1bc 100644 --- a/view/frontend/templates/pay_fast_checkout_product.phtml +++ b/view/frontend/templates/pay_fast_checkout_product.phtml @@ -8,6 +8,6 @@ title="Fast Checkout" class="action primary paynl-fast-checkout-btn" data-mage-init='{"Paynl_Payment/js/fast-checkout-product-view": {}}'> - Fast Checkout +
\ No newline at end of file diff --git a/view/frontend/web/css/payFastCheckout.css b/view/frontend/web/css/payFastCheckout.css index 505d05d3..781376ac 100644 --- a/view/frontend/web/css/payFastCheckout.css +++ b/view/frontend/web/css/payFastCheckout.css @@ -3,12 +3,7 @@ width: 100%; } -#paynl_fast_checkout_product { - display: block; - margin-bottom: 0; - margin-right: 1%; - width: 49%; -} + #paynl_fast_checkout_cart button, #paynl_fast_checkout_product button, @@ -28,10 +23,6 @@ background-position: 8px center; } -#paynl_fast_checkout_fallback button{ - max-width: 250px; -} - #top-cart-btn-fastcheckout{ margin-top: 5px; } @@ -47,4 +38,28 @@ background-repeat: no-repeat; background-size: 51px; background-position: 8px center; +} + +#paynl_fast_checkout_fallback button { + max-width: 100%; +} + +#paynl_fast_checkout_product { + display: block; + margin-bottom: 0; + margin-right: 1%; + width: 100%; +} + +@media all and (min-width: 769px),print { + #paynl_fast_checkout_product { + display: block; + margin-bottom: 0; + margin-right: 1%; + width: 49%; + } + + #paynl_fast_checkout_fallback button{ + max-width: 250px; + } } \ No newline at end of file From 2a4fbe401793c3829e6cd6f6e6949a744fd56a07 Mon Sep 17 00:00:00 2001 From: woutse Date: Wed, 21 Aug 2024 10:03:12 +0200 Subject: [PATCH 33/47] Updated texts --- Model/PayPaymentCreateFastCheckoutOrder.php | 2 +- etc/adminhtml/paymentmethods/ideal.xml | 8 ++++---- i18n/de_AT.csv | 6 +++--- i18n/de_CH.csv | 6 +++--- i18n/de_DE.csv | 6 +++--- i18n/de_LU.csv | 6 +++--- i18n/en_US.csv | 10 +++++----- i18n/fr_BE.csv | 6 +++--- i18n/fr_CA.csv | 6 +++--- i18n/fr_CH.csv | 6 +++--- i18n/fr_FR.csv | 6 +++--- i18n/fr_LU.csv | 6 +++--- i18n/nl_BE.csv | 6 +++--- i18n/nl_NL.csv | 6 +++--- 14 files changed, 43 insertions(+), 43 deletions(-) diff --git a/Model/PayPaymentCreateFastCheckoutOrder.php b/Model/PayPaymentCreateFastCheckoutOrder.php index fbd84362..dd834bf2 100644 --- a/Model/PayPaymentCreateFastCheckoutOrder.php +++ b/Model/PayPaymentCreateFastCheckoutOrder.php @@ -214,7 +214,7 @@ public function create($params) $order->getPayment()->setAdditionalInformation($additionalData); $order->save(); - $order->addStatusHistoryComment(__('PAY. - Fast checkout order created'))->save(); + $order->addStatusHistoryComment(__('PAY. - Created iDEAL Fast Checkout order'))->save(); return $order; } diff --git a/etc/adminhtml/paymentmethods/ideal.xml b/etc/adminhtml/paymentmethods/ideal.xml index 2331d1eb..de1075d4 100644 --- a/etc/adminhtml/paymentmethods/ideal.xml +++ b/etc/adminhtml/paymentmethods/ideal.xml @@ -155,7 +155,7 @@ This setting doesn't apply to fast checkout.
- + Paynl\Payment\Model\Config\Source\OffOn @@ -211,7 +211,7 @@ This button allows users to checkout directly from the cart without the need to 1 Select the fallback shipping method, which will be applied when the default shipping method could not be applied. - In case the default shipping method could not by applied, this shiping method will be used. + In case the default shipping method could not by applied, this shipping method will be used. @@ -223,10 +223,10 @@ This button allows users to checkout directly from the cart without the need to Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order. +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order. diff --git a/i18n/de_AT.csv b/i18n/de_AT.csv index 6876a1c6..bff29938 100644 --- a/i18n/de_AT.csv +++ b/i18n/de_AT.csv @@ -271,14 +271,14 @@ Mit diesem Button können Benutzer direkt vom Warenkorb aus zur Kaufabwicklung g "Select the shipping method that should be applied first.","Wählen Sie die Versandart aus, die zuerst angewendet werden soll." "The default shipping method will be applied to fast checkout orders.","Für Bestellungen mit fastcheckout wird die Standardversandmethode angewendet." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Wählen Sie die Fallback-Versandmethode aus, die angewendet wird, wenn die Standardversandmethode nicht angewendet werden konnte." -"In case the default shipping method could not by applied, this shiping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." +"In case the default shipping method could not by applied, this shipping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: Hinweis anzeigen und Schnellkauf abbrechen: Wenn diese Option ausgewählt ist, wird der Schnellkauf abgebrochen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert. Der Kunde wird zurück zur Warenkorbseite geleitet und erhält einen Hinweis. diff --git a/i18n/de_CH.csv b/i18n/de_CH.csv index f833f9e5..d0cc4eee 100644 --- a/i18n/de_CH.csv +++ b/i18n/de_CH.csv @@ -273,14 +273,14 @@ Mit diesem Button können Benutzer direkt vom Warenkorb aus zur Kaufabwicklung g "Select the shipping method that should be applied first.","Wählen Sie die Versandart aus, die zuerst angewendet werden soll." "The default shipping method will be applied to fast checkout orders.","Für Bestellungen mit fastcheckout wird die Standardversandmethode angewendet." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Wählen Sie die Fallback-Versandmethode aus, die angewendet wird, wenn die Standardversandmethode nicht angewendet werden konnte." -"In case the default shipping method could not by applied, this shiping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." +"In case the default shipping method could not by applied, this shipping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: Hinweis anzeigen und Schnellkauf abbrechen: Wenn diese Option ausgewählt ist, wird der Schnellkauf abgebrochen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert. Der Kunde wird zurück zur Warenkorbseite geleitet und erhält einen Hinweis. diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index f833f9e5..d0cc4eee 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -273,14 +273,14 @@ Mit diesem Button können Benutzer direkt vom Warenkorb aus zur Kaufabwicklung g "Select the shipping method that should be applied first.","Wählen Sie die Versandart aus, die zuerst angewendet werden soll." "The default shipping method will be applied to fast checkout orders.","Für Bestellungen mit fastcheckout wird die Standardversandmethode angewendet." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Wählen Sie die Fallback-Versandmethode aus, die angewendet wird, wenn die Standardversandmethode nicht angewendet werden konnte." -"In case the default shipping method could not by applied, this shiping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." +"In case the default shipping method could not by applied, this shipping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: Hinweis anzeigen und Schnellkauf abbrechen: Wenn diese Option ausgewählt ist, wird der Schnellkauf abgebrochen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert. Der Kunde wird zurück zur Warenkorbseite geleitet und erhält einen Hinweis. diff --git a/i18n/de_LU.csv b/i18n/de_LU.csv index ec9fb16b..7e9c65db 100644 --- a/i18n/de_LU.csv +++ b/i18n/de_LU.csv @@ -274,14 +274,14 @@ Mit diesem Button können Benutzer direkt vom Warenkorb aus zur Kaufabwicklung g "Select the shipping method that should be applied first.","Wählen Sie die Versandart aus, die zuerst angewendet werden soll." "The default shipping method will be applied to fast checkout orders.","Für Bestellungen mit fastcheckout wird die Standardversandmethode angewendet." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Wählen Sie die Fallback-Versandmethode aus, die angewendet wird, wenn die Standardversandmethode nicht angewendet werden konnte." -"In case the default shipping method could not by applied, this shiping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." +"In case the default shipping method could not by applied, this shipping method will be used.","Falls die Standardversandart nicht angewendet werden konnte, wird diese Versandart verwendet." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Wählen Sie aus, was passieren soll, wenn beide Versandmethoden nicht angewendet werden konnten: Hinweis anzeigen und Schnellkauf abbrechen: Wenn diese Option ausgewählt ist, wird der Schnellkauf abgebrochen, falls die ausgewählte Versandmethode für die Bestellung nicht funktioniert. Der Kunde wird zurück zur Warenkorbseite geleitet und erhält einen Hinweis. diff --git a/i18n/en_US.csv b/i18n/en_US.csv index e3710f83..40cea642 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -338,20 +338,20 @@ This button allows users to checkout directly from the cart without the need to "Select the shipping method that should be applied first.","Select the shipping method that should be applied first." "The default shipping method will be applied to fast checkout orders.","The default shipping method will be applied to fast checkout orders." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Select the fallback shipping method, which will be applied when the default shipping method could not be applied." -"In case the default shipping method could not by applied, this shiping method will be used.","In case the default shipping method could not by applied, this shiping method will be used." +"In case the default shipping method could not by applied, this shipping method will be used.","In case the default shipping method could not by applied, this shipping method will be used." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Select what should happen when both shipping methods could not be applied: +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order." +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order." "When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout.","When the user selects a shipping method in the estimate on the cart page, this shipping method wil be used for fast checkout." "When enabled, the fast checkout button will only be shown on the cart page for guest users. diff --git a/i18n/fr_BE.csv b/i18n/fr_BE.csv index 70dd1036..15e69ac2 100644 --- a/i18n/fr_BE.csv +++ b/i18n/fr_BE.csv @@ -275,14 +275,14 @@ Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avo "Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." "The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." -"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"In case the default shipping method could not by applied, this shipping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : Afficher un avis et abandonner le paiement rapide : Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. diff --git a/i18n/fr_CA.csv b/i18n/fr_CA.csv index 70dd1036..15e69ac2 100644 --- a/i18n/fr_CA.csv +++ b/i18n/fr_CA.csv @@ -275,14 +275,14 @@ Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avo "Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." "The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." -"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"In case the default shipping method could not by applied, this shipping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : Afficher un avis et abandonner le paiement rapide : Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. diff --git a/i18n/fr_CH.csv b/i18n/fr_CH.csv index 70dd1036..15e69ac2 100644 --- a/i18n/fr_CH.csv +++ b/i18n/fr_CH.csv @@ -275,14 +275,14 @@ Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avo "Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." "The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." -"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"In case the default shipping method could not by applied, this shipping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : Afficher un avis et abandonner le paiement rapide : Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 395ab85a..55906c96 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -275,14 +275,14 @@ Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avo "Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." "The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." -"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"In case the default shipping method could not by applied, this shipping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : Afficher un avis et abandonner le paiement rapide : Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. diff --git a/i18n/fr_LU.csv b/i18n/fr_LU.csv index dfa7189c..0d9c8272 100644 --- a/i18n/fr_LU.csv +++ b/i18n/fr_LU.csv @@ -274,14 +274,14 @@ Ce bouton permet aux utilisateurs de payer directement depuis le panier sans avo "Select the shipping method that should be applied first.","Sélectionnez le mode d’expédition qui doit être appliqué en premier." "The default shipping method will be applied to fast checkout orders.","La méthode d'expédition par défaut sera appliquée aux commandes de paiement rapide." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Sélectionnez la méthode d'expédition de secours, qui sera appliquée lorsque la méthode d'expédition par défaut ne pourra pas être appliquée." -"In case the default shipping method could not by applied, this shiping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." +"In case the default shipping method could not by applied, this shipping method will be used.","Dans le cas où le mode d'expédition par défaut ne pourrait pas être appliqué, ce mode d'expédition sera utilisé." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Sélectionnez ce qui doit se produire lorsque les deux méthodes d'expédition ne peuvent pas être appliquées : Afficher un avis et abandonner le paiement rapide : Lorsque cette option est sélectionnée, le paiement rapide sera abandonné si le mode d'expédition sélectionné ne fonctionne pas pour la commande, le client sera redirigé vers la page du panier et un avis s'affichera. diff --git a/i18n/nl_BE.csv b/i18n/nl_BE.csv index 35faca04..f9bbbff6 100644 --- a/i18n/nl_BE.csv +++ b/i18n/nl_BE.csv @@ -332,14 +332,14 @@ Met deze knop kunnen gebruikers direct afrekenen vanuit de productpagina zonder "Select the shipping method that should be applied first.","Selecteer de verzendmethode die als eerste moet worden toegepast." "The default shipping method will be applied to fast checkout orders.","Voor bestellingen met snel bestellen wordt de standaardverzendmethode toegepast." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Selecteer de alternatieve verzendmethode die wordt toegepast als de standaardverzendmethode niet kan worden toegepast." -"In case the default shipping method could not by applied, this shiping method will be used.","Indien de standaard verzendmethode niet kan worden toegepast, wordt deze verzendmethode gebruikt." +"In case the default shipping method could not by applied, this shipping method will be used.","Indien de standaard verzendmethode niet kan worden toegepast, wordt deze verzendmethode gebruikt." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Selecteer wat er moet gebeuren als beide verzendmethoden niet kunnen worden toegepast: +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Selecteer wat er moet gebeuren als beide verzendmethoden niet kunnen worden toegepast: Melding weergeven en snel bestellen afbreken: Wanneer deze optie is geselecteerd, wordt het snel bestellen afgebroken als de geselecteerde verzendmethode niet werkt voor de bestelling. De klant wordt teruggeleid naar de winkelwagenpagina en krijgt een melding te zien. diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index 50eed47e..4a2b2485 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -324,14 +324,14 @@ Met deze knop kunnen gebruikers direct afrekenen vanuit de productpagina zonder "Select the shipping method that should be applied first.","Selecteer de verzendmethode die als eerste moet worden toegepast." "The default shipping method will be applied to fast checkout orders.","Voor bestellingen met snel bestellen wordt de standaardverzendmethode toegepast." "Select the fallback shipping method, which will be applied when the default shipping method could not be applied.","Selecteer de alternatieve verzendmethode die wordt toegepast als de standaardverzendmethode niet kan worden toegepast." -"In case the default shipping method could not by applied, this shiping method will be used.","Indien de standaard verzendmethode niet kan worden toegepast, wordt deze verzendmethode gebruikt." +"In case the default shipping method could not by applied, this shipping method will be used.","Indien de standaard verzendmethode niet kan worden toegepast, wordt deze verzendmethode gebruikt." "Select what should happen when both shipping methods could not be applied: Show notice and abort fast checkout: -When This option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. +When this option is selected the fast checkout will be aborted in case the selected shipping method does not work for the order, the customer is redirected back to the cart page and shown a notice. Show intermediate screen to select shipping method: -Using the intermediate screen will allow uses to select their own shipping method in case the selected shipping method does not work for the order.","Selecteer wat er moet gebeuren als beide verzendmethoden niet kunnen worden toegepast: +Using the intermediate screen will allow users to select their own shipping method in case the selected shipping method does not work for the order.","Selecteer wat er moet gebeuren als beide verzendmethoden niet kunnen worden toegepast: Melding weergeven en snel bestellen afbreken: Wanneer deze optie is geselecteerd, wordt het snel bestellen afgebroken als de geselecteerde verzendmethode niet werkt voor de bestelling. De klant wordt teruggeleid naar de winkelwagenpagina en krijgt een melding te zien. From e14def34f21bfba1baaeb394c764cc7b01821414 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:56:08 +0200 Subject: [PATCH 34/47] Fix translations --- .../Source/FastCheckoutFallbackOptions.php | 2 +- i18n/de_AT.csv | 14 +++++++---- i18n/de_CH.csv | 12 ++++++---- i18n/de_DE.csv | 12 ++++++---- i18n/de_LU.csv | 12 ++++++---- i18n/en_US.csv | 24 +++++++++++-------- i18n/fr_BE.csv | 14 +++++++---- i18n/fr_CA.csv | 14 +++++++---- i18n/fr_CH.csv | 14 +++++++---- i18n/fr_FR.csv | 14 +++++++---- i18n/fr_LU.csv | 14 +++++++---- i18n/nl_BE.csv | 20 +++++++++------- i18n/nl_NL.csv | 18 ++++++++------ 13 files changed, 116 insertions(+), 68 deletions(-) diff --git a/Model/Config/Source/FastCheckoutFallbackOptions.php b/Model/Config/Source/FastCheckoutFallbackOptions.php index 5ca48694..a78c051c 100644 --- a/Model/Config/Source/FastCheckoutFallbackOptions.php +++ b/Model/Config/Source/FastCheckoutFallbackOptions.php @@ -30,7 +30,7 @@ public function toOptionArray() public function toArray() { return [ - 0 => __('Show notice and abort fastcheckout'), + 0 => __('Show notice and abort fast checkout'), 1 => __('Show intermediate screen to select shipping method') ]; } diff --git a/i18n/de_AT.csv b/i18n/de_AT.csv index bff29938..7e0d99d4 100644 --- a/i18n/de_AT.csv +++ b/i18n/de_AT.csv @@ -224,16 +224,16 @@ Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwisc "Refund amount must be greater than 0.00","Der Betrag muss größer als 0,00 sein" "Refund amount must not exceed ","Der Betrag darf nicht höher sein als " "Select a terminal","Wählen Sie ein Terminal aus" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: +This setting doesn't apply to fast checkout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: Privat, B2C: Diese Zahlungsmethode nur anzeigen, wenn der Kunde keinen Firmennamen eingegeben hat. @@ -293,4 +293,8 @@ This setting does not effect the product page. If fast checkout is enabled for t Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle Checkout für die Produktseite aktiviert ist, wird die Schaltfläche für den fastcheckout immer angezeigt.." "Show the fast checkout button on the cart page, only for guest customers.","Zeigen Sie die Schaltfläche fastcheckout auf der Warenkorbseite nur für Gastkunden an." "When updating this setting, please flush Magento's cache afterwards ","Wenn Sie diese Einstellung aktualisieren, leeren Sie bitte anschließend den Magento-Cache " -"Continue","Weitermachen" \ No newline at end of file +"Continue","Weitermachen" +"On - as Optional","Ein - als Optional" +"On - as Required","Ein - nach Bedarf" +"Show notice and abort fast checkout","Hinweis anzeigen und Schnellkasse abbrechen" +"Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" \ No newline at end of file diff --git a/i18n/de_CH.csv b/i18n/de_CH.csv index d0cc4eee..1215d786 100644 --- a/i18n/de_CH.csv +++ b/i18n/de_CH.csv @@ -226,16 +226,16 @@ Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwisc "Refund amount must be greater than 0.00","Der Betrag muss größer als 0,00 sein" "Refund amount must not exceed ","Der Betrag darf nicht höher sein als " "Select a terminal","Wählen Sie ein Terminal aus" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: +This setting doesn't apply to fast checkout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: Privat, B2C: Diese Zahlungsmethode nur anzeigen, wenn der Kunde keinen Firmennamen eingegeben hat. @@ -296,3 +296,7 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "Show the fast checkout button on the cart page, only for guest customers.","Zeigen Sie die Schaltfläche fastcheckout auf der Warenkorbseite nur für Gastkunden an." "When updating this setting, please flush Magento's cache afterwards ","Wenn Sie diese Einstellung aktualisieren, leeren Sie bitte anschließend den Magento-Cache " "Continue","Weitermachen" +"On - as Optional","Ein - als Optional" +"On - as Required","Ein - nach Bedarf" +"Show notice and abort fast checkout","Hinweis anzeigen und Schnellkasse abbrechen" +"Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" \ No newline at end of file diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index d0cc4eee..1215d786 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -226,16 +226,16 @@ Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwisc "Refund amount must be greater than 0.00","Der Betrag muss größer als 0,00 sein" "Refund amount must not exceed ","Der Betrag darf nicht höher sein als " "Select a terminal","Wählen Sie ein Terminal aus" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: +This setting doesn't apply to fast checkout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: Privat, B2C: Diese Zahlungsmethode nur anzeigen, wenn der Kunde keinen Firmennamen eingegeben hat. @@ -296,3 +296,7 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "Show the fast checkout button on the cart page, only for guest customers.","Zeigen Sie die Schaltfläche fastcheckout auf der Warenkorbseite nur für Gastkunden an." "When updating this setting, please flush Magento's cache afterwards ","Wenn Sie diese Einstellung aktualisieren, leeren Sie bitte anschließend den Magento-Cache " "Continue","Weitermachen" +"On - as Optional","Ein - als Optional" +"On - as Required","Ein - nach Bedarf" +"Show notice and abort fast checkout","Hinweis anzeigen und Schnellkasse abbrechen" +"Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" \ No newline at end of file diff --git a/i18n/de_LU.csv b/i18n/de_LU.csv index 7e9c65db..32729789 100644 --- a/i18n/de_LU.csv +++ b/i18n/de_LU.csv @@ -227,16 +227,16 @@ Stellen Sie diese Auswahl an der Kasse bereit: Der Kunde kann an der Kasse zwisc "Refund amount must be greater than 0.00","Der Betrag muss größer als 0,00 sein" "Refund amount must not exceed ","Der Betrag darf nicht höher sein als " "Select a terminal","Wählen Sie ein Terminal aus" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Legen Sie fest, in welchem Land iDEAL verfügbar sein soll. Diese Einstellung gilt nicht für Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Legen Sie den Mindestbestellwert fest, damit iDEAL verfügbar ist. Lassen Sie das Feld leer, wenn Sie keinen Mindestwert festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Legen Sie den maximalen Bestellbetrag fest, der für iDEAL verfügbar sein soll. Lassen Sie das Feld leer, wenn Sie keinen Höchstbetrag festlegen möchten. Diese Einstellung gilt nicht für Fastcheckout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: +This setting doesn't apply to fast checkout.","Standardmäßig sind Zahlungsmethoden für alle Kundentypen verfügbar. Um dies auf einen Kundentyp zu beschränken, verwenden Sie eine der folgenden Optionen: Privat, B2C: Diese Zahlungsmethode nur anzeigen, wenn der Kunde keinen Firmennamen eingegeben hat. @@ -297,3 +297,7 @@ Diese Einstellung wirkt sich nicht auf die Produktseite aus. Wenn der schnelle C "Show the fast checkout button on the cart page, only for guest customers.","Zeigen Sie die Schaltfläche fastcheckout auf der Warenkorbseite nur für Gastkunden an." "When updating this setting, please flush Magento's cache afterwards ","Wenn Sie diese Einstellung aktualisieren, leeren Sie bitte anschließend den Magento-Cache " "Continue","Weitermachen" +"On - as Optional","Ein - als Optional" +"On - as Required","Ein - nach Bedarf" +"Show notice and abort fast checkout","Hinweis anzeigen und Schnellkasse abbrechen" +"Show intermediate screen to select shipping method","Zwischenbildschirm zur Auswahl der Versandart anzeigen" \ No newline at end of file diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 40cea642..d302bd91 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -272,44 +272,44 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Direct checkout payment: pin transaction will be started right when the instore is selected in the checkout. Payment takes place at the pickup location: the order is created in the Magento admin, the pin transaction can be started from there when the customer comes to pick up the order. Provide this choice in the checkout: the customer can choose in the checkout between the options given above." -"Doesn't apply to fastcheckout.","Doesn't apply to fastcheckout." +"doesn't apply to fast checkout.","doesn't apply to fast checkout." "By default payment methods are available in the checkout for all customer types. Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -Doesn't apply to fastcheckout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. +doesn't apply to fast checkout.","Standaard zijn betaalmethoden beschikbaar in de checkout voor alle klanttypen. Particulier, B2C: Laat deze betaalmethode alleen zien als de klant geen bedrijfsnaam heeft ingevoerd. Zakelijk, BB2: Laat deze betaalmethode alleen zien als de klant een bedrijfsnaam heeft opgegeven. -Doesn't apply to fastcheckout." +doesn't apply to fast checkout." "Pay. Refund by card","Pay. Refund by card" "Amount","Amount" "Terminal","Terminal" "Refund amount must be greater than 0.00","Refund amount must be greater than 0.00" "Refund amount must not exceed ","Refund amount must not exceed " "Select a terminal","Select a terminal" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: +This setting doesn't apply to fast checkout.","By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout." +This setting doesn't apply to fast checkout." "Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout.","Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). +This setting doesn't apply to fast checkout.","Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout." +This setting doesn't apply to fast checkout." "Fast Checkout","Fast Checkout" "iDEAL Fast Checkout","iDEAL Fast Checkout" "Cart page","Cart page" @@ -361,3 +361,7 @@ This setting does not effect the product page. If fast checkout is enabled for t "Show the fast checkout button on the cart page, only for guest customers.","Show the fast checkout button on the cart page, only for guest customers." "When updating this setting, please flush Magento's cache afterwards ","When updating this setting, please flush Magento's cache afterwards " "Continue","Continue" +"On - as Optional","On - as Optional" +"On - as Required","On - as Required" +"Show notice and abort fast checkout","Show notice and abort fast checkout" +"Show intermediate screen to select shipping method","Show intermediate screen to select shipping method" \ No newline at end of file diff --git a/i18n/fr_BE.csv b/i18n/fr_BE.csv index 15e69ac2..579f16d9 100644 --- a/i18n/fr_BE.csv +++ b/i18n/fr_BE.csv @@ -226,16 +226,16 @@ Proposer ce choix lors du paiement : le client peut choisir lors du paiement ent "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: +This setting doesn't apply to fast checkout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. @@ -244,7 +244,7 @@ Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a sai Ce paramètre ne s'applique pas à Fastcheckout." "Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). +This setting doesn't apply to fast checkout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." "Fast Checkout","Fastcheckout" @@ -298,3 +298,7 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." "When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " "Continue","Continuer" +"On - as Optional","Activé - en option" +"On - as Required","Activé - en requis" +"Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" +"Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" \ No newline at end of file diff --git a/i18n/fr_CA.csv b/i18n/fr_CA.csv index 15e69ac2..579f16d9 100644 --- a/i18n/fr_CA.csv +++ b/i18n/fr_CA.csv @@ -226,16 +226,16 @@ Proposer ce choix lors du paiement : le client peut choisir lors du paiement ent "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: +This setting doesn't apply to fast checkout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. @@ -244,7 +244,7 @@ Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a sai Ce paramètre ne s'applique pas à Fastcheckout." "Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). +This setting doesn't apply to fast checkout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." "Fast Checkout","Fastcheckout" @@ -298,3 +298,7 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." "When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " "Continue","Continuer" +"On - as Optional","Activé - en option" +"On - as Required","Activé - en requis" +"Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" +"Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" \ No newline at end of file diff --git a/i18n/fr_CH.csv b/i18n/fr_CH.csv index 15e69ac2..579f16d9 100644 --- a/i18n/fr_CH.csv +++ b/i18n/fr_CH.csv @@ -226,16 +226,16 @@ Proposer ce choix lors du paiement : le client peut choisir lors du paiement ent "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: +This setting doesn't apply to fast checkout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. @@ -244,7 +244,7 @@ Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a sai Ce paramètre ne s'applique pas à Fastcheckout." "Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). +This setting doesn't apply to fast checkout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." "Fast Checkout","Fastcheckout" @@ -298,3 +298,7 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." "When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " "Continue","Continuer" +"On - as Optional","Activé - en option" +"On - as Required","Activé - en requis" +"Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" +"Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" \ No newline at end of file diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 55906c96..c889b953 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -226,16 +226,16 @@ Proposer ce choix lors du paiement : le client peut choisir lors du paiement ent "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: +This setting doesn't apply to fast checkout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. @@ -244,7 +244,7 @@ Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a sai Ce paramètre ne s'applique pas à Fastcheckout." "Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). +This setting doesn't apply to fast checkout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." "Fast Checkout","Fastcheckout" @@ -298,3 +298,7 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." "When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " "Continue","Continuer" +"On - as Optional","Activé - en option" +"On - as Required","Activé - en requis" +"Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" +"Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" \ No newline at end of file diff --git a/i18n/fr_LU.csv b/i18n/fr_LU.csv index 0d9c8272..22728e3a 100644 --- a/i18n/fr_LU.csv +++ b/i18n/fr_LU.csv @@ -225,16 +225,16 @@ Proposer ce choix lors du paiement : le client peut choisir lors du paiement ent "Refund amount must be greater than 0.00","Le montant doit être supérieur à 0,00" "Refund amount must not exceed ","Le montant ne peut excéder " "Select a terminal","Sélectionnez un terminal" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Déterminez dans quel pays iDEAL doit être disponible. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Définissez le montant minimum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant minimum. Ce paramètre ne s'applique pas à Fastcheckout." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Définissez le montant maximum de commande pour que iDEAL soit disponible. Laissez ce champ vide si vous ne souhaitez pas définir de montant maximum. Ce paramètre ne s'applique pas à Fastcheckout." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: +This setting doesn't apply to fast checkout.","Par défaut, les modes de paiement sont disponibles pour tous les types de clients. Pour limiter cette option à un type de client, utilisez l'une des options suivantes: Privé, B2C: affichez ce mode de paiement uniquement lorsque le client n'a pas saisi de nom d'entreprise. @@ -243,7 +243,7 @@ Entreprise, BB2: affichez ce mode de paiement uniquement lorsque le client a sai Ce paramètre ne s'applique pas à Fastcheckout." "Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). +This setting doesn't apply to fast checkout.","Sélectionnez le groupe de clients auquel iDEAL est disponible. Les groupes de clients sont définis dans Magento (Menu: Clients->Groupes de clients). Ce paramètre ne s'applique pas à Fastcheckout." "Fast Checkout","Fastcheckout" @@ -297,3 +297,7 @@ Ce paramètre n'affecte pas la page produit. Si le paiement rapide est activé p "Show the fast checkout button on the cart page, only for guest customers.","Afficher le bouton de paiement rapide sur la page du panier, uniquement pour les clients invités." "When updating this setting, please flush Magento's cache afterwards ","Lors de la mise à jour de ce paramètre, veuillez ensuite vider le cache de Magento " "Continue","Continuer" +"On - as Optional","Activé - en option" +"On - as Required","Activé - en requis" +"Show notice and abort fast checkout","Afficher un avis et abandonner le fastcheckout" +"Show intermediate screen to select shipping method","Afficher l'écran intermédiaire pour sélectionner la méthode d'expédition" \ No newline at end of file diff --git a/i18n/nl_BE.csv b/i18n/nl_BE.csv index f9bbbff6..731fe6b9 100644 --- a/i18n/nl_BE.csv +++ b/i18n/nl_BE.csv @@ -276,34 +276,34 @@ Provide this choice in the checkout: the customer can choose in the checkout bet Directe betaling: de pintransactie wordt gestart zodra instore is geselecteerd bij het afrekenen. Betaling vindt plaats op de afhaallocatie: de bestelling wordt aangemaakt in de Magento admin, van daaruit kan de pintransactie gestart worden als de klant de bestelling komt ophalen. Geef deze keuze op bij het afrekenen: de klant kan bij het afrekenen kiezen tussen bovenstaande opties." -"Doesn't apply to fastcheckout.","Geldt niet voor fastcheckout." +"doesn't apply to fast checkout.","Geldt niet voor snel bestellen." "Pay. Refund by card","Pay. Retourpin" "Amount","Bedrag" "Terminal","Terminal" "Refund amount must be greater than 0.00","Het bedrag moet groter zijn dan 0,00" "Refund amount must not exceed ","Het bedrag mag niet hoger zijn dan " "Select a terminal","Selecteer een terminal" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Bepaal in welk land iDEAL beschikbaar moet zijn. Deze instelling is niet van toepassing op Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Stel het minimale bestelbedrag in voor iDEAL. Laat leeg als u geen minimumbedrag wilt instellen. Deze instelling is niet van toepassing op Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Stel het maximale orderbedrag in voor iDEAL dat beschikbaar moet zijn. Laat dit leeg als u geen maximumbedrag wilt instellen. Deze instelling is niet van toepassing op Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Bepaal in welk land iDEAL beschikbaar moet zijn. Deze instelling is niet van toepassing op snel bestellen." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Stel het minimale bestelbedrag in voor iDEAL. Laat leeg als u geen minimumbedrag wilt instellen. Deze instelling is niet van toepassing op snel bestellen." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Stel het maximale orderbedrag in voor iDEAL dat beschikbaar moet zijn. Laat dit leeg als u geen maximumbedrag wilt instellen. Deze instelling is niet van toepassing op snel bestellen." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Standaard zijn betaalmethoden beschikbaar voor alle klanttypen. Om dit te beperken tot een klanttype, gebruikt u een van de volgende opties: +This setting doesn't apply to fast checkout.","Standaard zijn betaalmethoden beschikbaar voor alle klanttypen. Om dit te beperken tot een klanttype, gebruikt u een van de volgende opties: Privé, B2C: Toon deze betaalmethode alleen als de klant geen bedrijfsnaam heeft ingevoerd. Zakelijk, BB2: Toon deze betaalmethode alleen als de klant een bedrijfsnaam heeft ingevoerd. -Deze instelling is niet van toepassing op Fastcheckout." +Deze instelling is niet van toepassing op snel bestellen." "Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout.","Selecteer voor welke klantgroep iDEAL beschikbaar is. Klantgroepen worden gedefinieerd in Magento (Menu: Customers->Customer Groups). +This setting doesn't apply to fast checkout.","Selecteer voor welke klantgroep iDEAL beschikbaar is. Klantgroepen worden gedefinieerd in Magento (Menu: Customers->Customer Groups). -Deze instelling is niet van toepassing op Fastcheckout." +Deze instelling is niet van toepassing op snel bestellen." "Fast Checkout","Snel bestellen" "iDEAL Fast Checkout","iDEAL Snel bestellen" "Cart page","Winkelwagenpagina" @@ -355,3 +355,7 @@ Deze instelling heeft geen effect op de productpagina. Als snel bestellen is ing "Show the fast checkout button on the cart page, only for guest customers.","Toon de knop voor snel bestellen op de winkelwagenpagina, alleen voor gastklanten." "When updating this setting, please flush Magento's cache afterwards ","Wanneer u deze instelling bijwerkt, moet u de cache van Magento daarna leegmaken " "Continue","Verder" +"On - as Optional","Aan - als Optioneel" +"On - as Required","Aan - als Verplicht" +"Show notice and abort fast checkout","Toon melding en annuleer snel bestellen" +"Show intermediate screen to select shipping method","Toon tussenscherm om verzendmethode te selecteren" \ No newline at end of file diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index 4a2b2485..c474b6c3 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -275,27 +275,27 @@ Geef deze keuze op bij het afrekenen: de klant kan bij het afrekenen kiezen tuss "Refund amount must be greater than 0.00","Het bedrag moet groter zijn dan 0,00" "Refund amount must not exceed ","Het bedrag mag niet hoger zijn dan " "Select a terminal","Selecteer een terminal" -"Determine in which country iDEAL should be available. This setting doesn't apply to Fastcheckout.","Bepaal in welk land iDEAL beschikbaar moet zijn. Deze instelling is niet van toepassing op Fastcheckout." -"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to Fastcheckout.","Stel het minimale bestelbedrag in voor iDEAL. Laat leeg als u geen minimumbedrag wilt instellen. Deze instelling is niet van toepassing op Fastcheckout." -"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to Fastcheckout.","Stel het maximale orderbedrag in voor iDEAL dat beschikbaar moet zijn. Laat dit leeg als u geen maximumbedrag wilt instellen. Deze instelling is niet van toepassing op Fastcheckout." +"Determine in which country iDEAL should be available. This setting doesn't apply to fast checkout.","Bepaal in welk land iDEAL beschikbaar moet zijn. Deze instelling is niet van toepassing op snel bestellen." +"Set the minimum order amount for iDEAL to be available. Leave blank if you don't want to set a minimum amount. This setting doesn't apply to fast checkout.","Stel het minimale bestelbedrag in voor iDEAL. Laat leeg als u geen minimumbedrag wilt instellen. Deze instelling is niet van toepassing op snel bestellen." +"Set the maximum order amount for iDEAL to be available. Leave blank if you don't want to set a maximum amount. This setting doesn't apply to fast checkout.","Stel het maximale orderbedrag in voor iDEAL dat beschikbaar moet zijn. Laat dit leeg als u geen maximumbedrag wilt instellen. Deze instelling is niet van toepassing op snel bestellen." "By default payment methods are available for all customer types. To limit this to a customer type, use one of the following options: Private, B2C: Only show this payment method when the customer didn't enter a company name. Business, BB2: Only show this payment method when the customer entered a company name. -This setting doesn't apply to Fastcheckout.","Standaard zijn betaalmethoden beschikbaar voor alle klanttypen. Om dit te beperken tot een klanttype, gebruikt u een van de volgende opties: +This setting doesn't apply to fast checkout.","Standaard zijn betaalmethoden beschikbaar voor alle klanttypen. Om dit te beperken tot een klanttype, gebruikt u een van de volgende opties: Privé, B2C: Toon deze betaalmethode alleen als de klant geen bedrijfsnaam heeft ingevoerd. Zakelijk, BB2: Toon deze betaalmethode alleen als de klant een bedrijfsnaam heeft ingevoerd. -Deze instelling is niet van toepassing op Fastcheckout." +Deze instelling is niet van toepassing op snel bestellen." "Select to which customer group iDEAL is available. Customer groups are defined in Magento (Menu: Customers->Customer Groups). -This setting doesn't apply to Fastcheckout.","Selecteer voor welke klantgroep iDEAL beschikbaar is. Klantgroepen worden gedefinieerd in Magento (Menu: Customers->Customer Groups). +This setting doesn't apply to fast checkout.","Selecteer voor welke klantgroep iDEAL beschikbaar is. Klantgroepen worden gedefinieerd in Magento (Menu: Customers->Customer Groups). -Deze instelling is niet van toepassing op Fastcheckout." +Deze instelling is niet van toepassing op snel bestellen." "Fast Checkout","Snel bestellen" "iDEAL Fast Checkout","iDEAL Snel bestellen" "Cart page","Winkelwagenpagina" @@ -347,3 +347,7 @@ Deze instelling heeft geen effect op de productpagina. Als snel bestellen is ing "Show the fast checkout button on the cart page, only for guest customers.","Toon de knop voor snel bestellen op de winkelwagenpagina, alleen voor gastklanten." "When updating this setting, please flush Magento's cache afterwards ","Wanneer u deze instelling bijwerkt, moet u de cache van Magento daarna leegmaken " "Continue","Verder" +"On - as Optional","Aan - als Optioneel" +"On - as Required","Aan - als Verplicht" +"Show notice and abort fast checkout","Toon melding en annuleer snel bestellen" +"Show intermediate screen to select shipping method","Toon tussenscherm om verzendmethode te selecteren" \ No newline at end of file From 6f76d71d1a2e261e7f291055f289118ddfd4e6b9 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:21:52 +0200 Subject: [PATCH 35/47] Fix error after timeout --- Controller/Checkout/Exchange.php | 29 +++++++++++++++++-- Controller/Checkout/FastCheckoutStart.php | 4 +-- Model/Config/Source/ActiveShippingMethods.php | 2 +- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index d0796080..41c49360 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -2,8 +2,10 @@ namespace Paynl\Payment\Controller\Checkout; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\Request\InvalidRequestException; +use Magento\Sales\Api\OrderRepositoryInterface; use Magento\Sales\Model\Order; use Magento\Sales\Model\OrderRepository; use Paynl\Payment\Controller\CsrfAwareActionInterface; @@ -46,6 +48,16 @@ class Exchange extends PayAction implements CsrfAwareActionInterface */ private $payHelper; + /** + * @var OrderRepositoryInterface + */ + private $orderRepositoryInterface; + + /** + * @var SearchCriteriaBuilder + */ + private $searchCriteriaBuilder; + /** * @var */ @@ -78,6 +90,8 @@ public function validateForCsrf(RequestInterface $request): bool * @param PayPayment $payPayment * @param PayPaymentCreateFastCheckoutOrder $payPaymentCreateFastCheckoutOrder * @param PayHelper $payHelper + * @param OrderRepositoryInterface $orderRepositoryInterface + * @param SearchCriteriaBuilder $searchCriteriaBuilder */ public function __construct( \Magento\Framework\App\Action\Context $context, @@ -86,7 +100,9 @@ public function __construct( OrderRepository $orderRepository, PayPayment $payPayment, PayPaymentCreateFastCheckoutOrder $payPaymentCreateFastCheckoutOrder, - PayHelper $payHelper + PayHelper $payHelper, + OrderRepositoryInterface $orderRepositoryInterface, + SearchCriteriaBuilder $searchCriteriaBuilder ) { $this->result = $result; $this->config = $config; @@ -94,6 +110,8 @@ public function __construct( $this->payPayment = $payPayment; $this->payPaymentCreateFastCheckoutOrder = $payPaymentCreateFastCheckoutOrder; $this->payHelper = $payHelper; + $this->orderRepositoryInterface = $orderRepositoryInterface; + $this->searchCriteriaBuilder = $searchCriteriaBuilder; parent::__construct($context); } @@ -200,7 +218,14 @@ public function execute() if ($this->isFastCheckout($params)) { try { - $order = $this->payPaymentCreateFastCheckoutOrder->create($params); + $orderId = explode('fastcheckout', $params['orderId']); + $quoteId = $orderId[1]; + $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); + $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); + $order = array_shift($searchResult) ?? null; + if (empty($order)) { + $order = $this->payPaymentCreateFastCheckoutOrder->create($params); + } } catch (\Exception $e) { $this->payHelper->logCritical($e, $params); return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); diff --git a/Controller/Checkout/FastCheckoutStart.php b/Controller/Checkout/FastCheckoutStart.php index 3ce2159b..014ba40b 100644 --- a/Controller/Checkout/FastCheckoutStart.php +++ b/Controller/Checkout/FastCheckoutStart.php @@ -121,7 +121,7 @@ private function quoteSetDummyData($quote, $params) $shippingMethodsAvaileble = []; foreach ($shippingData as $shipping) { $code = $shipping->getCarrierCode() . '_' . $shipping->getMethodCode(); - if ($code != 'instore_pickup') { + if ($code != 'instore_pickup' && $code != 'instore_instore') { $shippingMethodsAvaileble[$code] = $code; } } @@ -199,7 +199,7 @@ public function cacheShippingMethods() $currency = $this->storeManager->getStore()->getCurrentCurrency(); $shippingRates = []; foreach ($rates as $rate) { - if (strpos($rate->getCode(), 'error') === false && $rate->getCode() != 'instore_pickup') { + if (strpos($rate->getCode(), 'error') === false && $rate->getCode() != 'instore_pickup' && $rate->getCode() != 'instore_instore') { $shippingRates[$rate->getCode()] = [ 'code' => $rate->getCode(), 'method' => $rate->getCarrierTitle(), diff --git a/Model/Config/Source/ActiveShippingMethods.php b/Model/Config/Source/ActiveShippingMethods.php index a11d27ab..57c9d016 100644 --- a/Model/Config/Source/ActiveShippingMethods.php +++ b/Model/Config/Source/ActiveShippingMethods.php @@ -64,7 +64,7 @@ public function getShippingMethods() $carrierTitle = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/title'); $carrierName = $this->scopeConfig->getValue('carriers/' . $carrierCode . '/name'); } - if ($code != 'instore_pickup') { + if ($code != 'instore_pickup' && $code != 'instore_instore') { $methods[$code] = '[' . $carrierTitle . '] ' . $carrierName; } } From c19d76443cdbc89bde11688ff40a320e43e17d26 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Thu, 22 Aug 2024 15:25:22 +0200 Subject: [PATCH 36/47] Fix transaction mismatch error --- Controller/Checkout/Exchange.php | 37 +++++++++++++++++--------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index 41c49360..1a12a7be 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -208,7 +208,7 @@ public function execute() $params = $this->getPayLoad($this->getRequest()); $action = strtolower($params['action'] ?? ''); $payOrderId = $params['payOrderId'] ?? null; - $orderEntityId = $params['orderId'] ?? null; + $orderId = $params['orderId'] ?? null; $paymentProfileId = $params['paymentProfile'] ?? null; $order = null; @@ -232,6 +232,25 @@ public function execute() } } + try { + $this->config->configureSDK(true); + $transaction = Transaction::get($payOrderId); + } catch (\Exception $e) { + $this->payHelper->logCritical($e, $params, $order->getStore()); + $this->removeProcessing($payOrderId, $action); + return $this->result->setContents('FALSE| Error fetching transaction. ' . $e->getMessage()); + } + + $orderIdTransaction = $transaction->getExtra1(); + + if ($orderId != $orderIdTransaction && !$this->isFastCheckout($params)) { + $this->payHelper->logCritical('Transaction mismatch ' . $orderId . ' / ' . $orderIdTransaction, $params, $order->getStore()); + $this->removeProcessing($payOrderId, $action); + return $this->result->setContents('FALSE|Transaction mismatch:' . $transaction->getExtra3() . '-' . $transaction->getExtra1()); + } + + $orderEntityId = $transaction->getExtra3(); + if (empty($payOrderId) || empty($orderEntityId)) { $this->payHelper->logCritical('Exchange: order_id or orderEntity is not set', $params); return $this->result->setContents('FALSE| order_id is not set in the request'); @@ -258,15 +277,6 @@ public function execute() $this->config->setStore($order->getStore()); - try { - $this->config->configureSDK(true); - $transaction = Transaction::get($payOrderId); - } catch (\Exception $e) { - $this->payHelper->logCritical($e, $params, $order->getStore()); - $this->removeProcessing($payOrderId, $action); - return $this->result->setContents('FALSE| Error fetching transaction. ' . $e->getMessage()); - } - if ($transaction->isPending()) { if ($action == 'new_ppt') { $this->removeProcessing($payOrderId, $action); @@ -296,13 +306,6 @@ public function execute() } $payment = $order->getPayment(); - $orderEntityIdTransaction = $transaction->getExtra3(); - - if ($orderEntityId != $orderEntityIdTransaction && !$this->isFastCheckout($params)) { - $this->payHelper->logCritical('Transaction mismatch ' . $orderEntityId . ' / ' . $orderEntityIdTransaction, $params, $order->getStore()); - $this->removeProcessing($payOrderId, $action); - return $this->result->setContents('FALSE|Transaction mismatch'); - } if ($transaction->isRefunded(false) && substr($action, 0, 6) == 'refund') { if ($this->config->refundFromPay() && $order->getTotalDue() == 0) { From e793c81a9297215b06ac7140850eb5ec042e7fe0 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:03:45 +0200 Subject: [PATCH 37/47] Fix Extra3 --- Controller/Checkout/Exchange.php | 39 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index 1a12a7be..0d9f5518 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -153,6 +153,7 @@ private function getPayLoad($_request) $paymentProfile = $request->payment_profile_id ?? null; $payOrderId = $request->order_id ?? null; $orderId = $request->extra1 ?? null; + $extra3 = $request->extra3 ?? null; $data = null; } else { # TGU @@ -173,6 +174,7 @@ private function getPayLoad($_request) $internalStateId = $data['object']['status']['code'] ?? ''; $internalStateName = $data['object']['status']['action'] ?? ''; $orderId = $data['object']['reference'] ?? ''; + $extra3 = $data['object']['extra3'] ?? null; $action = ($internalStateId == 100 || $internalStateName == 95) ? 'new_ppt' : 'pending'; $checkoutData = $data['object']['checkoutData'] ?? ''; } @@ -183,6 +185,7 @@ private function getPayLoad($_request) 'paymentProfile' => $paymentProfile ?? null, 'payOrderId' => $payOrderId, 'orderId' => $orderId, + 'extra3' => $extra3 ?? null, 'internalStateId' => $internalStateId ?? null, 'internalStateName' => $internalStateName ?? null, 'checkoutData' => $checkoutData ?? null, @@ -209,6 +212,7 @@ public function execute() $action = strtolower($params['action'] ?? ''); $payOrderId = $params['payOrderId'] ?? null; $orderId = $params['orderId'] ?? null; + $orderEntityId = $params['extra3'] ?? null; $paymentProfileId = $params['paymentProfile'] ?? null; $order = null; @@ -232,25 +236,6 @@ public function execute() } } - try { - $this->config->configureSDK(true); - $transaction = Transaction::get($payOrderId); - } catch (\Exception $e) { - $this->payHelper->logCritical($e, $params, $order->getStore()); - $this->removeProcessing($payOrderId, $action); - return $this->result->setContents('FALSE| Error fetching transaction. ' . $e->getMessage()); - } - - $orderIdTransaction = $transaction->getExtra1(); - - if ($orderId != $orderIdTransaction && !$this->isFastCheckout($params)) { - $this->payHelper->logCritical('Transaction mismatch ' . $orderId . ' / ' . $orderIdTransaction, $params, $order->getStore()); - $this->removeProcessing($payOrderId, $action); - return $this->result->setContents('FALSE|Transaction mismatch:' . $transaction->getExtra3() . '-' . $transaction->getExtra1()); - } - - $orderEntityId = $transaction->getExtra3(); - if (empty($payOrderId) || empty($orderEntityId)) { $this->payHelper->logCritical('Exchange: order_id or orderEntity is not set', $params); return $this->result->setContents('FALSE| order_id is not set in the request'); @@ -277,6 +262,15 @@ public function execute() $this->config->setStore($order->getStore()); + try { + $this->config->configureSDK(true); + $transaction = Transaction::get($payOrderId); + } catch (\Exception $e) { + $this->payHelper->logCritical($e, $params, $order->getStore()); + $this->removeProcessing($payOrderId, $action); + return $this->result->setContents('FALSE| Error fetching transaction. ' . $e->getMessage()); + } + if ($transaction->isPending()) { if ($action == 'new_ppt') { $this->removeProcessing($payOrderId, $action); @@ -306,6 +300,13 @@ public function execute() } $payment = $order->getPayment(); + $orderEntityIdTransaction = $transaction->getExtra3(); + + if ($orderEntityId != $orderEntityIdTransaction && !$this->isFastCheckout($params)) { + $this->payHelper->logCritical('Transaction mismatch ' . $orderEntityId . ' / ' . $orderEntityIdTransaction, $params, $order->getStore()); + $this->removeProcessing($payOrderId, $action); + return $this->result->setContents('FALSE|Transaction mismatch'); + } if ($transaction->isRefunded(false) && substr($action, 0, 6) == 'refund') { if ($this->config->refundFromPay() && $order->getTotalDue() == 0) { From 4c568004a3d6caeea8194511aba43e3e28a19bac Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Fri, 23 Aug 2024 15:23:12 +0200 Subject: [PATCH 38/47] Improve fastcheckout exhchange --- Controller/Checkout/Exchange.php | 24 +- Model/PayPaymentCreateFastCheckoutOrder.php | 267 ++++++++++---------- 2 files changed, 151 insertions(+), 140 deletions(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index 0d9f5518..ab4bb63d 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -222,17 +222,21 @@ public function execute() if ($this->isFastCheckout($params)) { try { - $orderId = explode('fastcheckout', $params['orderId']); - $quoteId = $orderId[1]; - $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); - $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); - $order = array_shift($searchResult) ?? null; - if (empty($order)) { - $order = $this->payPaymentCreateFastCheckoutOrder->create($params); - } + $order = $this->payPaymentCreateFastCheckoutOrder->create($params); } catch (\Exception $e) { - $this->payHelper->logCritical($e, $params); - return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); + $this->payHelper->logCritical($e->getMessage(), $params); + if ($e->getCode() == 10001) { + $orderId = explode('fastcheckout', $params['orderId']); + $quoteId = $orderId[1]; + $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); + $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); + $order = array_shift($searchResult) ?? null; + if (empty($order)) { + return $this->result->setContents('FALSE| Order can\'t be found.'); + } + } else { + return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); + } } } diff --git a/Model/PayPaymentCreateFastCheckoutOrder.php b/Model/PayPaymentCreateFastCheckoutOrder.php index dd834bf2..b71552d8 100644 --- a/Model/PayPaymentCreateFastCheckoutOrder.php +++ b/Model/PayPaymentCreateFastCheckoutOrder.php @@ -4,6 +4,7 @@ use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Model\CustomerFactory; +use Magento\Framework\Exception\NoSuchEntityException; use Magento\Quote\Api\ShippingMethodManagementInterface; use Magento\Quote\Model\QuoteFactory; use Magento\Quote\Model\QuoteManagement; @@ -86,136 +87,142 @@ public function __construct( */ public function create($params) { - $checkoutData = $params['checkoutData']; - - $customerData = $checkoutData['customer'] ?? null; - $billingAddressData = $checkoutData['billingAddress'] ?? null; - $shippingAddressData = $checkoutData['shippingAddress'] ?? null; - - if (empty($customerData) || empty($billingAddressData) || empty($shippingAddressData)) { - throw new \Exception("Missing data, cannot create order."); - } - - $payOrderId = $params['payOrderId']; - - $orderId = explode('fastcheckout', $params['orderId']); - $quoteId = $orderId[1]; - - $quote = $this->quote->create()->loadByIdWithoutStore($quoteId); - $storeId = $quote->getStoreId(); - - $shippingMethodQuote = $quote->getShippingAddress()->getShippingMethod(); - - $store = $this->storeManager->getStore($storeId); - $websiteId = $store->getWebsiteId(); - - $email = $customerData['email']; - $customer = $this->customerFactory->create() - ->setWebsiteId($websiteId) - ->loadByEmail($email); - - if (!$customer->getEntityId()) { - $customer->setWebsiteId($websiteId) - ->setStore($store) - ->setFirstname($customerData['firstName']) - ->setLastname($customerData['lastName']) - ->setEmail($email) - ->setPassword($email); - $customer->save(); - } - - $customer = $this->customerRepository->getById($customer->getEntityId()); - - $quote->assignCustomer($customer); - $quote->setSendConfirmation(1); - - $billingAddress = $quote->getBillingAddress()->addData(array( - 'customer_address_id' => '', - 'prefix' => '', - 'firstname' => $billingAddressData['firstName'] ?? $customerData['firstName'], - 'middlename' => '', - 'lastname' => $billingAddressData['lastName'] ?? $customerData['lastName'], - 'suffix' => '', - 'company' => $customerData['company'] ?? '', - 'street' => array( - '0' => $billingAddressData['streetName'], - '1' => $billingAddressData['streetNumber'] . ($billingAddressData['streetNumberAddition'] ?? ''), - ), - 'city' => $billingAddressData['city'], - 'country_id' => $billingAddressData['countryCode'], - 'region' => $billingAddressData['regionCode'] ?? '', - 'postcode' => $billingAddressData['zipCode'], - 'telephone' => $customerData['phone'], - 'fax' => '', - 'vat_id' => '', - 'save_in_address_book' => 1, - )); - - $shippingAddress = $quote->getShippingAddress()->addData(array( - 'customer_address_id' => '', - 'prefix' => '', - 'firstname' => $shippingAddressData['firstName'] ?? $customerData['firstName'], - 'middlename' => '', - 'lastname' => $shippingAddressData['lastName'] ?? $customerData['lastName'], - 'suffix' => '', - 'company' => $customerData['company'] ?? '', - 'street' => array( - '0' => $shippingAddressData['streetName'], - '1' => $shippingAddressData['streetNumber'] . ($shippingAddressData['streetNumberAddition'] ?? ''), - ), - 'city' => $shippingAddressData['city'], - 'country_id' => $shippingAddressData['countryCode'], - 'region' => $shippingAddressData['regionCode'] ?? '', - 'postcode' => $shippingAddressData['zipCode'], - 'telephone' => $customerData['phone'], - 'fax' => '', - 'vat_id' => '', - 'save_in_address_book' => 1, - )); - - $shippingAddress = $quote->getShippingAddress(); - $shippingAddress->setCollectShippingRates(true)->collectShippingRates(); - - $shippingData = $this->shippingMethodManagementInterface->getList($quote->getId()); - $shippingMethodsAvaileble = []; - foreach ($shippingData as $shipping) { - $code = $shipping->getCarrierCode() . '_' . $shipping->getMethodCode(); - $shippingMethodsAvaileble[$code] = $code; + try { + + $checkoutData = $params['checkoutData']; + + $customerData = $checkoutData['customer'] ?? null; + $billingAddressData = $checkoutData['billingAddress'] ?? null; + $shippingAddressData = $checkoutData['shippingAddress'] ?? null; + + if (empty($customerData) || empty($billingAddressData) || empty($shippingAddressData)) { + throw new \Exception("Missing data, cannot create order."); + } + + $payOrderId = $params['payOrderId']; + + $orderId = explode('fastcheckout', $params['orderId']); + $quoteId = $orderId[1]; + + $quote = $this->quote->create()->loadByIdWithoutStore($quoteId); + $storeId = $quote->getStoreId(); + + $shippingMethodQuote = $quote->getShippingAddress()->getShippingMethod(); + + $store = $this->storeManager->getStore($storeId); + $websiteId = $store->getWebsiteId(); + + $email = $customerData['email']; + $customer = $this->customerFactory->create() + ->setWebsiteId($websiteId) + ->loadByEmail($email); + + if (!$customer->getEntityId()) { + $customer->setWebsiteId($websiteId) + ->setStore($store) + ->setFirstname($customerData['firstName']) + ->setLastname($customerData['lastName']) + ->setEmail($email) + ->setPassword($email); + $customer->save(); + } + + $customer = $this->customerRepository->getById($customer->getEntityId()); + + $quote->assignCustomer($customer); + $quote->setSendConfirmation(1); + + $billingAddress = $quote->getBillingAddress()->addData(array( + 'customer_address_id' => '', + 'prefix' => '', + 'firstname' => $billingAddressData['firstName'] ?? $customerData['firstName'], + 'middlename' => '', + 'lastname' => $billingAddressData['lastName'] ?? $customerData['lastName'], + 'suffix' => '', + 'company' => $customerData['company'] ?? '', + 'street' => array( + '0' => $billingAddressData['streetName'], + '1' => $billingAddressData['streetNumber'] . ($billingAddressData['streetNumberAddition'] ?? ''), + ), + 'city' => $billingAddressData['city'], + 'country_id' => $billingAddressData['countryCode'], + 'region' => $billingAddressData['regionCode'] ?? '', + 'postcode' => $billingAddressData['zipCode'], + 'telephone' => $customerData['phone'], + 'fax' => '', + 'vat_id' => '', + 'save_in_address_book' => 1, + )); + + $shippingAddress = $quote->getShippingAddress()->addData(array( + 'customer_address_id' => '', + 'prefix' => '', + 'firstname' => $shippingAddressData['firstName'] ?? $customerData['firstName'], + 'middlename' => '', + 'lastname' => $shippingAddressData['lastName'] ?? $customerData['lastName'], + 'suffix' => '', + 'company' => $customerData['company'] ?? '', + 'street' => array( + '0' => $shippingAddressData['streetName'], + '1' => $shippingAddressData['streetNumber'] . ($shippingAddressData['streetNumberAddition'] ?? ''), + ), + 'city' => $shippingAddressData['city'], + 'country_id' => $shippingAddressData['countryCode'], + 'region' => $shippingAddressData['regionCode'] ?? '', + 'postcode' => $shippingAddressData['zipCode'], + 'telephone' => $customerData['phone'], + 'fax' => '', + 'vat_id' => '', + 'save_in_address_book' => 1, + )); + + $shippingAddress = $quote->getShippingAddress(); + $shippingAddress->setCollectShippingRates(true)->collectShippingRates(); + + $shippingData = $this->shippingMethodManagementInterface->getList($quote->getId()); + $shippingMethodsAvaileble = []; + foreach ($shippingData as $shipping) { + $code = $shipping->getCarrierCode() . '_' . $shipping->getMethodCode(); + $shippingMethodsAvaileble[$code] = $code; + } + + if (!empty($shippingMethodsAvaileble[$shippingMethodQuote])) { + $shippingMethod = $shippingMethodQuote; + } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { + $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'); + } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup')])) { + $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup'); + } + + if (empty($shippingMethod)) { + throw new \Exception("No shipping method availeble"); + } + + $shippingAddress->setShippingMethod($shippingMethod); + + $quote->setPaymentMethod('paynl_payment_ideal'); + $quote->setInventoryProcessed(false); + $quote->save(); + + // Set Sales Order Payment + $quote->getPayment()->importData(['method' => 'paynl_payment_ideal']); + $quote->collectTotals()->save(); + + $service = $this->quoteManagement->submit($quote); + $increment_id = $service->getRealOrderId(); + + $order = $this->orderFactory->create()->loadByIncrementId($increment_id); + $additionalData = $order->getPayment()->getAdditionalInformation(); + $additionalData['transactionId'] = $payOrderId; + $order->getPayment()->setAdditionalInformation($additionalData); + $order->save(); + + $order->addStatusHistoryComment(__('PAY. - Created iDEAL Fast Checkout order'))->save(); + + return $order; + + } catch (NoSuchEntityException $e) { + throw new \Exception("Order already exsists", 10001); } - - if (!empty($shippingMethodsAvaileble[$shippingMethodQuote])) { - $shippingMethod = $shippingMethodQuote; - } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping')])) { - $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping'); - } elseif (!empty($shippingMethodsAvaileble[$store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup')])) { - $shippingMethod = $store->getConfig('payment/paynl_payment_ideal/fast_checkout_shipping_backup'); - } - - if (empty($shippingMethod)) { - throw new \Exception("No shipping method availeble"); - } - - $shippingAddress->setShippingMethod($shippingMethod); - - $quote->setPaymentMethod('paynl_payment_ideal'); - $quote->setInventoryProcessed(false); - $quote->save(); - - // Set Sales Order Payment - $quote->getPayment()->importData(['method' => 'paynl_payment_ideal']); - $quote->collectTotals()->save(); - - $service = $this->quoteManagement->submit($quote); - $increment_id = $service->getRealOrderId(); - - $order = $this->orderFactory->create()->loadByIncrementId($increment_id); - $additionalData = $order->getPayment()->getAdditionalInformation(); - $additionalData['transactionId'] = $payOrderId; - $order->getPayment()->setAdditionalInformation($additionalData); - $order->save(); - - $order->addStatusHistoryComment(__('PAY. - Created iDEAL Fast Checkout order'))->save(); - - return $order; } } From 22363f90cc49403f797b43d1bbfe593b953b791e Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Fri, 23 Aug 2024 15:26:43 +0200 Subject: [PATCH 39/47] Code Polish --- Model/PayPaymentCreateFastCheckoutOrder.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/Model/PayPaymentCreateFastCheckoutOrder.php b/Model/PayPaymentCreateFastCheckoutOrder.php index b71552d8..4714fcb5 100644 --- a/Model/PayPaymentCreateFastCheckoutOrder.php +++ b/Model/PayPaymentCreateFastCheckoutOrder.php @@ -88,7 +88,6 @@ public function __construct( public function create($params) { try { - $checkoutData = $params['checkoutData']; $customerData = $checkoutData['customer'] ?? null; @@ -220,7 +219,6 @@ public function create($params) $order->addStatusHistoryComment(__('PAY. - Created iDEAL Fast Checkout order'))->save(); return $order; - } catch (NoSuchEntityException $e) { throw new \Exception("Order already exsists", 10001); } From 47fa7e3fc3a4c292b32c440cb5494de85f605cbe Mon Sep 17 00:00:00 2001 From: woutse Date: Fri, 23 Aug 2024 16:58:51 +0200 Subject: [PATCH 40/47] Code polish --- Controller/Checkout/Exchange.php | 19 ++++---- Controller/Checkout/Finish.php | 45 +++++++++++-------- ...tOrder.php => CreateFastCheckoutOrder.php} | 2 +- view/frontend/web/css/payFastCheckout.css | 12 +++-- 4 files changed, 42 insertions(+), 36 deletions(-) rename Model/{PayPaymentCreateFastCheckoutOrder.php => CreateFastCheckoutOrder.php} (99%) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index ab4bb63d..341df305 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -12,7 +12,7 @@ use Paynl\Payment\Controller\PayAction; use Paynl\Payment\Helper\PayHelper; use Paynl\Payment\Model\PayPayment; -use Paynl\Payment\Model\PayPaymentCreateFastCheckoutOrder; +use Paynl\Payment\Model\CreateFastCheckoutOrder; use Paynl\Transaction; class Exchange extends PayAction implements CsrfAwareActionInterface @@ -38,9 +38,9 @@ class Exchange extends PayAction implements CsrfAwareActionInterface private $payPayment; /** - * @var PayPaymentCreateFastCheckoutOrder + * @var CreateFastCheckoutOrder */ - private $payPaymentCreateFastCheckoutOrder; + private $createFastCheckoutOrder; /** * @@ -88,7 +88,7 @@ public function validateForCsrf(RequestInterface $request): bool * @param \Magento\Framework\Controller\Result\Raw $result * @param OrderRepository $orderRepository * @param PayPayment $payPayment - * @param PayPaymentCreateFastCheckoutOrder $payPaymentCreateFastCheckoutOrder + * @param CreateFastCheckoutOrder $createFastCheckoutOrder * @param PayHelper $payHelper * @param OrderRepositoryInterface $orderRepositoryInterface * @param SearchCriteriaBuilder $searchCriteriaBuilder @@ -99,7 +99,7 @@ public function __construct( \Magento\Framework\Controller\Result\Raw $result, OrderRepository $orderRepository, PayPayment $payPayment, - PayPaymentCreateFastCheckoutOrder $payPaymentCreateFastCheckoutOrder, + CreateFastCheckoutOrder $createFastCheckoutOrder, PayHelper $payHelper, OrderRepositoryInterface $orderRepositoryInterface, SearchCriteriaBuilder $searchCriteriaBuilder @@ -108,7 +108,7 @@ public function __construct( $this->config = $config; $this->orderRepository = $orderRepository; $this->payPayment = $payPayment; - $this->payPaymentCreateFastCheckoutOrder = $payPaymentCreateFastCheckoutOrder; + $this->createFastCheckoutOrder = $createFastCheckoutOrder; $this->payHelper = $payHelper; $this->orderRepositoryInterface = $orderRepositoryInterface; $this->searchCriteriaBuilder = $searchCriteriaBuilder; @@ -222,12 +222,12 @@ public function execute() if ($this->isFastCheckout($params)) { try { - $order = $this->payPaymentCreateFastCheckoutOrder->create($params); + $order = $this->createFastCheckoutOrder->create($params); } catch (\Exception $e) { $this->payHelper->logCritical($e->getMessage(), $params); if ($e->getCode() == 10001) { $orderId = explode('fastcheckout', $params['orderId']); - $quoteId = $orderId[1]; + $quoteId = $orderId[1] ?? ''; $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); $order = array_shift($searchResult) ?? null; @@ -245,7 +245,8 @@ public function execute() return $this->result->setContents('FALSE| order_id is not set in the request'); } - if (empty($order)) { + # In case of fastcheckout, there may already be an order. + if (empty($order)) try { $order = $this->orderRepository->get($orderEntityId); if (empty($order)) { diff --git a/Controller/Checkout/Finish.php b/Controller/Checkout/Finish.php index 34be2f0b..91c776d4 100644 --- a/Controller/Checkout/Finish.php +++ b/Controller/Checkout/Finish.php @@ -129,6 +129,30 @@ private function checkEmpty($field, string $name, int $errorCode, string $desc = } } + /** + * @return string + * @throws \Magento\Framework\Exception\LocalizedException + * @throws \Magento\Framework\Exception\NoSuchEntityException + */ + private function getFastCheckoutPath() + { + $path = $bSuccess ? Config::FINISH_PAY_FC : ($bPending ? Config::PENDING_PAY : 'checkout/cart'); + + $session = $this->checkoutSession; + $quote = $session->getQuote(); + + if ($bSuccess || $bPending) { + $quote->setIsActive(false); + $this->quoteRepository->save($quote); + } else { + $quote->setIsActive(true); + $this->quoteRepository->save($quote); + $session->replaceQuote($quote); + } + + return $path; + } + /** * @return resultRedirectFactory|void */ @@ -152,27 +176,10 @@ public function execute() try { if ($magOrderId == 'fc') { - if ($bSuccess) { - $resultRedirect->setPath(Config::FINISH_PAY_FC, ['_query' => ['utm_nooverride' => '1']]); - } elseif ($bPending) { - $resultRedirect->setPath(Config::PENDING_PAY, ['_query' => ['utm_nooverride' => '1']]); - } else { - $resultRedirect->setPath('checkout/cart', ['_query' => ['utm_nooverride' => '1']]); - } - - $session = $this->checkoutSession; - $quote = $session->getQuote(); - if ($bSuccess || $bPending) { - $quote->setIsActive(false); - $this->quoteRepository->save($quote); - } else { - $quote->setIsActive(true); - $this->quoteRepository->save($quote); - $session->replaceQuote($quote); - } - + $resultRedirect->setPath($this->getFastCheckoutPath(), ['_query' => ['utm_nooverride' => '1']]); return $resultRedirect; } + $this->checkEmpty($magOrderId, 'magOrderId', 1012); $order = $this->orderRepository->get($magOrderId); $this->checkEmpty($order, 'order', 1013); diff --git a/Model/PayPaymentCreateFastCheckoutOrder.php b/Model/CreateFastCheckoutOrder.php similarity index 99% rename from Model/PayPaymentCreateFastCheckoutOrder.php rename to Model/CreateFastCheckoutOrder.php index 4714fcb5..fdc5db20 100644 --- a/Model/PayPaymentCreateFastCheckoutOrder.php +++ b/Model/CreateFastCheckoutOrder.php @@ -11,7 +11,7 @@ use Magento\Sales\Model\OrderFactory; use Magento\Store\Model\StoreManagerInterface; -class PayPaymentCreateFastCheckoutOrder +class CreateFastCheckoutOrder { /** * @var StoreManagerInterface diff --git a/view/frontend/web/css/payFastCheckout.css b/view/frontend/web/css/payFastCheckout.css index 781376ac..d9671629 100644 --- a/view/frontend/web/css/payFastCheckout.css +++ b/view/frontend/web/css/payFastCheckout.css @@ -3,8 +3,6 @@ width: 100%; } - - #paynl_fast_checkout_cart button, #paynl_fast_checkout_product button, #paynl_fast_checkout_fallback button, @@ -23,7 +21,7 @@ background-position: 8px center; } -#top-cart-btn-fastcheckout{ +#top-cart-btn-fastcheckout { margin-top: 5px; } @@ -51,15 +49,15 @@ width: 100%; } -@media all and (min-width: 769px),print { +@media all and (min-width: 769px), print { #paynl_fast_checkout_product { display: block; margin-bottom: 0; margin-right: 1%; width: 49%; } - - #paynl_fast_checkout_fallback button{ + + #paynl_fast_checkout_fallback button { max-width: 250px; } -} \ No newline at end of file +} From 7cf9217940dcd7e535edb9ac4c1c8406d133e43a Mon Sep 17 00:00:00 2001 From: woutse Date: Fri, 23 Aug 2024 17:05:06 +0200 Subject: [PATCH 41/47] Code polish --- Controller/Checkout/Exchange.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index 341df305..cb549106 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -246,7 +246,7 @@ public function execute() } # In case of fastcheckout, there may already be an order. - if (empty($order)) + if (empty($order)) { try { $order = $this->orderRepository->get($orderEntityId); if (empty($order)) { From 9504f10096dfeef05e29ef31f3da25efb4f29e97 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Fri, 23 Aug 2024 17:15:54 +0200 Subject: [PATCH 42/47] Move order search code --- Controller/Checkout/Exchange.php | 35 ++------------------- Model/CreateFastCheckoutOrder.php | 52 ++++++++++++++++++++++--------- 2 files changed, 40 insertions(+), 47 deletions(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index cb549106..2023481a 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -2,17 +2,15 @@ namespace Paynl\Payment\Controller\Checkout; -use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\Request\InvalidRequestException; -use Magento\Sales\Api\OrderRepositoryInterface; use Magento\Sales\Model\Order; use Magento\Sales\Model\OrderRepository; use Paynl\Payment\Controller\CsrfAwareActionInterface; use Paynl\Payment\Controller\PayAction; use Paynl\Payment\Helper\PayHelper; -use Paynl\Payment\Model\PayPayment; use Paynl\Payment\Model\CreateFastCheckoutOrder; +use Paynl\Payment\Model\PayPayment; use Paynl\Transaction; class Exchange extends PayAction implements CsrfAwareActionInterface @@ -48,16 +46,6 @@ class Exchange extends PayAction implements CsrfAwareActionInterface */ private $payHelper; - /** - * @var OrderRepositoryInterface - */ - private $orderRepositoryInterface; - - /** - * @var SearchCriteriaBuilder - */ - private $searchCriteriaBuilder; - /** * @var */ @@ -90,8 +78,6 @@ public function validateForCsrf(RequestInterface $request): bool * @param PayPayment $payPayment * @param CreateFastCheckoutOrder $createFastCheckoutOrder * @param PayHelper $payHelper - * @param OrderRepositoryInterface $orderRepositoryInterface - * @param SearchCriteriaBuilder $searchCriteriaBuilder */ public function __construct( \Magento\Framework\App\Action\Context $context, @@ -100,9 +86,7 @@ public function __construct( OrderRepository $orderRepository, PayPayment $payPayment, CreateFastCheckoutOrder $createFastCheckoutOrder, - PayHelper $payHelper, - OrderRepositoryInterface $orderRepositoryInterface, - SearchCriteriaBuilder $searchCriteriaBuilder + PayHelper $payHelper ) { $this->result = $result; $this->config = $config; @@ -110,8 +94,6 @@ public function __construct( $this->payPayment = $payPayment; $this->createFastCheckoutOrder = $createFastCheckoutOrder; $this->payHelper = $payHelper; - $this->orderRepositoryInterface = $orderRepositoryInterface; - $this->searchCriteriaBuilder = $searchCriteriaBuilder; parent::__construct($context); } @@ -225,18 +207,7 @@ public function execute() $order = $this->createFastCheckoutOrder->create($params); } catch (\Exception $e) { $this->payHelper->logCritical($e->getMessage(), $params); - if ($e->getCode() == 10001) { - $orderId = explode('fastcheckout', $params['orderId']); - $quoteId = $orderId[1] ?? ''; - $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); - $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); - $order = array_shift($searchResult) ?? null; - if (empty($order)) { - return $this->result->setContents('FALSE| Order can\'t be found.'); - } - } else { - return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); - } + return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); } } diff --git a/Model/CreateFastCheckoutOrder.php b/Model/CreateFastCheckoutOrder.php index fdc5db20..2543d920 100644 --- a/Model/CreateFastCheckoutOrder.php +++ b/Model/CreateFastCheckoutOrder.php @@ -4,10 +4,12 @@ use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Model\CustomerFactory; +use Magento\Framework\Api\SearchCriteriaBuilder; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Quote\Api\ShippingMethodManagementInterface; use Magento\Quote\Model\QuoteFactory; use Magento\Quote\Model\QuoteManagement; +use Magento\Sales\Api\OrderRepositoryInterface; use Magento\Sales\Model\OrderFactory; use Magento\Store\Model\StoreManagerInterface; @@ -53,6 +55,16 @@ class CreateFastCheckoutOrder */ private $shippingMethodManagementInterface; + /** + * @var OrderRepositoryInterface + */ + private $orderRepositoryInterface; + + /** + * @var SearchCriteriaBuilder + */ + private $searchCriteriaBuilder; + /** * @param StoreManagerInterface $storeManager * @param QuoteFactory $quote @@ -61,6 +73,8 @@ class CreateFastCheckoutOrder * @param CustomerRepositoryInterface $customerRepository * @param OrderFactory $orderFactory * @param ShippingMethodManagementInterface $shippingMethodManagementInterface + * @param OrderRepositoryInterface $orderRepositoryInterface + * @param SearchCriteriaBuilder $searchCriteriaBuilder */ public function __construct( StoreManagerInterface $storeManager, @@ -69,7 +83,9 @@ public function __construct( CustomerFactory $customerFactory, CustomerRepositoryInterface $customerRepository, OrderFactory $orderFactory, - ShippingMethodManagementInterface $shippingMethodManagementInterface + ShippingMethodManagementInterface $shippingMethodManagementInterface, + OrderRepositoryInterface $orderRepositoryInterface, + SearchCriteriaBuilder $searchCriteriaBuilder ) { $this->storeManager = $storeManager; $this->quote = $quote; @@ -78,6 +94,8 @@ public function __construct( $this->customerRepository = $customerRepository; $this->orderFactory = $orderFactory; $this->shippingMethodManagementInterface = $shippingMethodManagementInterface; + $this->orderRepositoryInterface = $orderRepositoryInterface; + $this->searchCriteriaBuilder = $searchCriteriaBuilder; } /** @@ -87,22 +105,22 @@ public function __construct( */ public function create($params) { - try { - $checkoutData = $params['checkoutData']; + $checkoutData = $params['checkoutData']; - $customerData = $checkoutData['customer'] ?? null; - $billingAddressData = $checkoutData['billingAddress'] ?? null; - $shippingAddressData = $checkoutData['shippingAddress'] ?? null; + $customerData = $checkoutData['customer'] ?? null; + $billingAddressData = $checkoutData['billingAddress'] ?? null; + $shippingAddressData = $checkoutData['shippingAddress'] ?? null; - if (empty($customerData) || empty($billingAddressData) || empty($shippingAddressData)) { - throw new \Exception("Missing data, cannot create order."); - } + if (empty($customerData) || empty($billingAddressData) || empty($shippingAddressData)) { + throw new \Exception("Missing data, cannot create order."); + } - $payOrderId = $params['payOrderId']; + $payOrderId = $params['payOrderId']; - $orderId = explode('fastcheckout', $params['orderId']); - $quoteId = $orderId[1]; + $orderId = explode('fastcheckout', $params['orderId']); + $quoteId = $orderId[1]; + try { $quote = $this->quote->create()->loadByIdWithoutStore($quoteId); $storeId = $quote->getStoreId(); @@ -217,10 +235,14 @@ public function create($params) $order->save(); $order->addStatusHistoryComment(__('PAY. - Created iDEAL Fast Checkout order'))->save(); - - return $order; } catch (NoSuchEntityException $e) { - throw new \Exception("Order already exsists", 10001); + $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); + $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); + $order = array_shift($searchResult) ?? null; + if (empty($order)) { + throw new \Exception("Order can't be found."); + } } + return $order; } } From 36b199bd0e8e36e69ebaab570bf38fa937680e12 Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 26 Aug 2024 09:58:18 +0200 Subject: [PATCH 43/47] Code polish --- Controller/Checkout/Exchange.php | 5 +---- Model/CreateFastCheckoutOrder.php | 7 +++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index 2023481a..ed19576f 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -41,7 +41,6 @@ class Exchange extends PayAction implements CsrfAwareActionInterface private $createFastCheckoutOrder; /** - * * @var \Paynl\Payment\Helper\PayHelper; */ private $payHelper; @@ -52,7 +51,6 @@ class Exchange extends PayAction implements CsrfAwareActionInterface private $headers; /** - * * @param RequestInterface $request * @return null */ @@ -138,7 +136,6 @@ private function getPayLoad($_request) $extra3 = $request->extra3 ?? null; $data = null; } else { - # TGU if ($_request->isGet() || !$this->isSignExchange()) { $data['object'] = $request->object ?? null; } else { @@ -161,7 +158,7 @@ private function getPayLoad($_request) $checkoutData = $data['object']['checkoutData'] ?? ''; } - // Return mapped data so it works for all type of exchanges. + # Return mapped data so it works for all type of exchanges. return [ 'action' => $action, 'paymentProfile' => $paymentProfile ?? null, diff --git a/Model/CreateFastCheckoutOrder.php b/Model/CreateFastCheckoutOrder.php index 2543d920..bc6c886c 100644 --- a/Model/CreateFastCheckoutOrder.php +++ b/Model/CreateFastCheckoutOrder.php @@ -106,7 +106,6 @@ public function __construct( public function create($params) { $checkoutData = $params['checkoutData']; - $customerData = $checkoutData['customer'] ?? null; $billingAddressData = $checkoutData['billingAddress'] ?? null; $shippingAddressData = $checkoutData['shippingAddress'] ?? null; @@ -118,7 +117,7 @@ public function create($params) $payOrderId = $params['payOrderId']; $orderId = explode('fastcheckout', $params['orderId']); - $quoteId = $orderId[1]; + $quoteId = $orderId[1] ?? ''; try { $quote = $this->quote->create()->loadByIdWithoutStore($quoteId); @@ -221,7 +220,7 @@ public function create($params) $quote->setInventoryProcessed(false); $quote->save(); - // Set Sales Order Payment + # Set Sales Order Payment $quote->getPayment()->importData(['method' => 'paynl_payment_ideal']); $quote->collectTotals()->save(); @@ -238,7 +237,7 @@ public function create($params) } catch (NoSuchEntityException $e) { $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); - $order = array_shift($searchResult) ?? null; + $order = array_shift($searchResult ?? []) ?? null; if (empty($order)) { throw new \Exception("Order can't be found."); } From 80f2f117ca3a0d3a70567148d1d27daf400a96e9 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:19:56 +0200 Subject: [PATCH 44/47] Code Polish --- Controller/Checkout/Exchange.php | 13 ++++++++++--- Controller/Checkout/Finish.php | 5 ++--- Model/CreateFastCheckoutOrder.php | 20 ++++++++++++++------ Model/PayPaymentCreateFastCheckout.php | 2 +- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index ed19576f..edd9bdc0 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -179,7 +179,7 @@ private function getPayLoad($_request) */ private function isFastCheckout($params) { - return strpos($params['orderId'], "fastcheckout") !== false && !empty($params['checkoutData'] ?? ''); + return strpos($params['orderId'] ?? '', "fastcheckout") !== false && !empty($params['checkoutData'] ?? ''); } /** @@ -202,20 +202,27 @@ public function execute() if ($this->isFastCheckout($params)) { try { $order = $this->createFastCheckoutOrder->create($params); + $orderEntityId = $order->getId(); } catch (\Exception $e) { $this->payHelper->logCritical($e->getMessage(), $params); return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); } + } elseif (strpos($params['extra3'] ?? '', "fastcheckout") !== false) { + return $this->result->setContents('TRUE| Ignoring fastcheckout.'); } - if (empty($payOrderId) || empty($orderEntityId)) { - $this->payHelper->logCritical('Exchange: order_id or orderEntity is not set', $params); + if (empty($payOrderId)) { + $this->payHelper->logCritical('Exchange: order_id is not set', $params); return $this->result->setContents('FALSE| order_id is not set in the request'); } # In case of fastcheckout, there may already be an order. if (empty($order)) { try { + if (empty($orderEntityId)) { + $this->payHelper->logCritical('Exchange: orderEntityId is not set', $params); + throw new \Exception('orderEntityId is not set in the request'); + } $order = $this->orderRepository->get($orderEntityId); if (empty($order)) { $this->payHelper->logCritical('Cannot load order: ' . $orderEntityId); diff --git a/Controller/Checkout/Finish.php b/Controller/Checkout/Finish.php index 91c776d4..4432d92a 100644 --- a/Controller/Checkout/Finish.php +++ b/Controller/Checkout/Finish.php @@ -134,10 +134,9 @@ private function checkEmpty($field, string $name, int $errorCode, string $desc = * @throws \Magento\Framework\Exception\LocalizedException * @throws \Magento\Framework\Exception\NoSuchEntityException */ - private function getFastCheckoutPath() + private function getFastCheckoutPath($bSuccess, $bPending) { $path = $bSuccess ? Config::FINISH_PAY_FC : ($bPending ? Config::PENDING_PAY : 'checkout/cart'); - $session = $this->checkoutSession; $quote = $session->getQuote(); @@ -176,7 +175,7 @@ public function execute() try { if ($magOrderId == 'fc') { - $resultRedirect->setPath($this->getFastCheckoutPath(), ['_query' => ['utm_nooverride' => '1']]); + $resultRedirect->setPath($this->getFastCheckoutPath($bSuccess, $bPending), ['_query' => ['utm_nooverride' => '1']]); return $resultRedirect; } diff --git a/Model/CreateFastCheckoutOrder.php b/Model/CreateFastCheckoutOrder.php index bc6c886c..62fd8dbc 100644 --- a/Model/CreateFastCheckoutOrder.php +++ b/Model/CreateFastCheckoutOrder.php @@ -235,12 +235,20 @@ public function create($params) $order->addStatusHistoryComment(__('PAY. - Created iDEAL Fast Checkout order'))->save(); } catch (NoSuchEntityException $e) { - $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); - $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); - $order = array_shift($searchResult ?? []) ?? null; - if (empty($order)) { - throw new \Exception("Order can't be found."); - } + $order = $this->getExsistingOrder($quoteId); + } + return $order; + } + + public function getExsistingOrder($quoteId) + { + $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); + $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); + if (is_array($searchResult) && !empty($searchResult)) { + $order = array_shift($searchResult); + } + if (empty($order)) { + throw new \Exception("Order can't be found."); } return $order; } diff --git a/Model/PayPaymentCreateFastCheckout.php b/Model/PayPaymentCreateFastCheckout.php index a8381f67..abe01ef8 100644 --- a/Model/PayPaymentCreateFastCheckout.php +++ b/Model/PayPaymentCreateFastCheckout.php @@ -98,7 +98,7 @@ public function getData() $this->_add($stats, 'object', $this->methodInstance->getVersion() . ' | fc'); $this->_add($stats, 'extra1', ''); $this->_add($stats, 'extra2', ''); - $this->_add($stats, 'extra3', ''); + $this->_add($stats, 'extra3', $this->reference); $this->_add($parameters, 'stats', $stats); return $parameters; From 9eb023938a6eeccb6635baa55b805d8295a1f284 Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:36:28 +0200 Subject: [PATCH 45/47] Code Polish --- Controller/Checkout/Finish.php | 3 +++ Model/CreateFastCheckoutOrder.php | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Controller/Checkout/Finish.php b/Controller/Checkout/Finish.php index 4432d92a..d22bdfd2 100644 --- a/Controller/Checkout/Finish.php +++ b/Controller/Checkout/Finish.php @@ -130,9 +130,12 @@ private function checkEmpty($field, string $name, int $errorCode, string $desc = } /** + * @param boolean $bSuccess + * @param boolean $bPending * @return string * @throws \Magento\Framework\Exception\LocalizedException * @throws \Magento\Framework\Exception\NoSuchEntityException + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ private function getFastCheckoutPath($bSuccess, $bPending) { diff --git a/Model/CreateFastCheckoutOrder.php b/Model/CreateFastCheckoutOrder.php index 62fd8dbc..c946e515 100644 --- a/Model/CreateFastCheckoutOrder.php +++ b/Model/CreateFastCheckoutOrder.php @@ -240,6 +240,11 @@ public function create($params) return $order; } + /** + * @param string $quoteId + * @return Order + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing + */ public function getExsistingOrder($quoteId) { $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); From 3837173a8b06edd80ecc8a9ba85c3bd80e54a3c9 Mon Sep 17 00:00:00 2001 From: woutse Date: Mon, 26 Aug 2024 16:00:35 +0200 Subject: [PATCH 46/47] Code polish --- Controller/Checkout/Exchange.php | 6 +++--- Model/CreateFastCheckoutOrder.php | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Controller/Checkout/Exchange.php b/Controller/Checkout/Exchange.php index edd9bdc0..0dbf9f14 100755 --- a/Controller/Checkout/Exchange.php +++ b/Controller/Checkout/Exchange.php @@ -148,7 +148,7 @@ private function getPayLoad($_request) throw new Exception('Cant handle exchange type other then order'); } } - $this->payHelper->logDebug('payload', $data); + $payOrderId = $data['object']['orderId'] ?? ''; $internalStateId = $data['object']['status']['code'] ?? ''; $internalStateName = $data['object']['status']['action'] ?? ''; @@ -208,7 +208,8 @@ public function execute() return $this->result->setContents('FALSE| Error creating fast checkout order. ' . $e->getMessage()); } } elseif (strpos($params['extra3'] ?? '', "fastcheckout") !== false) { - return $this->result->setContents('TRUE| Ignoring fastcheckout.'); + # Disabled fastcheckout related actions. + return $this->result->setContents('TRUE| Ignoring fastcheckout action ' . $action); } if (empty($payOrderId)) { @@ -220,7 +221,6 @@ public function execute() if (empty($order)) { try { if (empty($orderEntityId)) { - $this->payHelper->logCritical('Exchange: orderEntityId is not set', $params); throw new \Exception('orderEntityId is not set in the request'); } $order = $this->orderRepository->get($orderEntityId); diff --git a/Model/CreateFastCheckoutOrder.php b/Model/CreateFastCheckoutOrder.php index c946e515..9fa63d74 100644 --- a/Model/CreateFastCheckoutOrder.php +++ b/Model/CreateFastCheckoutOrder.php @@ -235,7 +235,7 @@ public function create($params) $order->addStatusHistoryComment(__('PAY. - Created iDEAL Fast Checkout order'))->save(); } catch (NoSuchEntityException $e) { - $order = $this->getExsistingOrder($quoteId); + $order = $this->getExistingOrder($quoteId); } return $order; } @@ -243,9 +243,10 @@ public function create($params) /** * @param string $quoteId * @return Order + * @throws \Exception * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing */ - public function getExsistingOrder($quoteId) + public function getExistingOrder($quoteId) { $searchCriteria = $this->searchCriteriaBuilder->addFilter('quote_id', $quoteId)->create(); $searchResult = $this->orderRepositoryInterface->getList($searchCriteria)->getItems(); From 4eab887ab4b12f89649d3592130df9717a51500d Mon Sep 17 00:00:00 2001 From: kevinverschoor <61683999+kevinverschoor@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:04:34 +0200 Subject: [PATCH 47/47] Remove minicart cacheable --- view/frontend/layout/default.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/frontend/layout/default.xml b/view/frontend/layout/default.xml index e175f972..70c722e9 100644 --- a/view/frontend/layout/default.xml +++ b/view/frontend/layout/default.xml @@ -5,7 +5,7 @@ - + Paynl\Payment\ViewModel\FastCheckout