public function update( MShop_Order_Item_Interface $orderItem )
	{
		switch( $orderItem->getPaymentStatus() )
		{
			case MShop_Order_Item_Abstract::PAY_DELETED:
			case MShop_Order_Item_Abstract::PAY_CANCELED:
			case MShop_Order_Item_Abstract::PAY_REFUSED:
			case MShop_Order_Item_Abstract::PAY_REFUND:
				$this->unblock( $orderItem );
				break;

			case MShop_Order_Item_Abstract::PAY_PENDING:
			case MShop_Order_Item_Abstract::PAY_AUTHORIZED:
			case MShop_Order_Item_Abstract::PAY_RECEIVED:
				$this->block( $orderItem );
				break;
		}
	}
public function update( MShop_Order_Item_Interface $orderItem )
	{
		switch( $orderItem->getPaymentStatus() )
		{
			case MShop_Order_Item_Abstract::PAY_DELETED:
			case MShop_Order_Item_Abstract::PAY_CANCELED:
			case MShop_Order_Item_Abstract::PAY_REFUSED:
			case MShop_Order_Item_Abstract::PAY_REFUND:
				$this->unblock( $orderItem );
				break;

			case MShop_Order_Item_Abstract::PAY_PENDING:
			case MShop_Order_Item_Abstract::PAY_AUTHORIZED:
			case MShop_Order_Item_Abstract::PAY_RECEIVED:
				$this->block( $orderItem );
				break;
		}
	}
public function update ( MShop_Order_Item_Interface $ orderItem ) { switch ( $ orderItem -> getPaymentStatus ( ) ) { case MShop_Order_Item_Abstract :: PAY_DELETED : case MShop_Order_Item_Abstract :: PAY_CANCELED : case MShop_Order_Item_Abstract :: PAY_REFUSED : case MShop_Order_Item_Abstract :: PAY_REFUND : $ this -> unblock ( $ orderItem ) ; break ; case MShop_Order_Item_Abstract :: PAY_PENDING : case MShop_Order_Item_Abstract :: PAY_AUTHORIZED : case MShop_Order_Item_Abstract :: PAY_RECEIVED : $ this -> block ( $ orderItem ) ; break ; } }
Blocks or frees the resources listed in the order if necessary.

After payment status updates, the resources like products or coupon
codes listed in the order must be blocked or unblocked. This method
cares about executing the appropriate action depending on the payment
status.

It's save to call this method multiple times for one order. In this case,
the actions will be executed only once. All subsequent calls will do
nothing as long as the payment status hasn't changed in the meantime.

@param MShop_Order_Item_Interface $orderItem Order item object
Blocks or frees the resources listed in the order if necessary .