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

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

        $this->payment->execute(new GetTransactionDetails($model));
		
        if ( isset($model['error_code']) && $model['error_code'] === Errors::ERRCODE_NO_ERROR )
		{
			if ( isset($model['transaction_status']) )
			{
				if ( $model['transaction_status'] === TransactionStatus::PAID )
				{
					$model['state'] = StateInterface::STATE_CONFIRMED;
				}
				else if ( $model['transaction_status'] === TransactionStatus::NOT_PAID )
				{
					$model['state'] = StateInterface::STATE_ERROR;
				}
				else if ( $model['transaction_status'] === TransactionStatus::PAID_WAITING_FOR_PROCESS )
				{
					$model['state'] = StateInterface::STATE_NOTIFIED;
				}
			}
		}		
    }
public function execute($request)
    {
        /** @var $request Sync */
        RequestNotSupportedException::assertSupports($this, $request);
        
        $model = ArrayObject::ensureArrayObject($request->getModel());

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

        $this->payment->execute(new GetTransactionDetails($model));
		
        if ( isset($model['error_code']) && $model['error_code'] === Errors::ERRCODE_NO_ERROR )
		{
			if ( isset($model['transaction_status']) )
			{
				if ( $model['transaction_status'] === TransactionStatus::PAID )
				{
					$model['state'] = StateInterface::STATE_CONFIRMED;
				}
				else if ( $model['transaction_status'] === TransactionStatus::NOT_PAID )
				{
					$model['state'] = StateInterface::STATE_ERROR;
				}
				else if ( $model['transaction_status'] === TransactionStatus::PAID_WAITING_FOR_PROCESS )
				{
					$model['state'] = StateInterface::STATE_NOTIFIED;
				}
			}
		}		
    }
{@inheritDoc}