Im using:
self.placeOrder()
to create a payment order in magento 2 by a custom payment method.
Everything works ok, but i need to change this status to another.
I tried changing system.xml in magento 2:
<field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Status no Pedido</label>
<source_model>Teksystem\Pagamento\Model\Config\Source\Order\Status\Pendingpayment</source_model>
</field>
to
<field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Status no Pedido</label>
<source_model>Teksystem\Pagamento\Model\Config\Source\Order\Status\ Newprocessing</source_model>
</field>
and change the status...
but magento does not see this status modification. I think want to do something on placeOrder method but dont know how.