Silex Payum error : Request Capture{model: Identity} is not supported

Silex Payum error : Request Capture{model: Identity} is not supported

我目前正在使用 Silex(最新稳定版)制作一个需要实施支付系统的网站。所以我尝试安装 Payum(最新的稳定版),一切正常,直到我调用准备页面,该页面将我重定向到 Payum 捕获的页面(/payment/capture/hash of the request),我收到此错误:

Request Capture{model: Identity} is not supported.

关于安装,我已经按照官方指南进行了:http://payum.org/doc/1.0/PayumSilexProvider/get-it-started

我也尝试了所有其他版本的 Payum,但均未成功。

这是错误的痕迹:

in RequestNotSupportedException.php line 29
at RequestNotSupportedException::create(object(Capture)) in Gateway.php line 99
at Gateway->execute(object(Capture)) in ExecuteSameRequestWithModelDetailsAction.php line 32
at ExecuteSameRequestWithModelDetailsAction->execute(object(Capture)) in Gateway.php line 107
at Gateway->execute(object(Capture)) in CaptureController.php line 20
at CaptureController->doAction(object(Request))
at call_user_func_array(array(object(CaptureController), 'doAction'), array(object(Request))) in HttpKernel.php line 147
at HttpKernel->handleRaw(object(Request), '1') in HttpKernel.php line 68
at HttpKernel->handle(object(Request), '1', true) in Application.php line 586
at Application->handle(object(Request)) in Application.php line 563
at Application->run() in app_dev.php line 12

如果有人能帮助我,那将是我的一天! :)

提前致谢

好的,我找到了答案,感谢 github 和 Payum Silex 的创建者@makasim :) https://github.com/Payum/Payum/issues/423#issuecomment-150948591

只需添加:

<?php
$gateways['paypal_ec']->addExtension(new StorageExtension(
    new FilesystemStorage(__DIR__.'/cache/payum', 'Payum\Core\Model\Payment')
));

在网关注册中!