I'm a Magento beginner. I'm trying to create a custom offline payment gateway, that will function like a check/money order type gateway. I've got something rough up and working by following this tutorial:
https://www.magestore.com/magento-2-tutorial/2361-2/
As I understand it, this gateway should be putting orders into 'pending_payment' status upon placement. Is see this line in Pendingpayment.php:
class Pendingpayment extends Status
{
/**
* @var string[]
*/
protected $_stateStatuses = [Order::STATE_PENDING_PAYMENT];
}
But when orders are placed with this gateway, they are in the 'processing' status. If I pull the order using the API (mysite/rest/V1/orders/{id}), I see both a state and status of 'processing'.
How can I get this gateway to put orders in 'payment_pending' status until further action?