سؤال

Which Controller (or php class) is actually responsible for placing an order?

Seems the following JS components are initiating the post request:

Checkout Page -> Payment Button

Magento_Checkout/js/view/payment/default.js
Magento_Checkout/js/action/place-order.js
Magento_Checkout/js/model/place-order.js

But I don't know what controller (or php class) is responsible for actually handling the placeOrder request.

هل كانت مفيدة؟

المحلول

Following class is responsible for placing order from checkout page

Magento\Quote\Model\QuoteManagement

Find placeOrder method.

How it call?

Open Magento/Checkout/view/frontend/web/js/action/place-order.js,

It's call 'carts/mine/payment-information' OR 'guest-carts/:quoteId/payment-information'

that means Magento/Checkout/Model/PaymentInformationManagement.php savePaymentInformationAndPlaceOrder method.

Check here

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top