I have below link for creating order
https://www.mageplaza.com/magento-2-create-order-programmatically.html
How can we create Order with Paypal?
I have below link for creating order
https://www.mageplaza.com/magento-2-create-order-programmatically.html
How can we create Order with Paypal?
Assuming you use PayPal Express, you will need to change the following
from
$quote->setPaymentMethod('checkmo'); //payment method
to
$quote->setPaymentMethod('paypal_express'); //payment method