public function execute($request)
    {
        /** @var $request Sync */
        RequestNotSupportedException::assertSupports($this, $request);
        
        $model = ArrayObject::ensureArrayObject($request->getModel());

        if (false == $model['token']) {
            return;
        }

        $copiedModel = new ArrayObject(array(
            'token' => $model['token'],
        ));
        
        $this->payment->execute(new GetTransactionDetails($copiedModel));
		if ( $copiedModel['error_code'] === Errors::ERRCODE_NO_ERROR )
		{
			if ( $copiedModel['transaction_status'] )
			{
				if ( $model['status'] != null )
				{
					if ( $copiedModel['transaction_status'] === TransactionStatus::PAID_WAITING_FOR_PROCESS )
					{
						$model['status'] = StateInterface::STATE_NOTIFIED;
					}
					else if ( $copiedModel['transaction_status'] === TransactionStatus::PAID )
					{
						$model['status'] = StateInterface::STATE_CONFIRMED;
					}
				}
				else
				{
					throw new \RuntimeException('Unknown error....');	
				}
			}
			else
			{
				throw new \RuntimeException('Unknown error.');	
			}
		}
    }
public function execute($request)
    {
        /** @var $request Sync */
        RequestNotSupportedException::assertSupports($this, $request);
        
        $model = ArrayObject::ensureArrayObject($request->getModel());

        if (false == $model['token']) {
            return;
        }

        $copiedModel = new ArrayObject(array(
            'token' => $model['token'],
        ));
        
        $this->payment->execute(new GetTransactionDetails($copiedModel));
		if ( $copiedModel['error_code'] === Errors::ERRCODE_NO_ERROR )
		{
			if ( $copiedModel['transaction_status'] )
			{
				if ( $model['status'] != null )
				{
					if ( $copiedModel['transaction_status'] === TransactionStatus::PAID_WAITING_FOR_PROCESS )
					{
						$model['status'] = StateInterface::STATE_NOTIFIED;
					}
					else if ( $copiedModel['transaction_status'] === TransactionStatus::PAID )
					{
						$model['status'] = StateInterface::STATE_CONFIRMED;
					}
				}
				else
				{
					throw new \RuntimeException('Unknown error....');	
				}
			}
			else
			{
				throw new \RuntimeException('Unknown error.');	
			}
		}
    }
{@inheritDoc}