Rout定义为在module.config中它将进入此路径,但如上所述给出错误,控制器未分配给任何类
return array(
'controllers' => array(
'classes' => array(
'Reisesparer\Controller\Index' => 'Reisesparer\Controller\IndexController',
'Reisesparer\Controller\Payment' => 'Reisesparer\Controller\PaymentController',
),
'invokables' => array(
'Reisesparer\Controller\Index' => 'Reisesparer\Controller\IndexController',
'Reisesparer\Controller\Payment' => 'Reisesparer\Controller\PaymentController',
),
'payment_done' => array(
'type' => 'segment',
'options' => array(
'route' => '/payment/done[/:payum_token]',
'defaults' => array(
'__NAMESPACE__' => 'Reisespare\Controller',
'controller' => 'Payment',
'action' => 'done'
),
),
),
这里是控制器方法:
namespace Reisesparer\Controller;
use Payum\Core\Request\GetHumanStatus;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\Di\ServiceLocator;
use Zend\View\Model\JsonModel;
class PaymentController extends AbstractActionController
{
public function doneAction()
{
$token = $this->getServiceLocator()->get('payum.security.http_request_verifier')->verify($this);
$gateway = $this->getServiceLocator()->get('payum')->getgateway($token->getgatewayName());
$gateway->execute($status = new GetHumanStatus($token));
return new JsonModel(array('status' => $status->getValue(), 'details' => iterator_to_array($status->getFirstModel())));
}
}
有关此问题的任何帮助如何解决?