如何在Laravel 5.8中集成eBay API以及如何在自己的ebay商店上载产品

时间:2019-07-04 15:54:28

标签: laravel integration ebay-api laravel-5.8

我正在尝试在我的Laravel项目中集成ebay API。但是,关于如何调用ebay API函数,如何在ebay商店上载产品没有完整的使用指南?堆栈溢出是一个巨大的门户,因此请提供一些指导。

这是我从网上获取的eBay控制器代码:

class EbayController extends Controller
{
    private $products ,  $config , $service;

    public function ebay_construct(Product $products)
    {
        $this->products = $products;
        $this->config = Config::get('ebay');
        // here we are getting ebay credentials 
        $this->service = new TradingService(array(
            'apiVersion' => $this->config['tradingApiVersion'],
            'devId' => $this->config['sandbox']['devId'],
            'appId' => $this->config['sandbox']['devId'],
            'certId' => $this->config['sandbox']['devId'],
            'siteId' => env('EBAY-MY','207'),
            'sandbox' => true,
        ));
    }

}

//*here is my config directory file ebay.php
return array(
    'sandbox' => array(
       //here are ebay credentials 
        'devId' => 'xxx',
        'appId' => 'xxx',
        'certId' => 'xxx',
        'userToken' => 
          ('xxx'),
         'findingApiVersion' => '1.12.0' ,
         'tradingApiVersion' => '949',
         'shoppingApiVersion' => '871',
         'halfFindingApiVersion' => '1.2.0'
);

0 个答案:

没有答案