Payum Laravel套餐 - 未找到路线

时间:2015-06-22 18:14:49

标签: laravel nvp

我使用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库。有没有推荐的图书馆?

1 个答案:

答案 0 :(得分:1)

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

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