How is the \Magento\Sales\Model\Order::STATE_PENDING_PAYMENT constant used?

Declaration

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order.php#L62-L62

Usages

1. \Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment\Redirect::_returnQuote()

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment/Redirect.php#L81-L83

2. \Magento\Downloadable\Observer\SetLinkStatusObserver::execute()

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Downloadable/Observer/SetLinkStatusObserver.php#L94-L95

3. \Magento\Paypal\Model\Hostedpro::initialize()

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Paypal/Model/Hostedpro.php#L180-L200

4. \Magento\Paypal\Model\Ipn::_registerPaymentPending()

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Paypal/Model/Ipn.php#L376-L382

5. \Magento\Paypal\Model\Payflowlink::initialize()

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Paypal/Model/Payflowlink.php#L237-L257

6. \Magento\Paypal\Model\Payflowlink::_getOrderFromResponse()

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Paypal/Model/Payflowlink.php#L396-L402

7. \Magento\Paypal\Model\Express\Checkout::place()

8. \Magento\Reports\Model\ResourceModel\Order\Collection::_prepareSummaryLive()

9. \Magento\Reports\Model\ResourceModel\Order\Collection::_calculateTotalsLive()

10. \Magento\Reports\Model\ResourceModel\Order\Collection::calculateSales()

11. \Magento\Sales\Model\CronJob\CleanExpiredOrders::execute()

981d1f/app/code/Magento/Sales/Model/CronJob/CleanExpiredOrders.php#L43-L67

/**
 * Clean expired quotes (cron process)
 *
 * @return void
 */
public function execute()
{
	$lifetimes = $this->storesConfig->getStoresConfigByPath('sales/orders/delete_pending_after');
	foreach ($lifetimes as $storeId => $lifetime) {
		/** @var $orders \Magento\Sales\Model\ResourceModel\Order\Collection */
		$orders = $this->orderCollectionFactory->create();
		$orders->addFieldToFilter('store_id', $storeId);
		$orders->addFieldToFilter('status', Order::STATE_PENDING_PAYMENT);
		$orders->getSelect()->where(
			new \Zend_Db_Expr('TIME_TO_SEC(TIMEDIFF(CURRENT_TIMESTAMP, `updated_at`)) >= ' . $lifetime * 60)
		);

		try {
			$orders->walk('cancel');
			$orders->walk('save');
		} catch (\Exception $e) {
			$this->logger->error('Error cancelling deprecated orders: ' . $e->getMessage());
		}
	}
}

12. \Magento\Sales\Model\ResourceModel\Report\Shipping::_aggregateByOrderCreatedAt()

13. \Magento\Sales\Model\ResourceModel\Report\Order\Createdat::_aggregateByField()

14. \Magento\Tax\Model\ResourceModel\Report\Tax\Createdat::_aggregateByOrder()

See also: