2

I want to place order programmatically using cash on delivery method for COD.

What value I need to pass? please help me to solve this?

1 Answer 1

1

You can assign by cashondelivery

Something like this

$quote->setPaymentMethod('cashondelivery');

$quote->getPayment()->importData(['method' => 'cashondelivery']);
$quote->collectTotals()->save();

$quote = $this->cartRepositoryInterface->get($quote->getId());
$order = $this->cartManagementInterface->submit($quote);

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.