2016-04-22 5 views
1

私は、PHPアプリ/コンソールpayum実行すると:ゲートウェイ:デバッグをPayum - 形質 'Payum コア GatewayAwareTrait' が見つかりません

私は、このエラーメッセージにしました

は、誰かが私が何を理解するのに役立ちます

PHP Fatal error: Trait 'Payum\Core\GatewayAwareTrait' not found in /var/www/myapplication/vendor/payum/paypal-express-checkout-nvp/Payum/Paypal/ExpressCheckout/Nvp/Action/PurchaseAction.php on line 26 
違う?

私のアプリケーションはrecurent支払い購読

/** 
    * @Extra\Route(
    * "/prepare_recurring_payment_agreement", 
    * name="acme_paypal_express_checkout_prepare_recurring_payment_agreement" 
    *) 
    * 
    * @Extra\Template 
    */ 
    public function createAgreementAction(Request $request) 
    { 
     $gatewayName = 'paypal_express_checkout_recurring_payment_and_doctrine_orm'; 
     $subscription = $this->getWeatherForecastSubscriptionDetails($request->request->get('abo')); 

     if ($request->isMethod('POST')) { 
      $storage = $this->getPayum()->getStorage('MyApplication\UserBundle\Entity\AgreementDetails'); 
      /** @var $agreement AgreementDetails */ 
      $agreement = $storage->create(); 
      $agreement['ABO'] = $request->request->get('abo'); 
      $agreement['PAYMENTREQUEST_0_AMT'] = 0; 
      $agreement['L_BILLINGTYPE0'] = Api::BILLINGTYPE_RECURRING_PAYMENTS; 
      $agreement['L_BILLINGAGREEMENTDESCRIPTION0'] = $subscription['description']; 
      $agreement['NOSHIPPING'] = 1; 

      $storage->update($agreement); 

      $captureToken =$this->getPayum()->getTokenFactory()->createCaptureToken(
       $gatewayName, 
       $agreement, 
       'acme_paypal_express_checkout_create_recurring_payment' 
      ); 

      $agreement['RETURNURL'] = $captureToken->getTargetUrl(); 
      $agreement['CANCELURL'] = $captureToken->getTargetUrl(); 
      $agreement['INVNUM'] = $agreement->getId(); 

      $storage->update($agreement); 
      return $this->redirect($captureToken->getTargetUrl()); 
     } 
     return array(
      'subscription' => $subscription, 
      'gatewayName' => $gatewayName 
     ); 
    } 

マイcomposer.jsonを提供しています:

ここで私は敬意を示す)

私のcontroler;

ありがとうございましたペイダム

"php": ">=5.3.3", 
    "symfony/symfony": "2.8.*", 
    "payum/payum-bundle": "^2.0", 
    "payum/offline": "^1.2", 
    "payum/paypal-express-checkout-nvp": "^1.0", 

AppKernel.php

ここで私はちょうどPayumBundle

new Payum\Bundle\PayumBundle\PayumBundle(), 

PHPのバージョンを呼び出す:私は自分自身に答える

PHP 5.5.9-1ubuntu4.16 (cli) (built: Apr 20 2016 14:31:37) 
Copyright (c) 1997-2014 The PHP Group 
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies 
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies 
+0

はあなたが見ることができるの/ var/www /のします。myapplication /ベンダー/ payum /ペイパル-急行チェックアウト-NVP/Payum /コア/ GatewayAwareTrait.phpが存在する場合? –

+0

実際、GatewayAwareTrait.phpは存在しません。私は依存関係を解決し、最終的にGatewayAwareTrait.phpの追加を解決するために "php-http/guzzle6-adapter"を追加しなければなりませんでした...あなたの助けをありがとうOlivier! – juvaone

答えて

0

追加するだけで、依存関係を解決するために

"php-http/guzzle6-adapter": "^1.0" 

を追加してください。

0

あなたはcomposer.jsonに追加する必要があります:

"payum/core": "^1.2", 
関連する問題