Payum Laravel 包裹 - 找不到路线

Payum Laravel Package - Route not found

我正在使用 Payum/PayumLaravelPackage 软件包,但我遇到了这个软件包的问题。

我有这个方法:

public function prepareExpressCheckout()
{
    $storage = $this->getPayum()->getStorage('Payment');

    $details = $storage->create();
    $details['PAYMENTREQUEST_0_CURRENCYCODE'] = 'EUR';
    $details['PAYMENTREQUEST_0_AMT'] = 1.23;
    $storage->update($details);

    $captureToken = App::make('payum.security.token_factory')->createCaptureToken('paypal_ec', $details, 'done');

    return \Redirect::to($captureToken->getTargetUrl());
}

我有路线:

Route::get('done', 'PaypalController@done');

并且Laravel给我一个错误Route [done] not defined。这怎么可能? 顺便说一下,我一直在寻找一个简单的 paypal nvp 库。有没有推荐的图书馆?

我怀疑第三个参数需要一个路由名称,而不是 URL。您的 routes.php 路线不是 named route

Route::get('done', ['as' => 'done', 'uses' => 'PaypalController@done']);