cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Order Status with Payment Gateway

Setting Order Status with Payment Gateway

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/

 

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?

2 REPLIES 2

Re: Setting Order Status with Payment Gateway

How are you are placing order?

 

Using REST API?

if YES, please share pentameters what you are trying to pass.

 

Also please check default order status from : Login to Admin -> Stores -> Order status.

 

Let me know details.

 

Thanks

Dharmesh

 

 

Re: Setting Order Status with Payment Gateway

I am placing the orders through the browser/storefront as a shopper would. 

 

In the admin, I see a number of different statuses with 'Default Status'.

status.png