0
を渡される引数2で与えられていない私は、API呼び出しで500エラーがあります:私は、コンストラクタhttps://github.com/Payum/PaypalExpressCheckoutNvp/blob/master/Api.phpで懸念があると思いpayum - HttpClientInterface
Catchable Fatal Error: Argument 2 passed to Payum\Paypal\ExpressCheckout\Nvp\Api::__construct() must implement interface Payum\Core\HttpClientInterface, none given, called in /var/www/myapp/src/App/UserBundle/Controller/SubscriptionController.php on line 65 and defined
を。 2つの引数についてのデフォルト値はありません... 問題はありますか?ここで
は私の作曲である:ここでは
"payum/paypal-express-checkout-nvp": "^1.3",
"payum/payum-bundle": "^2.0",
"php-http/guzzle6-adapter": "^1"
は私のコントローラです:
protected function getPaypalOptions()
{
return array(
'username' => $this->container->getParameter('paypal.express_checkout.username'),
'password' => $this->container->getParameter('paypal.express_checkout.password'),
'signature' => $this->container->getParameter('paypal.express_checkout.signature'),
'return_url' => null,
'cancel_url' => null,
'sandbox' => $this->container->getParameter('paypal.sandbox'),
'useraction' => $useraction,
'cmd' => Api::CMD_EXPRESS_CHECKOUT,
);
}
public function indexAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('AppUserBundle:Subscription')->findBy(
array('companies' => $this->get('security.context')->getToken()->getUser()->getCompanies()),
array('id' => 'DESC')
);
for ($i=0;$i<count($entity);$i++)
{
if ($entity[$i]->getProfileId()!='') {
$details['PROFILEID'] = $entity[$i]->getProfileId();
$api = new Api($this->getPaypalOptions());
$arrStatus = $api->getRecurringPaymentsProfileDetails($details);
$entity[$i]->paypalstatus = $arrStatus['STATUS'];
}
}
return $this->render('AppUserBundle:Subscription:index.html.twig', array(
'entities' => $entity
));
}
にダウングレードあなたが表示するようにあなたの質問を更新することができます完全なSubscriptionControlle r.phpと行番号?私はあなたがHttpClientInterfaceへの呼び出しを行った場所を知る必要があります。 –