2017-06-08 9 views
0

Payum Moduleのクラスをベンダーで使用しているコントローラは次のとおりです。ZF2:クラス 'Payum Sofort Payment SofortUeberWeisung'が見つかりません

<?php 
    namespace Orders\Controller; 
    use Payum\Sofort; 
    use Payum\Sofort\Payment\SofortUeberWeisung; 

    class PaymentController extends AbstractActionController 
    { 

    protected $entityManager; 

    public function sofortAction() 
    { 
     $Sofortueberweisung = new SofortUeberWeisung($configkey); 

     $Sofortueberweisung->setAmount(10.21); 
     $Sofortueberweisung->setCurrencyCode('EUR'); 
     //$Sofortueberweisung->setSenderSepaAccount('88888888', '12345678', 'Max Mustermann'); 
     $Sofortueberweisung->setSenderCountryCode('DE'); 
     $Sofortueberweisung->setReason('Testueberweisung', 'Verwendungszweck'); 
     $Sofortueberweisung->setSuccessUrl('http://www.google.de', true); 
     $Sofortueberweisung->setAbortUrl('http://www.google.de'); 
     // $Sofortueberweisung->setNotificationUrl('http://www.google.de', 'loss,pending'); 
     // $Sofortueberweisung->setNotificationUrl('http://www.yahoo.com', 'loss'); 
     // $Sofortueberweisung->setNotificationUrl('http://www.bing.com', 'pending'); 
     // $Sofortueberweisung->setNotificationUrl('http://www.sofort.com', 'received'); 
     // $Sofortueberweisung->setNotificationUrl('http://www.youtube.com', 'refunded'); 
     // $Sofortueberweisung->setNotificationUrl('http://www.youtube.com', 'untraceable'); 
     $Sofortueberweisung->setNotificationUrl('http://www.twitter.com'); 
     $Sofortueberweisung->setCustomerprotection(true); 

      $Sofortueberweisung->sendRequest(); 

      if($Sofortueberweisung->isError()) { 
       //SOFORT-API didn't accept the data 
       echo $Sofortueberweisung->getError(); 
      } else { 
       //buyer must be redirected to $paymentUrl else payment cannot be successfully completed! 
       $paymentUrl = $Sofortueberweisung->getPaymentUrl(); 
       header('Location: '.$paymentUrl); 
      } 
     } 

    } 

とクラスは、なぜそれがまだクラスを示している

<?php 

    namespace Sofort\Payment; 
    use Payum\Sofort\Core\SofortLibMultipay; 

    class SofortUeberWeisung extends SofortLibMultipay { 

    public function __construct($configKey) { 
    parent::__construct($configKey); 
    $this->_parameters['su'] = array(); 
    } 
    } 

がコントローラでは見られないが、私は、それはクラスときに起こっている見ることができますPayum \ Sofort \支払いフォルダにここにあります私は私のコントローラの新しいクラスの定義に行きます。添付の画像のように。

は、私はあなたがこのSofort\Payment名前空間の下ではなく、このPayum\Sofort\Payment下spcifiedされ、あなたのコントローラでSofortUeberWeisungクラスをインポートしている、私を修正してください enter image description here

+0

@ Dymen1これを確認できますか? – Shoaib

答えて

0

やって何か問題があります。あなたのコントローラにあるはずです

use Sofort\Payment\SofortUeberWeisung; 
関連する問題