I am working on a webhook endpoint that will take quotes and turn them into finished orders.
As part of this, I want to set the quotes payment method to a custom existing payment method, but I do not want it to "place" the payment; I just want the order to have the payment details.
I know I can pass "checkmo" as the payment method, but that is not a viable option for what I want. I need to pass the custom payment method.
Part of the order process is to place the payment, see /vendor/magento/module-sales/Model/Order.php
line 1176, public function place()
public function place()
{
$this->_eventManager->dispatch('sales_order_place_before', ['order' => $this]);
$this->_placePayment();
$this->_eventManager->dispatch('sales_order_place_after', ['order' => $this]);
return $this;
}
How can I stop $this->_placePayment()
from being triggered?
placePayment()
call? Also, I'm not sure what you mean by "don't call original place() method with proceed()" – Paul Canning Oct 1 '19 at 10:06