You need to load order instance either from order entity_id or increment_id. After that, try these code. I haven't tested these code $payment = $order->getPayment(); $payment->setMethod('yourpaymentmethodcode'); $payment->save(); $order->save(); or $order->getPayment()->importData(['method' => 'yourpaymentmethodcode']); $order->...


In my case Firefox was auto-filling the "PayPal Express Checkout" configuration with Magento login credentials. Click "Configure" next to "PayPal Express Checkout" and remove the auto-filled credentials.

Only top voted, non community-wiki answers of a minimum length are eligible