1

php app/console payum:gateway:debug を実行すると

私はこのエラーメッセージを持っています

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

誰かが何が悪いのか理解するのを手伝ってくれますか?

ありがとうございました ;)

私のコントローラー:

私のアプリケーションは、定期的な支払いサブスクリプションを提供します

    /**
     * @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 :

ここで私はペイユムに敬意を表します

    "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
4

2 に答える 2

0

私は自分自身に答えます:

追加するだけ

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

依存関係を解決します。

于 2016-04-25T11:44:19.820 に答える