Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 卖方ID对于平行付款是强制性的_Php_Paypal_Express Checkout - Fatal编程技术网

Php 卖方ID对于平行付款是强制性的

Php 卖方ID对于平行付款是强制性的,php,paypal,express-checkout,Php,Paypal,Express Checkout,我想创建一个市场,用户可以列出项目,让买家直接通过贝宝支付 我的代码是: $config = $config = vn3dUtil::getPaypalConfig(); $paypalService = new PayPalAPIInterfaceServiceService($config); $setECReqDetails = new SetExpressCheckoutRequestDetailsType();

我想创建一个市场,用户可以列出项目,让买家直接通过贝宝支付

我的代码是:

$config =  $config = vn3dUtil::getPaypalConfig();
            $paypalService = new PayPalAPIInterfaceServiceService($config);
            $setECReqDetails = new SetExpressCheckoutRequestDetailsType();


            $cart=$this->ZendCart()->cart();
            //for
            $k=0;
            foreach ($cart as $key => $po) {

            $itemDetails = new PaymentDetailsItemType();
            $itemDetails->Name = $po['name'];
            $itemAmount =  $po['price'];
            $itemDetails->Amount = $itemAmount;
//             $itemQuantity = $po['qty'];
            $itemQuantity = '1';
            $itemDetails->Quantity = $itemQuantity;

             //add one product
            $paymentDetails= new PaymentDetailsType();

            $paymentDetails->PaymentDetailsItem[$k] = $itemDetails;

            //set total
            $orderTotal = new BasicAmountType();
            $orderTotal->currencyID = 'USD';

            $orderTotal->value = $itemAmount * $itemQuantity;
            $paymentDetails->OrderTotal = $orderTotal;



            $paymentDetails->PaymentAction = 'Sale';
            $setECReqDetails->PaymentDetails[$k] = $paymentDetails;

            //end for
            $k++;
            }



            //
            $setECReqDetails->CancelURL = vn3dUtil::DOMAIN;
            $setECReqDetails->ReturnURL = vn3dUtil::DOMAIN."/store/checkout-detail";

            $setECReqType = new SetExpressCheckoutRequestType();
            $setECReqType->Version = '104.0';
            $setECReqType->SetExpressCheckoutRequestDetails = $setECReqDetails;

            $setECReq = new SetExpressCheckoutReq();
            $setECReq->SetExpressCheckoutRequest = $setECReqType;

//             var_dump($setECReq);

            $setECResponse = $paypalService->SetExpressCheckout($setECReq);
            var_dump($setECResponse->Token);
            var_dump($setECResponse);
            if($setECResponse->Ack=="Success"){
             $this->redirect()->toUrl("https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=".$setECResponse->Token);
            }
Paypal回应“卖方ID对于并行支付是强制性的。”

你建议这样做吗

object(SetExpressCheckoutResponseType)[259]
      public 'Token' => null
      public 'Timestamp' => string '2014-02-15T20:47:42Z' (length=20)
      public 'Ack' => string 'Failure' (length=7)
      public 'CorrelationID' => string '412c6c6aa36c1' (length=13)
      public 'Errors' => 
        array (size=1)
          0 => 
            object(ErrorType)[268]
              public 'ShortMessage' => string 'Seller ID Missing.' (length=18)
              public 'LongMessage' => string 'Seller ID is mandatory for parallel payments.' (length=45)
              public 'ErrorCode' => string '13115' (length=5)
              public 'SeverityCode' => string 'Error' (length=5)
              public 'ErrorParameters' => null
      public 'Version' => string '104.0' (length=5)
      public 'Build' => string '9720069' (length=7)

你的问题是什么?很好。祝您好运,修复了您没有向我们显示的请求代码,使我们无法帮助您。是的,如上所述,我们需要查看实际请求。但是,在您所展示的内容中,我没有看到任何特定于$Receivers的东西。。??您在哪里设置付款接收人?如果没有,那可能就是为什么会出现这个错误。