1

How can I get the data when I click the place order button on the checkout page of the Magento 2? When clicking button place order, show the output data like var_dump ($data); die (); so as not to redirect to checkout success. Thank you so much. Checkout One Page

2 Answers 2

1

Use this extension and modify as per your requirement.
1 https://github.com/navinbhudiya/magento2-order-details-on-success-page
2 https://bsscommerce.com/magento-2-order-details-on-success-page.html

1
  • Hi Biren Patel, I want var_dump data immediately after submitting, and the data show shows that current checkout page. Thank you for your support
    – River
    Commented Apr 10, 2019 at 6:54
1

Following class is responsible for placing the order.

vendor/magento/module-checkout/Model/PaymentInformationManagement.php

And method:

savePaymentInformationAndPlaceOrder

You can debug here. This is api class and you can't get data as $data. All data are passes here as an object.

Also, you can throw an exception here for avoiding success page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.