Action/CaptureOnsiteAction.php
public function execute($request)
    {
        /** @var $request Capture */
        RequestNotSupportedException::assertSupports($this, $request);

        $model = ArrayObject::ensureArrayObject($request->getModel());

        if ( null !== $model['token'] )
			return;

        if (false == $model['return_url'] && $request->getToken()) {
            $model['return_url'] = $request->getToken()->getTargetUrl();
        }

        if (false == $model['cancel_url'] && $request->getToken()) {
            $model['cancel_url'] = $request->getToken()->getTargetUrl();
        }

        $this->payment->execute(new SetExpressCheckout($model));

        if ( $model['error_code'] == '00' )
		{
			if ( !isset($model['checkout_url']) )
			{
				throw new \LogicException('Payment gateway Nganluong is not returned "checkout_url"');
			}
			
            throw new HttpRedirect(	$model['checkout_url'] );
		}
        else
		{
            return;   // failed
        }
    }
public function execute($request)
    {
        /** @var $request Capture */
        RequestNotSupportedException::assertSupports($this, $request);

        $model = ArrayObject::ensureArrayObject($request->getModel());

        if ( null !== $model['token'] )
			return;

        if (false == $model['return_url'] && $request->getToken()) {
            $model['return_url'] = $request->getToken()->getTargetUrl();
        }

        if (false == $model['cancel_url'] && $request->getToken()) {
            $model['cancel_url'] = $request->getToken()->getTargetUrl();
        }

        $this->payment->execute(new SetExpressCheckout($model));

        if ( $model['error_code'] == '00' )
		{
			if ( !isset($model['checkout_url']) )
			{
				throw new \LogicException('Payment gateway Nganluong is not returned "checkout_url"');
			}
			
            throw new HttpRedirect(	$model['checkout_url'] );
		}
        else
		{
            return;   // failed
        }
    }
public function execute ( $ request ) { /** @var $request Capture */ RequestNotSupportedException :: assertSupports ( $ this , $ request ) ; $ model = ArrayObject :: ensureArrayObject ( $ request -> getModel ( ) ) ; if ( null !== $ model [ 'token' ] ) return ; if ( false == $ model [ 'return_url' ] && $ request -> getToken ( ) ) { $ model [ 'return_url' ] = $ request -> getToken ( ) -> getTargetUrl ( ) ; } if ( false == $ model [ 'cancel_url' ] && $ request -> getToken ( ) ) { $ model [ 'cancel_url' ] = $ request -> getToken ( ) -> getTargetUrl ( ) ; } $ this -> payment -> execute ( new SetExpressCheckout ( $ model ) ) ; if ( $ model [ 'error_code' ] == '00' ) { if ( ! isset ( $ model [ 'checkout_url' ] ) ) { throw new \ LogicException ( 'Payment gateway Nganluong is not returned "checkout_url"' ) ; } throw new HttpRedirect ( $ model [ 'checkout_url' ] ) ; } else { return ; // failed } }
{@inheritDoc}

@param Capture $request
{ @inheritDoc }