Skip to content

Commit e0b7464

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
ACP2E-3233: Admin can still place order even without payment method
1 parent d06337a commit e0b7464

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Sales/Model/AdminOrder/Create.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1810,6 +1810,8 @@ public function importPostData($data)
18101810

18111811
if (isset($data['payment_method'])) {
18121812
$this->setPaymentMethod($data['payment_method']);
1813+
} else {
1814+
$this->setPaymentMethod('');
18131815
}
18141816

18151817
if (isset($data['coupon']['code'])) {
@@ -2180,7 +2182,6 @@ protected function _validate()
21802182
$this->_errors[] = __('The shipping method is missing. Select the shipping method and try again.');
21812183
}
21822184
}
2183-
21842185
if (!$this->getQuote()->getPayment()->getMethod()) {
21852186
$this->_errors[] = __("The payment method isn't selected. Enter the payment method and try again.");
21862187
} else {

0 commit comments

Comments
 (0)